github kevin1024/vcrpy v8.4.0

4 hours ago

What's Changed

Behavior change: the all record mode

  • Fix re-recording in the all record mode (#1071, fixes #578 and #208):
    • A re-recorded interaction now replaces the interaction it matches. Before, the new one was saved next to the old one, and the stale response was replayed first on the next run.
    • With drop_unused_requests=True, the cassette is now replaced with only what was just recorded. Before, it was saved empty.
    • Behavior change: re-recording now removes every previously recorded interaction that matches a new one under your match_on setting. With loose matchers (e.g. match_on=["method"]), one new request can replace many old ones. Cassettes re-recorded in all mode also no longer accumulate responses across runs.

Fixes

  • Fix httpx and httpx2 replay crashing on cassettes that store a null reason phrase, which includes cassettes recorded before 8.2.0 (#1028, #1029). Thanks @dgunning
  • Fix bare-host URLs such as https://example.com not matching cassettes that recorded them as https://example.com/, a regression in 8.2.0 (#1013, #1031). The uri matcher is otherwise as strict as before. Thanks @DSeaStar
  • Fix AttributeError: 'VCRFakeSocket' object has no attribute 'gettimeout' when niquests reuses a pooled connection with urllib3-future 2.25.901 or later (#1056). Thanks @pylaterreur
  • Streaming (file-like or iterator) request bodies are now forwarded with Content-Length instead of chunked encoding, which some servers reject (#1002)

Maintenance

Full Changelog: v8.3.0...v8.4.0

Don't miss a new vcrpy release

NewReleases is sending notifications on new releases.