Repository navigation
chore: Require httpx2 2.17.0 or later - #218
Merged
Merged
Conversation
- Raise the httpx2 minimum in pyproject.toml from 2.10.0 to 2.17.0, and relock. - 2.17.0 stops async streamed responses from raising RuntimeError when they're closed at shutdown or by the garbage collector, and lets a cancelled aclose() be retried, so ClientX's streamed endpoints always close their response. - Add a Changed entry to CHANGELOG.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
pyproject.tomlfrom>=2.10.0to>=2.17.0, and relock. The lockfile already had 2.17.0 from chore: bump httpx2 from 2.16.2 to 2.17.0 #217.Changedentry toCHANGELOG.md.Why
httpx2 2.17.0 fixes two problems that affect ClientX's async streamed endpoints:
_aclose_when_donerelies on the event loop closing an abandoned stream when it's garbage-collected. In that case, older versions could raiseRuntimeError: aclose(): asynchronous generator is already running.Response.aclose()be retried pydantic/httpx2#1353: ifaclose()was cancelled, the response was already marked as closed and the stream stayed open. Now a second call closes it.Requests also use less CPU. Users on older httpx2 versions wouldn't get any of this.
Because of the
Changedsection,make release-prwill make the next release a minor version.Testing
make check: lint, type check, and 403 tests pass.uv run --resolution lowest-direct --isolated pytest: 403 tests pass on the lowest versions allowed.🤖 Generated with Claude Code