OpenAI: Migrating to HTTPX2

(github.com)

49 points | by tosh 1 hour ago

5 comments

  • simonw 58 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.

    • networked 33 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.)
      • simonw 13 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.
    • rolymath 33 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).

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

        Happens with the Linux kernel as well.

      • Longwelwind 22 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.

  • londons_explore 1 hour ago
    There seems to be a bunch of downsides mentioned...

    But what are the upsides of this change?

  • tosh 1 hour ago
    nb: operating system TLS trust store is used now (instead of certifi)
  • ledoncool 1 hour ago
    Wow, finally...
  • preetham_rangu 13 minutes ago
    [flagged]