OpenAI: Migrating to HTTPX2

(github.com)

71 points | by tosh 2 hours ago

8 comments

  • simonw 1 hour 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.

    • Aurornis 7 minutes ago
      > 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 httpx maintainer closed off access to issues and discussions on the repo, has been ignoring PRs, and hasn’t updated it in a half a year.

      I don’t think there is any reason to consider httpx as a viable project any more. The Pydantic httpx fork has taken its place.

      • simonw 1 minute ago
        HTTPX stable hasn't had a release since December 2024, but there have been two dev releases of the 1.0 branch this month (after a gap since September 2025.)

        Unfortunately that 1.0 work is happening in a private repository.

        https://pypi.org/project/httpx/#history

    • superze 23 minutes ago
      The issue with httpx is that it has an obnoxious and toxic maintainer.
      • portly 20 minutes ago
        What happened?
        • beanjuiceII 10 minutes ago
          was probably chewing bubble gum on the wrong sidewalk
          • jatora 5 minutes ago
            this made me laugh even though i dont think i even get it. can you explain this please lol
    • networked 1 hour 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.)
      • kelvinjps10 1 minute ago
        in their README >Important

        We started this fork because there was no activity on HTTPX, a very popular Python HTTP library.

        A few weeks later, Pydantic started their own fork called HTTPX2. We decided to embrace this and support HTTPX2. We're upstreaming our fixes to HTTPX2 and in our opinion it should be the "blessed" fork. Pydantic can make this more successful than we ever can.

        See also https://tildeweb.nl/~michiel/httpx2.html

        Thanks for all your support!

        Sander & Michiel

      • simonw 44 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.
    • krzyk 8 minutes ago
      A bit strange considering "coding is solved".

      But seriously, migrating between different libs should be ~free for both Anthropic and OpenAI.

    • tonyhart7 14 minutes ago
      "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"

      wtf is going on

      • ClikeX 5 minutes ago
        Open Source disputes.
    • rolymath 1 hour 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 53 minutes ago
        That isn't confusing at all, if you know how maintained stable releases work.

        Happens with the Linux kernel as well.

      • hk__2 11 minutes ago
        There are a lot of large projects where X.1 is newer than Y.0. You release a new major version for breaking changes, but you backport security changes to previous major releases as well.
      • yard2010 24 minutes ago
        Tangibly related, did you know that odd versions of node don't get LTS, I found it odd at first
      • Longwelwind 53 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.

    • SimonWAds 27 minutes ago
      [flagged]
  • fsuts 4 minutes ago
    Why is everyone so slow to move to http3?
  • londons_explore 1 hour ago
    There seems to be a bunch of downsides mentioned...

    But what are the upsides of this change?

    • ddorian43 1 hour 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...

      • solox3 28 minutes ago
        Did this move improve the ratio of gender representation in the software development community?
        • superze 8 minutes ago
          Yes, httpx2 is now female since we all got pregnant by reading this fuckery.
      • philipallstar 1 hour 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.
      • porridgeraisin 1 hour ago
        This has happened in many packages contributed to by this person. Mkdocs e.g
      • dgellow 24 minutes ago
        That’s fair, good for the maintainer to consider his personal values with regards to projects he wants to spend his time on
  • tosh 2 hours ago
    nb: operating system TLS trust store is used now (instead of certifi)
  • ledoncool 1 hour ago
    Wow, finally...
  • preetham_rangu 44 minutes ago
    [flagged]
  • CurbStomper 18 minutes ago
    [dead]