Skip to content

Commit 04f3804

Browse files
authored
Version 2.3.0 (#1006)
1 parent 91af735 commit 04f3804

9 files changed

Lines changed: 45 additions & 23 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
shell: bash
3131

3232
- name: Run the benchmarks
33-
uses: CodSpeedHQ/action@3194d9a39c4d46684cb44bf7207fc56626aad8fd # v4
33+
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0
3434
with:
3535
mode: instrumentation
3636
run: uv run pytest tests/test_benchmark.py --codspeed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The HTTPX2 project relies on these excellent libraries:
117117
* `httpcore2` - The underlying transport implementation for `httpx2`.
118118
* `h11` - HTTP/1.1 support.
119119
* `anyio` - Structured concurrency primitives, used to support both `asyncio` and `trio`.
120-
* `certifi` - SSL certificates.
120+
* `truststore` - SSL verification using the operating system's trust store.
121121
* `idna` - Internationalized domain name support.
122122

123123
As well as these optional installs:
@@ -127,7 +127,7 @@ As well as these optional installs:
127127
* `rich` - Rich terminal support. *(Optional, with `httpx2[cli]`)*
128128
* `click` - Command line client support. *(Optional, with `httpx2[cli]`)*
129129
* `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx2[brotli]`)*
130-
* `zstandard` - Decoding for "zstd" compressed responses on Python 3.13 and below. *(Optional, with `httpx2[zstd]`. On Python 3.14+, `zstd` is supported natively via the stdlib [`compression.zstd`](https://docs.python.org/3/library/compression.zstd.html) module.)*
130+
* `zstandard` - Decoding for "zstd" compressed responses on Python 3.13 and below. *(Optional, with `httpx2[zstd]`. On Python 3.14+, `zstd` is supported via the stdlib [`compression.zstd`](https://docs.python.org/3/library/compression.zstd.html) module when it is available; the `httpx2[zstd]` extra installs nothing there, so decoding falls back to `zstandard` only on 3.13 and below.)*
131131

132132
A huge amount of credit is due to `requests` for the API layout that
133133
much of this work follows, as well as to `urllib3` for plenty of design

docs/advanced/ssl.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@ You can disable SSL verification completely and allow insecure requests...
2020

2121
If you're using a `Client()` instance you should pass any `verify=<...>` configuration when instantiating the client.
2222

23-
By default the [certifi CA bundle](https://certifiio.readthedocs.io/en/latest/) is used for SSL verification.
23+
By default the operating system's trust store is used for SSL verification, via [the `truststore` package](https://truststore.readthedocs.io/).
2424

2525
For more complex configurations you can pass an [SSL Context](https://docs.python.org/3/library/ssl.html) instance...
2626

2727
```python
28-
import certifi
29-
import httpx2
3028
import ssl
29+
import truststore
30+
import httpx2
3131

3232
# This SSL context is equivalent to the default `verify=True`.
33-
ctx = ssl.create_default_context(cafile=certifi.where())
33+
ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
3434
client = httpx2.Client(verify=ctx)
3535
```
3636

37-
Using [the `truststore` package](https://truststore.readthedocs.io/) to support system certificate stores...
37+
Using [the `certifi` CA bundle](https://certifiio.readthedocs.io/en/latest/) instead of the system trust store...
3838

3939
```python
40-
import ssl
41-
import truststore
40+
import certifi
4241
import httpx2
42+
import ssl
4343

44-
# Use system certificate stores.
45-
ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
44+
# Use the certifi CA bundle.
45+
ctx = ssl.create_default_context(cafile=certifi.where())
4646
client = httpx2.Client(verify=ctx)
4747
```
4848

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The HTTPX2 project relies on these excellent libraries:
108108
* `httpcore2` - The underlying transport implementation for `httpx2`.
109109
* `h11` - HTTP/1.1 support.
110110
* `anyio` - Structured concurrency primitives, used to support both `asyncio` and `trio`.
111-
* `certifi` - SSL certificates.
111+
* `truststore` - SSL verification using the operating system's trust store.
112112
* `idna` - Internationalized domain name support.
113113

114114
As well as these optional installs:
@@ -118,7 +118,7 @@ As well as these optional installs:
118118
* `rich` - Rich terminal support. *(Optional, with `httpx2[cli]`)*
119119
* `click` - Command line client support. *(Optional, with `httpx2[cli]`)*
120120
* `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx2[brotli]`)*
121-
* `zstandard` - Decoding for "zstd" compressed responses on Python 3.13 and below. *(Optional, with `httpx2[zstd]`. On Python 3.14+, `zstd` is supported natively via the stdlib [`compression.zstd`][] module.)*
121+
* `zstandard` - Decoding for "zstd" compressed responses on Python 3.13 and below. *(Optional, with `httpx2[zstd]`. On Python 3.14+, `zstd` is supported via the stdlib [`compression.zstd`][] module when it is available; the `httpx2[zstd]` extra installs nothing there, so decoding falls back to `zstandard` only on 3.13 and below.)*
122122

123123
A huge amount of credit is due to `requests` for the API layout that
124124
much of this work follows, as well as to `urllib3` for plenty of design

docs/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ b'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'
101101
Any `gzip` and `deflate` HTTP response encodings will automatically
102102
be decoded for you. If `brotlipy` is installed, then the `brotli` response
103103
encoding will be supported. The `zstd` response encoding is supported
104-
natively on Python 3.14+ via the stdlib [`compression.zstd`][]
105-
module; on Python 3.13 and below it requires the `zstandard` package.
104+
on Python 3.14+ via the stdlib [`compression.zstd`][] module when it is
105+
available; on Python 3.13 and below it requires the `zstandard` package.
106106

107107
For example, to create an image from binary data returned by a request, you can use the following code:
108108

src/httpcore2/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## 2.3.0 (June 1st, 2026)
8+
9+
### Changed
10+
11+
* Use `truststore` instead of `certifi` for default SSL verification, loading the operating system's trust store. ([#1002](https://github.com/pydantic/httpx2/pull/1002))
12+
* Rewrite `_assign_requests_to_connections` as a single-pass loop. ([#974](https://github.com/pydantic/httpx2/pull/974))
13+
* Use `anyio`'s `fast_acquire` for `Lock` and `Semaphore`. ([#970](https://github.com/pydantic/httpx2/pull/970))
14+
* Use `memoryview` in `write()` to avoid copies. ([#954](https://github.com/pydantic/httpx2/pull/954))
15+
716
## 2.2.0 (May 16th, 2026)
817

918
No changes since `2.1.0`. Version bumped to stay in lockstep with `httpx2`.

src/httpcore2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The motivation for `httpcore` is:
8585
The `httpcore` package has the following dependencies...
8686

8787
* `h11`
88-
* `certifi`
88+
* `truststore`
8989

9090
And the following optional extras...
9191

src/httpx2/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## 2.3.0 (June 1st, 2026)
8+
9+
### Changed
10+
11+
* Use `truststore` instead of `certifi` for default SSL verification, loading the operating system's trust store. ([#209](https://github.com/pydantic/httpx2/pull/209))
12+
13+
### Fixed
14+
15+
* Raise when `verify` is a string path and a client-side `cert` is also provided to `create_ssl_context`. ([#990](https://github.com/pydantic/httpx2/pull/990))
16+
* Allow a `default_encoding` callable to return `None`. ([#951](https://github.com/pydantic/httpx2/pull/951))
17+
* Make the `zstd` import optional on Python 3.14. ([#1000](https://github.com/pydantic/httpx2/pull/1000))
18+
* Store elapsed time on the stream wrapper to avoid reference cycles. ([#948](https://github.com/pydantic/httpx2/pull/948))
19+
720
## 2.2.0 (May 16th, 2026)
821

922
### Fixed

uv.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)