httpcore2 2.15.0__tar.gz → 2.16.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.
- {httpcore2-2.15.0 → httpcore2-2.16.0}/CHANGELOG.md +11 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/PKG-INFO +12 -1
- httpcore2-2.16.0/httpcore2/_ssl.py +40 -0
- httpcore2-2.15.0/httpcore2/_ssl.py +0 -12
- {httpcore2-2.15.0 → httpcore2-2.16.0}/.gitignore +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/LICENSE.md +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/README.md +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/__init__.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_api.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/__init__.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/connection.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/connection_pool.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/http11.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/http2.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/http_proxy.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/interfaces.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_async/socks_proxy.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/__init__.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/anyio.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/auto.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/base.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/mock.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/sync.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_backends/trio.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_exceptions.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_models.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/__init__.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/connection.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/connection_pool.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/http11.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/http2.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/http_proxy.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/interfaces.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_sync/socks_proxy.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_synchronization.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_trace.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/_utils.py +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/httpcore2/py.typed +0 -0
- {httpcore2-2.15.0 → httpcore2-2.16.0}/pyproject.toml +0 -0
|
@@ -4,6 +4,17 @@ 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.16.0 (October 21st, 2026)
|
|
8
|
+
|
|
9
|
+
No changes since `2.15.1`. Version bumped to stay in lockstep with `httpx2`.
|
|
10
|
+
|
|
11
|
+
## 2.15.1 (October 19th, 2026)
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
* Configure the default SSL context once on Linux, instead of on every handshake. With OpenSSL older than 3.4, CPU usage grew over the lifetime of a reused client.
|
|
16
|
+
([#1253](https://github.com/pydantic/httpx2/pull/1253))
|
|
17
|
+
|
|
7
18
|
## 2.15.0 (October 19th, 2026)
|
|
8
19
|
|
|
9
20
|
### Removed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: httpcore2
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.16.0
|
|
4
4
|
Summary: A minimal low-level HTTP client.
|
|
5
5
|
Project-URL: Changelog, https://github.com/pydantic/httpx2/blob/main/src/httpcore2/CHANGELOG.md
|
|
6
6
|
Project-URL: Homepage, https://github.com/pydantic/httpx2
|
|
@@ -151,6 +151,17 @@ All notable changes to this project will be documented in this file.
|
|
|
151
151
|
|
|
152
152
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
153
153
|
|
|
154
|
+
## 2.16.0 (October 21st, 2026)
|
|
155
|
+
|
|
156
|
+
No changes since `2.15.1`. Version bumped to stay in lockstep with `httpx2`.
|
|
157
|
+
|
|
158
|
+
## 2.15.1 (October 19th, 2026)
|
|
159
|
+
|
|
160
|
+
### Fixed
|
|
161
|
+
|
|
162
|
+
* Configure the default SSL context once on Linux, instead of on every handshake. With OpenSSL older than 3.4, CPU usage grew over the lifetime of a reused client.
|
|
163
|
+
([#1253](https://github.com/pydantic/httpx2/pull/1253))
|
|
164
|
+
|
|
154
165
|
## 2.15.0 (October 19th, 2026)
|
|
155
166
|
|
|
156
167
|
### Removed
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import platform
|
|
3
|
+
import re
|
|
4
|
+
import ssl
|
|
5
|
+
|
|
6
|
+
import truststore
|
|
7
|
+
|
|
8
|
+
# Mirrors `truststore`'s Linux fallbacks for when OpenSSL's compiled-in paths are unusable:
|
|
9
|
+
# https://github.com/sethmlarson/truststore/blob/0714f72a739d182cdb8502f4e1bb4cf7ebfe4eb5/src/truststore/_openssl.py#L8-L19
|
|
10
|
+
CA_FILE_CANDIDATES = [
|
|
11
|
+
"/etc/ssl/cert.pem",
|
|
12
|
+
"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem",
|
|
13
|
+
"/etc/pki/tls/cert.pem",
|
|
14
|
+
"/etc/ssl/certs/ca-certificates.crt",
|
|
15
|
+
"/etc/ssl/ca-bundle.pem",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# `_trust_env` is internal to `httpx2`; drop it with the Linux branch below once sethmlarson/truststore#213 ships.
|
|
20
|
+
def default_ssl_context(*, _trust_env: bool = True) -> ssl.SSLContext:
|
|
21
|
+
if _trust_env and (cafile := os.environ.get("SSL_CERT_FILE")): # pragma: no cover
|
|
22
|
+
return ssl.create_default_context(cafile=cafile)
|
|
23
|
+
if _trust_env and (capath := os.environ.get("SSL_CERT_DIR")): # pragma: no cover
|
|
24
|
+
return ssl.create_default_context(capath=capath)
|
|
25
|
+
if platform.system() in ("Windows", "Darwin"): # pragma: no cover
|
|
26
|
+
return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
|
27
|
+
# `truststore` re-adds verify paths per handshake, which OpenSSL < 3.4 accumulates (sethmlarson/truststore#212).
|
|
28
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
|
29
|
+
# Compiled-in paths, since `set_default_verify_paths()` would read `SSL_CERT_*`.
|
|
30
|
+
paths = ssl.get_default_verify_paths()
|
|
31
|
+
cafile = paths.openssl_cafile if os.path.isfile(paths.openssl_cafile) else None
|
|
32
|
+
capath = paths.openssl_capath if os.path.isdir(paths.openssl_capath) else None
|
|
33
|
+
if capath and not cafile: # pragma: no cover
|
|
34
|
+
if not any(re.fullmatch(r"[0-9a-fA-F]{8}\.\d", f) for f in os.listdir(capath)):
|
|
35
|
+
capath = None
|
|
36
|
+
if not cafile and not capath: # pragma: no cover
|
|
37
|
+
cafile = next(filter(os.path.isfile, CA_FILE_CANDIDATES), None)
|
|
38
|
+
if cafile or capath:
|
|
39
|
+
ctx.load_verify_locations(cafile, capath)
|
|
40
|
+
return ctx
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import ssl
|
|
3
|
-
|
|
4
|
-
import truststore
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def default_ssl_context() -> ssl.SSLContext:
|
|
8
|
-
if cafile := os.environ.get("SSL_CERT_FILE"): # pragma: no cover
|
|
9
|
-
return ssl.create_default_context(cafile=cafile)
|
|
10
|
-
if capath := os.environ.get("SSL_CERT_DIR"): # pragma: no cover
|
|
11
|
-
return ssl.create_default_context(capath=capath)
|
|
12
|
-
return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
|
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
|
|
File without changes
|
|
File without changes
|