pypi / vcrpy
vcrpy
What changed in vcrpy 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
1 breaking1 security4 new APIs and options7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initvcrpy 813 changes
Breaking changes 1
Recording fails fast when a request or response contains a Python object the safe YAML loader cannot read back, rather than writing a cassette that breaks on replay.
Security 1
Cassettes are loaded with a safe YAML loader, preventing arbitrary code execution from untrusted cassettes while preserving support for existing cassettes.
New APIs and options 4
vcrpy adds support for niquests.
Builds a YAML serializer that supports custom Python object tags during recording and replay; register it per VCR instance with register_serializer.
Adds support for httpx 2.x.
Makes the request URL available on VCRHTTPResponse.
Fixes and other changes 7
Fixes stale keep-alive connection reuse across cassettes.
Errors are clearer when a cassette contains an unsupported YAML tag.
Invalid record_mode values are validated and raise a clear error.
Fixes compatibility with aiohttp 3.14.
Uses an explicit type check for the body check.
Accounts for modified requests when storing played cassettes, so drop_unused_requests honours before_record_request filtering.
Improves the error message when a matching request has already been consumed.