github pydantic/httpx2 v2.17.1

one hour ago

🦥 httpcore2 imports under PYTHON_LAZY_IMPORTS=all

httpx2 and httpcore2 2.17.1 are a patch release with one fix. You will notice it if you run Python 3.15 with PYTHON_LAZY_IMPORTS=all. On 2.17.0, httpx2.Client() and import httpcore2 failed in that mode.

pip install --upgrade httpx2==2.17.1
  • httpcore2 no longer fails to import with lazy imports enabled (#1367). It raised AttributeError: 'lazy_import' object has no attribute '__module__', because httpcore2/__init__.py set __module__ on names that were still lazy placeholders. Each class and function now sets it in the module that defines it, so public names still report httpcore2 as their module.

httpx2 has no changes. It is bumped to stay in lockstep with httpcore2.

⚠️ truststore still needs a release

httpx2.Client() can still fail in this mode with NameError: name '_api' is not defined, raised by truststore 0.10.5. That is fixed in sethmlarson/truststore#265, which is not in a release yet.

Full changelog: v2.17.0...v2.17.1

Don't miss a new httpx2 release

NewReleases is sending notifications on new releases.