Migrating to HTTPX2

github.com

190 points by tosh 17 hours ago


simonw - 17 hours 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.

jklehm - 14 hours ago

Wonder if they evaluated httpx2 vs niquests: https://github.com/jawah/niquests

londons_explore - 17 hours ago

There seems to be a bunch of downsides mentioned...

But what are the upsides of this change?

i574n - 12 hours ago

A 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

delduca - 13 hours ago

Why this is in the frontpage?

tosh - 17 hours ago

nb: operating system TLS trust store is used now (instead of certifi)

- 15 hours ago
[deleted]
fsuts - 15 hours ago

Why is everyone so slow to move to http3?

ushakov - 13 hours ago

we 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

ironqcold - 14 hours ago

Oh, well... It was bound to happen eventually. I suppose there must be some advantages to such a solution.

KaiserPro - 14 hours ago

Why would you want to use HTTPX2 over say requests?

shay_ker - 11 hours ago

i assume this is largely about the cybersecurity blitz, to ensure hot-path code is secure?

- 15 hours ago
[deleted]
mendapi - 3 hours ago

[flagged]

preetham_rangu - 16 hours ago

[flagged]

pullrun - 11 hours ago

[dead]

igkougkousis - 13 hours ago

[flagged]

myshapeprotocol - 14 hours ago

[dead]

hno5b8kgpg - 15 hours ago

[dead]

CurbStomper - 15 hours ago

[dead]

ledoncool - 17 hours ago

[flagged]

karpetrosyan - 12 hours ago

Better migrate to https://zapros.dev from httpx maintainer

ZeroCool2u - 15 hours ago

The 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.