Repository navigation
test: bump vcrpy and drop the aiohttp stub patches 8.5.0 fixes - #997
Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intoOct 27, 2026
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Pierre-Yves Le Borgne (pylaterreur)
force-pushed
the
vcrpy-850-drop-aiohttp-stub-patches
branch
from
October 25, 2026 23:18
e86691e to
73cfe0a
Compare
vcrpy 8.5.0 includes kevin1024/vcrpy#1055, which fixes kevin1024/vcrpy#502 and kevin1024/vcrpy#927: a response streamed while recording keeps its body, a replayed response keeps a single aiohttp StreamReader as its content, so google-genai's readline() loop ends, and closing the response no longer poisons that stream. Since braintrustdata#834, conftest.py has skipped its patches for those (problems 1, 3 and 4) on such releases. Require vcrpy 8.5.0 in the test group and remove them, along with the shims only older vcrpy needed: the AsyncStreamReaderMixin placeholder, the stream_writer constructor and MockStream.iter_chunked. The gzip decoding in text() and read() stays. The weekly dependency update (braintrustdata#998) moved uv's exclude-newer cutoff past vcrpy 9.2.0's upload, so uv.lock already has vcrpy 9.2.0 on Python 3.11 and newer, and 8.5.0 on Python 3.10, which vcrpy 9 doesn't support. It only gains the new requirement, in the groups that include test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
Pierre-Yves Le Borgne (pylaterreur)
force-pushed
the
vcrpy-850-drop-aiohttp-stub-patches
branch
from
October 27, 2026 03:03
73cfe0a to
903035e
Compare
Abhijeet Prasad (AbhiPrasad)
approved these changes
Oct 27, 2026
Abhijeet Prasad (AbhiPrasad)
merged commit Oct 27, 2026
bd4ff59
into
braintrustdata:main
98 checks passed
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.
Summary
Follow-up to #834. VCR.py 8.5.0 is out with kevin1024/vcrpy#1055, which fixes kevin1024/vcrpy#502 (an aiohttp response streamed while recording came back empty) and kevin1024/vcrpy#927 (a replayed
response.contentrestarted on each access, so google-genai'sreadline()loop never ended). Since #834,_patch_vcr_aiohttp_stubs()inpy/src/braintrust/conftest.pyskips its patches for those on such releases, and its docstring says to delete them onceuv.lockhas one.Changes
vcrpy>=8.5.0to thetestdependency group. Since chore(deps): weekly dependency update #998,uv.lockalready has VCR.py 9.2.0 on Python 3.11 and newer, and 8.5.0 on Python 3.10, which VCR.py 9 doesn't support; it only gains the new requirement.content, no-opMockStream.set_exception,record_responsereplacement), and the shims that only older VCR.py needed: theAsyncStreamReaderMixinplaceholder, thestream_writerconstructor andMockStream.iter_chunked. VCR.py 8.5.0 does all of these itself. The gzip decoding intext()andread()stays.exclude-newercutoff: it's rebased onto chore(deps): weekly dependency update #998, whose cutoff (2026-10-26T06:02:31Z) already covers 9.2.0. On the old base, the cutoff the earlier push set (2026-10-25T22:30:00Z) also lettest_pydantic_ai_integration(latest)install anthropic 2.3.0 next to the oldpydantic-ai==2.57.0pin. Anthropic 2 madeBetaMessageParamaUnion, sotest_agent_run_anthropic_reasoning_tokensfailed withTypeError: Cannot instantiate typing.Unionin the previous CI run; chore(deps): weekly dependency update #998 moved the pin to 2.61.0, which works with it.VCR.py 9.0 has some breaking changes (release notes). Nothing in this repo matches on the
CannotOverwriteExistingCassetteExceptionmessage or usesfilter_post_data_parameters, and the sessions below pass with 9.2.0.Testing
nox sessions as CI runs them (
uv run --project ./py nox -f ./py/noxfile.py -s ..., Python 3.12, cassette replay):test_litellm(latest)test_litellm(1.74.0)test_dspy(latest)test_google_genai(latest)test_huggingface_hub(0.32.0)test_google_adk(latest)test_google_adk(2.6.3)test_google_adk(1.14.1)All six of CI's nox shards for Python 3.12 on Linux (
py/scripts/nox-matrix.py <n> 6 --python-version 3.12 --os ubuntu-24.04 --exclude-static-checks --exclude-session test_api_codegen) pass on this branch, as on main: 90 sessions, with the same installed packages in every session. On Python 3.10, where the lock has 8.5.0, the 3.10 shards pass too (75 sessions), andtest_litellm(1.74.0),test_google_genai(latest)andtest_huggingface_hub(0.32.0)have the same counts as above.test_pydantic_ai_integration(latest)passes on Python 3.11 to 3.15 (61 passed).These replays don't reach the bugs the patches were for: without the patches,
test_litellm(both versions),test_dspy(latest),test_google_genai(latest)andtest_google_adk(latest)also pass on VCR.py 8.4.0.test_google_genaihas no aiohttp, since google-genai makes it optional. With aiohttp added totest_google_genai(latest), as withgoogle-genai[aiohttp], this PR on VCR.py 8.4.0 hangs intest_basic_completion[async_stream](kevin1024/vcrpy#927). It passes on 8.5.0 (44 passed, 2 skipped), as main does on 8.4.0.Pre-commit hooks pass on the changed files, and
pylint --errors-onlyis clean onconftest.py.🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN