OpenAI: Migrating to HTTPX2
47 points by tosh 2 hours ago | 16 comments

simonw 55 minutes ago
Anthropic made the same change a few weeks after OpenAI did: 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#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.

reply
networked 29 minutes ago
So I guess HTTPX2 (https://github.com/pydantic/httpx2) is winning out over HTTPXYZ (https://codeberg.org/httpxyz/httpxyz)? I didn't switch to HTTPXYZ after the fork but have been watching it. (What I did was use urllib.request more and bite the Rust bullet with wreq, https://github.com/0x676e67/wreq-python, where it wasn't enough.)
reply
simonw 9 minutes ago
httpx2 is sponsored by Pydantic and has involvement from the new maintainer of Starlette, so it's off to a very strong start.
reply
rolymath 30 minutes ago
The 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).

reply
chme 18 minutes ago
That isn't confusing at all, if you know how maintained stable releases work.

Happens with the Linux kernel as well.

reply
Longwelwind 19 minutes ago
Isn'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.

reply
londons_explore 2 hours ago
There seems to be a bunch of downsides mentioned...

But what are the upsides of this change?

reply
ddorian43 60 minutes ago
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...

reply
philipallstar 57 minutes ago
It's like that time I started a primary school and then closed it because I hated that the overwhelming majority of employees were women.
reply
porridgeraisin 39 minutes ago
This has happened in many packages contributed to by this person. Mkdocs e.g
reply
tosh 2 hours ago
nb: operating system TLS trust store is used now (instead of certifi)
reply
zx8080 49 minutes ago
This could be a breaking change (for some corporate network environments).
reply
hmokiguess 2 hours ago
what's `nb` ?
reply
tosh 58 minutes ago
reply
hmokiguess 57 minutes ago
Thank you! :)
reply
ledoncool 2 hours ago
Wow, finally...
reply
preetham_rangu 9 minutes ago
[flagged]
reply