4 ms·
Migrating to HTTPX2
- tosh 2mo agonb: operating system TLS trust store is used now (instead of certifi)
- hmokiguess 2mo agowhat's `nb` ?
- tosh 2mo agohttps://en.wikipedia.org/wiki/Nota_bene https://en.wikipedia.org/wiki/Nota_bene
- hmokiguess 2mo agoThank you! :)
- zx8080 2mo agoThis could be a breaking change (for some corporate network environments).
- skullone 2mo agoUgh. certifi the most annoying thing ever. It snuck into numerous python dependencies, never made anything better, and confuses all the junior devs when their venvs/containers etc can't access internal CA signed resources. Probably have explained what to do over 9,000 times. And for what? "To provide updated root CAs". Meh. I don't need daily CA trust store updates. If your CA roots are that new, I want nothing to do with it. Cert issuers (cough sectigo and their amateur hour CA root rotation recently, not even Mozilla had it).
- londons_explore 2mo agoThere seems to be a bunch of downsides mentioned... But what are the upsides of this change?
- ddorian43 2mo agohttps://github.com/encode/httpx/discussions/3784 https://github.com/encode/httpx/discussions/3784 > I've closed off access to issues and discussions. > I don't want to continue allowing an online environment with such an absurdly skewed gender representation. I find it intensely unwelcoming, and it's not reflective of the type of working environments I value. https://www.reddit.com/r/Python/comments/1rl5kuq/anyone_know_whats_up_with_httpx/ https://www.reddit.com/r/Python/comments/1rl5kuq/anyone_know...
- philipallstar 2mo agoIt's like that time I started a primary school and then closed it because I hated that the overwhelming majority of employees were women.
- porridgeraisin 2mo agoThis has happened in many packages contributed to by this person. Mkdocs e.g
- sunaookami 2mo agoOh boy, no wonder MkDocs became an absolute shit-show that fucked everyone over... https://github.com/mkdocs/mkdocs/discussions/4077#discussioncomment-15687765 https://github.com/mkdocs/mkdocs/discussions/4077#discussion...
- deleted 2mo ago[deleted]
- giov4 2mo agounbelievable, how can a single person affect negatively FOSS so much? I mean really, closing repos? excluding maintainers? committing only on private repos? This type of behavior should be moderated and banned from any FOSS activity to avoid exactly this situation of becoming a liability. I've never seen a open source project page without a github link or a git clone ref like this https://www.encode.io/hx/ https://www.encode.io/hx/ it is so ridiculous, wasn't that stuff on github? and isn't it anyway there due to over 1k forks? what's the advantage of having this behaviour? I see it only damaging towards the person, the project and the community.
- ledoncool 2mo ago[flagged]
- simonw 2mo agoAnthropic made the same change a few weeks after OpenAI did: https://github.com/anthropics/anthropic-sdk-python/releases/tag/v1.0.0 https://github.com/anthropics/anthropic-sdk-python/releases/... The problem with httpx as a dependency is that it's currently working towards a 1.0 release which will be full of breaking changes. The httpx2 project is essentially a fork that promises not to break the existing API, which makes it a more stable dependency to build against. I wrote a pretty long comment about my concerns for the breaking 1.0 version last year - https://github.com/encode/httpx/discussions/3344#discussioncomment-14170874 https://github.com/encode/httpx/discussions/3344#discussionc... - in that comment I recommended the HTTPX project release their 1.0 as a package called httpx2 instead, but a year later we now have an httpx2 (released by a different maintainer) that keeps the old API.
- rolymath 2mo agoThe Python community loves confusing versioning. I mean, obviously Python 2.7 is newer than Python 3.1 I remember swearing I would never migrate to python3 but here we are, I migrated without even feeling it or realizing when (But I do remember django played a big role).
- Longwelwind 2mo agoIsn't that whole point of semantic release? Minors and hotfixes allow you to release a new version for an older release (like if you released 3.7 but you found a bug present in 3.4, you can release 3.4.1 which would be newer than 3.7), making it possible to have multiple supported versions at the same time.
- chme 2mo agoThat isn't confusing at all, if you know how maintained stable releases work. Happens with the Linux kernel as well.
- yard2010 2mo agoTangibly related, did you know that odd versions of node don't get LTS, I found it odd at first
- preetham_rangu 2mo ago[flagged]
- CurbStomper 2mo ago[dead]
- deleted 2mo ago[deleted]
- fsuts 2mo ago[flagged]
- TZubiri 2mo agoWhy would you assume that we have to move from techX to techX+1? If I release http4 would you assume that you have to migrate to http4 at some point?
- KaiserPro 2mo agobecause its over QUIC, which is different enough to be a pain. Not that there is anything wrong with QUIC, at least its built by someone who knows what they are doing, unlike HTTP2
- tankenmate 2mo agothat's not really much of an argument, almost all reasonable libraries wrap the functionality.and if a provider doesn't want to support http3 then the library will fallback, and then the laggards should pay the slow tax.
- KaiserPro 2mo agoNo as in the infra between you and the end user is less developed. Nobody is going to get fired for using http1.1 if you move to http3 and a bunch of clients cant use your site, then you're gonna get yelled at.
- tredre3 2mo agoHTTPX2 isn't about the protocol version, it's the name of a python library to make http requests. But yes, it doesn't support HTTP3. Here's the related issue: https://github.com/pydantic/httpx2/issues/92 https://github.com/pydantic/httpx2/issues/92
- ZeroCool2u 2mo agoThe requests packages fundamental API is good enough and is now maintained by the PSF. I don't understand why OpenAI and Anthropic don't just throw some $$$ to the PSF for focused improvements and expansion of it.
- awildfivreld 2mo agoThe maintainers of requests have made it pretty clear that they consider that package feature complete, and have not showed interest in adding native async support to the core.
- TZubiri 2mo agorequests is great and all, but you can just use sockets and send raw http strings. Don't treat it like some impenetrable huge OS project. Unless OpenAI deprecates the HTTP endpoint, you can pretty much ignore the whole SDK packages.
- deleted 2mo ago[deleted]
- hno5b8kgpg 2mo ago[dead]
- ironqcold 2mo agoOh, well... It was bound to happen eventually. I suppose there must be some advantages to such a solution.
- jklehm 2mo agoWonder if they evaluated httpx2 vs niquests: https://github.com/jawah/niquests https://github.com/jawah/niquests
- awoimbee 2mo agoI opened an issue some time ago about them monkey patching urllib3, it was fixed than but I now see the issue has been outright deleted. Oh and now I see there is a URLLIB3_NO_OVERRIDE thing... I would not recommend this project.
- jtbaker 2mo agoSame! Recently ported some code from httpx -> niquests and the experience has been good, although admittedly the governance of the project seems a little unclear. I (ok, Qwen 3.7 27B) wrote some benchmarking code to compare throughput, and niquests seems to be substantially more performant for traffic that doesn't need to traverse the public web, e.g. intra cluster service to service communication: https://gist.github.com/jtbaker/61061d27949ef48ac31e85ff28c24eb6 https://gist.github.com/jtbaker/61061d27949ef48ac31e85ff28c2... uv run scripts/bench_http.py --count 1000 Benchmarking 1000 requests to http://localhost:8000/health (concurrency=16, timeout=30.0s) Date: 2026-08-28T10:18:34.480111 Running httpx... Running httpx2... Running niquests... Metric httpx httpx2 niquests ------------------------------------------------------- mean 17.8ms 4.6ms 3.3ms min 3.2ms 1.5ms 1.2ms max 632.4ms 11.1ms 10.8ms p50 15.9ms 4.2ms 3.0ms p95 32.4ms 7.4ms 5.6ms p99 52.1ms 8.5ms 8.4ms total 1.15s 315.5ms 239.7ms throughput 869.2 req/s 3170.0 req/s 4171.1 req/s Winner: niquests (4.8x faster by wall clock)
- jelenzelen 2mo agohttpx2 is fork maintained by pydantic which are trustworthy and resourcefull maintainers.
- KaiserPro 2mo agoWhy would you want to use HTTPX2 over say requests?
- deleted 2mo ago[deleted]
- oersted 2mo agoasync
- imp0cat 2mo agoYou probably want to use pretty much anything over requests for performance reasons.
- 12_throw_away 2mo agoAsync. And it comes with WSGI and ASGI transport adapters [1], which are amazing for testing/debugging with the client and server in a single process. And I personally find the httpx API is much cleaner and more composable, but ymmv. [1] https://www.python-httpx.org/advanced/transports/#wsgi-transport https://www.python-httpx.org/advanced/transports/#wsgi-trans...
- deathanatos 2mo agoSince it clearly intends to satisfy the async use case, I wish you'd've phrased this as "over aiohttp".
- JimDabell 2mo agoRequests has been dead for over a decade. It doesn’t support HTTP/2, it doesn’t support HTTP/3, it doesn’t support async, and they ignore security vulnerabilities for months. Nobody should use requests. If you are still using it, the quickest way to get off it is to switch to niquests, which is actively developed, supports all the things I mentioned above, and API-compatible with requests - you can just do `import niquests as requests` for an instant upgrade. https://niquests.readthedocs.io/ https://niquests.readthedocs.io/
- 2mo ago
- myshapeprotocol 2mo ago[dead]
- igkougkousis 2mo ago[flagged]
- mococa 2mo agoWhy this is in the frontpage?
- bilalq 2mo agoI'd second this question. And I really mean that in a sincere way. Why is the choice of a random HTTP library in an SDK such an engaging topic of discussion here? Is there some context I'm missing? When I first read the title, I assumed this was some fancy new protocol that extends HTTP or something. But it's just about an SDK switching one transitive dependency with a fork? And arguably one that should just have its functionality be part of stdlib?
- ushakov 2mo agowe have recently switched from httpx for the same reason but instead went with the Rust-based pyqwest (runs on Hyper) it has also a drop-in httpx-compatible transport so migration was easy and also it supports http2 trailers https://pyqwest.dev https://pyqwest.dev
- karpetrosyan 2mo agoBetter migrate to https://zapros.dev https://zapros.dev from httpx maintainer
- simlevesque 2mo agoSeems like the point is that the httpx maintainer is a bad maintainer.
- zanie 2mo agoThat project looks owned by https://github.com/karpetrosyan https://github.com/karpetrosyan who has contributed to httpx but is not the owner / maintainer in question
- i574n 2mo agoA network error occurred. Please check your connection and try again. If this issue persists please contact us through our help center at help.openai.com. yeah nice engineering clowns
- pullrun 2mo ago[dead]
- shay_ker 2mo agoi assume this is largely about the cybersecurity blitz, to ensure hot-path code is secure?
- mendapi 2mo ago[flagged]
- tulio_ribeiro 2mo agoAll this for an SDK you might not need. SDK is just a wrapper around POST https://api.openai.com/v1/responses https://api.openai.com/v1/responses Just REST + JSON. streaming (sse parsing) + tool calling + structured outputs + pagination are easy to do.