Skip to content

v2.16.2

Latest

Choose a tag to compare

@Kludex Kludex released this 16 Nov 10:08
781ea16

🩹 Type aliases evaluate at runtime again

httpx2 and httpcore2 2.16.2 are a patch release with one fix. You will notice it if your code, or a library you depend on, uses the aliases in httpx2._types inside a runtime typing construct. On 2.16.1, import mistralai.client failed on Python 3.11 to 3.13.

pip install --upgrade httpx2==2.16.2
  • Optional[QueryParamTypes] and QueryParamTypes | None work again (#1346). In 2.16.1 URLTypes, QueryParamTypes, HeaderTypes, CookieTypes, TimeoutTypes, ProxyTypes and AuthTypes were strings. Optional[...] raised SyntaxError for QueryParamTypes and HeaderTypes, and | None raised TypeError for all seven. They are Union[...] objects again, as in 2.16.0.

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

Full changelog: v2.16.1...v2.16.2