httpcore2 2.14.0__tar.gz → 2.15.1__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.
Files changed (39) hide show
  1. {httpcore2-2.14.0 → httpcore2-2.15.1}/CHANGELOG.md +13 -0
  2. {httpcore2-2.14.0 → httpcore2-2.15.1}/PKG-INFO +15 -3
  3. httpcore2-2.15.1/httpcore2/_ssl.py +40 -0
  4. {httpcore2-2.14.0 → httpcore2-2.15.1}/pyproject.toml +1 -2
  5. httpcore2-2.14.0/httpcore2/_ssl.py +0 -12
  6. {httpcore2-2.14.0 → httpcore2-2.15.1}/.gitignore +0 -0
  7. {httpcore2-2.14.0 → httpcore2-2.15.1}/LICENSE.md +0 -0
  8. {httpcore2-2.14.0 → httpcore2-2.15.1}/README.md +0 -0
  9. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/__init__.py +0 -0
  10. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_api.py +0 -0
  11. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/__init__.py +0 -0
  12. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/connection.py +0 -0
  13. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/connection_pool.py +0 -0
  14. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/http11.py +0 -0
  15. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/http2.py +0 -0
  16. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/http_proxy.py +0 -0
  17. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/interfaces.py +0 -0
  18. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_async/socks_proxy.py +0 -0
  19. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/__init__.py +0 -0
  20. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/anyio.py +0 -0
  21. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/auto.py +0 -0
  22. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/base.py +0 -0
  23. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/mock.py +0 -0
  24. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/sync.py +0 -0
  25. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_backends/trio.py +0 -0
  26. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_exceptions.py +0 -0
  27. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_models.py +0 -0
  28. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/__init__.py +0 -0
  29. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/connection.py +0 -0
  30. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/connection_pool.py +0 -0
  31. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/http11.py +0 -0
  32. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/http2.py +0 -0
  33. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/http_proxy.py +0 -0
  34. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/interfaces.py +0 -0
  35. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_sync/socks_proxy.py +0 -0
  36. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_synchronization.py +0 -0
  37. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_trace.py +0 -0
  38. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/_utils.py +0 -0
  39. {httpcore2-2.14.0 → httpcore2-2.15.1}/httpcore2/py.typed +0 -0
@@ -4,6 +4,19 @@ 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.15.1 (October 19th, 2026)
8
+
9
+ ### Fixed
10
+
11
+ * 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.
12
+ ([#1253](https://github.com/pydantic/httpx2/pull/1253))
13
+
14
+ ## 2.15.0 (October 19th, 2026)
15
+
16
+ ### Removed
17
+
18
+ * Drop support for Python 3.10. ([#1274](https://github.com/pydantic/httpx2/pull/1274))
19
+
7
20
  ## 2.14.0 (October 18th, 2026)
8
21
 
9
22
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: httpcore2
3
- Version: 2.14.0
3
+ Version: 2.15.1
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
@@ -19,14 +19,13 @@ Classifier: License :: OSI Approved :: BSD License
19
19
  Classifier: Operating System :: OS Independent
20
20
  Classifier: Programming Language :: Python :: 3
21
21
  Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.10
23
22
  Classifier: Programming Language :: Python :: 3.11
24
23
  Classifier: Programming Language :: Python :: 3.12
25
24
  Classifier: Programming Language :: Python :: 3.13
26
25
  Classifier: Programming Language :: Python :: 3.14
27
26
  Classifier: Programming Language :: Python :: 3.15
28
27
  Classifier: Topic :: Internet :: WWW/HTTP
29
- Requires-Python: >=3.10
28
+ Requires-Python: >=3.11
30
29
  Requires-Dist: h11>=0.16
31
30
  Requires-Dist: truststore>=0.10
32
31
  Provides-Extra: asyncio
@@ -152,6 +151,19 @@ All notable changes to this project will be documented in this file.
152
151
 
153
152
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
154
153
 
154
+ ## 2.15.1 (October 19th, 2026)
155
+
156
+ ### Fixed
157
+
158
+ * 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.
159
+ ([#1253](https://github.com/pydantic/httpx2/pull/1253))
160
+
161
+ ## 2.15.0 (October 19th, 2026)
162
+
163
+ ### Removed
164
+
165
+ * Drop support for Python 3.10. ([#1274](https://github.com/pydantic/httpx2/pull/1274))
166
+
155
167
  ## 2.14.0 (October 18th, 2026)
156
168
 
157
169
  ### Fixed
@@ -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
@@ -20,7 +20,7 @@ name = "httpcore2"
20
20
  dynamic = ["readme", "version"]
21
21
  description = "A minimal low-level HTTP client."
22
22
  license = "BSD-3-Clause"
23
- requires-python = ">=3.10"
23
+ requires-python = ">=3.11"
24
24
  authors = [{ name = "Tom Christie", email = "tom@tomchristie.com" }]
25
25
  maintainers = [
26
26
  { name = "Pydantic Services Inc.", email = "engineering@pydantic.dev" },
@@ -36,7 +36,6 @@ classifiers = [
36
36
  "Operating System :: OS Independent",
37
37
  "Programming Language :: Python :: 3",
38
38
  "Programming Language :: Python :: 3 :: Only",
39
- "Programming Language :: Python :: 3.10",
40
39
  "Programming Language :: Python :: 3.11",
41
40
  "Programming Language :: Python :: 3.12",
42
41
  "Programming Language :: Python :: 3.13",
@@ -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