httpx2 2.8.0__tar.gz → 2.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {httpx2-2.8.0 → httpx2-2.9.0}/CHANGELOG.md +27 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/PKG-INFO +3 -8
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/__init__.py +2 -0
- httpx2-2.9.0/httpx2/_alias.py +58 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/.gitignore +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/LICENSE.md +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/README.md +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/__version__.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_api.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_auth.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_client.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_config.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_content.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_decoders.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_exceptions.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_main.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_models.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_multipart.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_sse.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_status_codes.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_transports/__init__.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_transports/asgi.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_transports/base.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_transports/default.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_transports/mock.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_transports/wsgi.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_types.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_urlparse.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_urls.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/_utils.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/py.typed +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/websockets/__init__.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/websockets/_api.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/websockets/_exceptions.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/websockets/_ping.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/httpx2/websockets/_transport.py +0 -0
- {httpx2-2.8.0 → httpx2-2.9.0}/pyproject.toml +0 -0
|
@@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
6
|
|
|
7
|
+
## 2.9.0 (July 23rd, 2026)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* Add `alias_httpx()`, letting applications make `import httpx` resolve to `httpx2` process-wide. ([#1077](https://github.com/pydantic/httpx2/pull/1077))
|
|
12
|
+
|
|
13
|
+
## 2.8.0 (July 23rd, 2026)
|
|
14
|
+
|
|
15
|
+
No changes since `2.7.0`. Version bumped to stay in lockstep with `httpcore2`.
|
|
16
|
+
|
|
17
|
+
## 2.7.0 (July 14th, 2026)
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
* Update the vendored `httpx-ws` to upstream v0.9.0. ([#1067](https://github.com/pydantic/httpx2/pull/1067))
|
|
22
|
+
|
|
23
|
+
## 2.6.0 (July 14th, 2026)
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
* Add native WebSocket support by vendoring `httpx-ws`, installable with `httpx2[ws]`. ([#1042](https://github.com/pydantic/httpx2/pull/1042))
|
|
28
|
+
* Add support for the `QUERY` HTTP method via `httpx2.query()` and `client.query()`. ([#1055](https://github.com/pydantic/httpx2/pull/1055))
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
* Allow `click` 8.4+ in the `cli` extra, dropping the upper bound. ([#1040](https://github.com/pydantic/httpx2/pull/1040))
|
|
33
|
+
|
|
7
34
|
## 2.5.0 (June 25th, 2026)
|
|
8
35
|
|
|
9
36
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: httpx2
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.0
|
|
4
4
|
Summary: The next generation HTTP client.
|
|
5
5
|
Project-URL: Changelog, https://github.com/pydantic/httpx2/blob/main/src/httpx2/CHANGELOG.md
|
|
6
6
|
Project-URL: Homepage, https://github.com/pydantic/httpx2
|
|
@@ -26,7 +26,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
26
26
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
27
27
|
Requires-Python: >=3.10
|
|
28
28
|
Requires-Dist: anyio>=4.10
|
|
29
|
-
Requires-Dist: httpcore2==2.
|
|
29
|
+
Requires-Dist: httpcore2==2.9.0
|
|
30
30
|
Requires-Dist: idna>=3.18
|
|
31
31
|
Requires-Dist: truststore>=0.10
|
|
32
32
|
Requires-Dist: typing-extensions>=4.5.0; python_version < '3.13'
|
|
@@ -190,12 +190,7 @@ inspiration around the lower-level networking details.
|
|
|
190
190
|
|
|
191
191
|
### Added
|
|
192
192
|
|
|
193
|
-
* Add
|
|
194
|
-
* Support `|` and `|=` operators for `Headers`. ([#1047](https://github.com/pydantic/httpx2/pull/1047))
|
|
195
|
-
|
|
196
|
-
### Fixed
|
|
197
|
-
|
|
198
|
-
* Allow IPv6 CIDR notation in `no_proxy`. ([#967](https://github.com/pydantic/httpx2/pull/967))
|
|
193
|
+
* Add `alias_httpx()`, letting applications make `import httpx` resolve to `httpx2` process-wide. ([#1077](https://github.com/pydantic/httpx2/pull/1077))
|
|
199
194
|
|
|
200
195
|
|
|
201
196
|
---
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from .__version__ import __description__, __title__, __version__
|
|
2
|
+
from ._alias import *
|
|
2
3
|
from ._api import *
|
|
3
4
|
from ._auth import *
|
|
4
5
|
from ._client import *
|
|
@@ -16,6 +17,7 @@ __all__ = [
|
|
|
16
17
|
"__description__",
|
|
17
18
|
"__title__",
|
|
18
19
|
"__version__",
|
|
20
|
+
"alias_httpx",
|
|
19
21
|
"ASGITransport",
|
|
20
22
|
"AsyncBaseTransport",
|
|
21
23
|
"AsyncByteStream",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import importlib
|
|
4
|
+
import importlib.abc
|
|
5
|
+
import importlib.machinery
|
|
6
|
+
import importlib.util
|
|
7
|
+
import sys
|
|
8
|
+
from collections.abc import Sequence
|
|
9
|
+
from types import ModuleType
|
|
10
|
+
|
|
11
|
+
__all__ = ["alias_httpx"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class _AliasLoader(importlib.abc.Loader):
|
|
15
|
+
_original_spec: importlib.machinery.ModuleSpec | None
|
|
16
|
+
|
|
17
|
+
def create_module(self, spec: importlib.machinery.ModuleSpec) -> ModuleType:
|
|
18
|
+
module = importlib.import_module("httpx2" + spec.name.removeprefix("httpx"))
|
|
19
|
+
self._original_spec = module.__spec__
|
|
20
|
+
return module
|
|
21
|
+
|
|
22
|
+
def exec_module(self, module: ModuleType) -> None:
|
|
23
|
+
module.__spec__ = self._original_spec
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class _AliasFinder(importlib.abc.MetaPathFinder):
|
|
27
|
+
def find_spec(
|
|
28
|
+
self,
|
|
29
|
+
fullname: str,
|
|
30
|
+
path: Sequence[str] | None = None,
|
|
31
|
+
target: ModuleType | None = None,
|
|
32
|
+
) -> importlib.machinery.ModuleSpec | None:
|
|
33
|
+
if fullname != "httpx" and not fullname.startswith("httpx."):
|
|
34
|
+
return None
|
|
35
|
+
real_name = "httpx2" + fullname.removeprefix("httpx")
|
|
36
|
+
if real_name not in sys.modules and importlib.util.find_spec(real_name) is None:
|
|
37
|
+
return None
|
|
38
|
+
return importlib.machinery.ModuleSpec(fullname, _AliasLoader())
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def alias_httpx() -> None:
|
|
42
|
+
"""
|
|
43
|
+
Make `import httpx` resolve to `httpx2`, process-wide.
|
|
44
|
+
|
|
45
|
+
Intended for applications migrating from `httpx`, so that dependencies still
|
|
46
|
+
importing `httpx` share the `httpx2` classes. Libraries should never call this.
|
|
47
|
+
|
|
48
|
+
Must be called before anything imports `httpx`. Calling it again is a no-op.
|
|
49
|
+
"""
|
|
50
|
+
import httpx2
|
|
51
|
+
|
|
52
|
+
existing = sys.modules.get("httpx")
|
|
53
|
+
if existing is not None and existing is not httpx2:
|
|
54
|
+
raise RuntimeError("httpx was already imported; call `alias_httpx()` before any `import httpx`.")
|
|
55
|
+
|
|
56
|
+
if not any(isinstance(finder, _AliasFinder) for finder in sys.meta_path):
|
|
57
|
+
sys.meta_path.insert(0, _AliasFinder())
|
|
58
|
+
sys.modules["httpx"] = httpx2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|