Changelog
### 6.0.1
```
Bugfix with to Tornado cassette generator (thanks graingert)
```
### 6.0.0
```
- **BREAKING**: Fix issue with httpx support (thanks parkerhancock) in 784. NOTE: You may have to recreate some of your cassettes produced in previous releases due to the binary format being saved incorrectly in previous releases
- **BREAKING**: Drop support for `boto` (vcrpy still supports boto3, but is dropping the deprecated `boto` support in this release. (thanks jairhenrique)
- Fix compatibility issue with Python 3.12 (thanks hartwork)
- Drop simplejson (fixes some compatibility issues) (thanks jairhenrique)
- Run CI on Python 3.12 and PyPy 3.9-3.10 (thanks mgorny)
- Various linting and docs improvements (thanks jairhenrique)
- Tornado fixes (thanks graingert)
```
### 5.1.0
```
- Use ruff for linting (instead of current flake8/isort/pyflakes) - thanks jairhenrique
- Enable rule B (flake8-bugbear) on ruff - thanks jairhenrique
- Configure read the docs V2 - thanks jairhenrique
- Fix typo in docs - thanks quasimik
- Make json.loads of Python >=3.6 decode bytes by itself - thanks hartwork
- Fix body matcher for chunked requests (fixes 734) - thanks hartwork
- Fix query param filter for aiohttp (fixes 517) - thanks hartwork and salomvary
- Remove unnecessary dependency on six. - thanks charettes
- build(deps): update sphinx requirement from <7 to <8 - thanks jairhenrique
- Add action to validate docs - thanks jairhenrique
- Add editorconfig file - thanks jairhenrique
- Drop iscoroutinefunction fallback function for unsupported python thanks jairhenrique
```
### 5.0.0
```
- BREAKING CHANGE: Drop support for Python 3.7. 3.7 is EOL as of 6/27/23 Thanks jairhenrique
- BREAKING CHANGE: Custom Cassette persisters no longer catch ValueError. If you have implemented a custom persister (has anyone implemented a custom persister? Let us know!) then you will need to throw a CassetteNotFoundError when unable to find a cassette. See 681 for discussion and reason for this change. Thanks amosjyng for the PR and the review from hartwork
```
### 4.4.0
```
- HUGE thanks to hartwork for all the work done on this release!
- Bring vcr/unittest in to vcrpy as a full feature of vcr instead of a separate library. Big thanks to hartwork for doing this and to agriffis for originally creating the library
- Make decompression robust towards already decompressed input (thanks hartwork)
- Bugfix: Add read1 method (fixes compatibilitywith biopython), thanks mghantous
- Bugfix: Prevent filters from corrupting request (thanks abramclark)
- Bugfix: Add support for `response.raw.stream()` to fix urllib v2 compat
- Bugfix: Replace `assert` with `raise AssertionError`: fixes support for `PYTHONOPTIMIZE=1`
- Add pytest.mark.online to run test suite offline, thanks jspricke
- use python3 and pip3 binaries to ease debian packaging (thanks hartwork)
- Add codespell (thanks mghantous)
```
### 4.3.1
```
Support urllib3 v1 and v2. NOTE: there is an issue running urllib3 v2 on Python older than 3.10, so this is currently blocked in the requirements.
Hopefully we can resolve this situation in the future. Thanks to shifqu, hartwork, jairhenrique, pquentin, and vEpiphyte for your work on this.
```
### 4.3.0
```
* Add support for Python 3.11 (Thanks evgeni)
* Drop support for botocore <1.11.0 and requests <2.16.2 (thanks hartwork)
* Bugfix: decode_compressed_response raises exception on empty responses. Thanks CharString
* Don't save requests from decorated tests if decorated test fails (thanks dan-passaro)
* Fix not calling all the exit stack when record_on_exception is False (thanks Terseus)
* Various CI, documentation, testing, and formatting improvements (Thanks jairhenrique, dan-passaro, hartwork, and Terseus)
```
### 4.2.1
```
- Fix a bug where the first request in a redirect chain was not being recorded with aiohttp
- Various typos and small fixes, thanks jairhenrique, timgates42
```
### 4.2.0
```
* Drop support for python < 3.7, thanks jairhenrique, IvanMalison, AthulMuralidhar
* Various aiohttp bigfixes (thanks pauloromeira and boechat107)
* Bugfix: filter_post_data_parameters not working with aiohttp. Thank you vprakashplanview, scop, jairhenrique, and cinemascop89
* Bugfix: Some random misspellings (thanks scop)
* Migrate the CI suite to Github Actions from Travis (thanks jairhenrique and cclauss)
* Various documentation and code misspelling fixes (thanks scop and Justintime50)
* Bugfix: httpx support (select between allow_redirects/follow_redirects) (thanks immerrr)
```
### 4.1.1
```
* Fix HTTPX support for versions greater than 0.15 (thanks jairhenrique)
* Include a trailing newline on json cassettes (thanks AaronRobson)
```
### 4.1.0
```
- 4.1.0
- Add support for httpx!! (thanks herdigiorgi)
- Add the new `allow_playback_repeats` option (thanks tysonholub)
- Several aiohttp improvements (cookie support, multiple headers with same key) (Thanks pauloromeira)
- Use enums for record modes (thanks aaronbannin)
- Bugfix: Do not redirect on 304 in aiohttp (Thanks royjs)
- Bugfix: Fix test suite by switching to mockbin (thanks jairhenrique)
```
### 4.0.2
```
* Correct mock imports. Fixes 504
* Remove move dependency that was masking error from tox.ini
```
### 4.0.1
```
Fix logo alignment for PyPI release
```
### 4.0.0
```
- Remove Python2 support (hugovk)
- Add Python 3.8 TravisCI support (neozenith)
- Updated the logo to a modern material design (sean0x42)
```
### 3.0.0
```
- **This release is a breaking change** as it changes how `aiohttp` follows redirects and your cassettes may need to be re-recorded with this update.
- Fix multiple requests being replayed per single request in `aiohttp` stub 495 (nickdirienzo)
- Add support for request_info on mocked responses in `aiohttp` stub 495 (nickdirienzo)
- doc: fixed variable name (a -> cass) in an example for rewind 492 (yarikoptic)
```
### 2.1.1
```
- 2.1.1
- Format code with black (neozenith)
- Use latest pypy3 in Travis (hugovk)
- Improve documentation about custom matchers (gward)
- Fix exception when body is empty (keithprickett)
- Add `pytest-recording` to the documentation as an alternative Pytest plugin (Stranger6667)
- Fix yarl and python3.5 version issue (neozenith)
- Fix header matcher for boto3 - fixes 474 (simahawk)
```
### 2.1.0
```
Updates
- Add a rewind method to reset a cassette (thanks khamidou)
- New error message with more details on why the cassette failed to play a request (thanks arthurHamon2, neozenith)
- Handle connect tunnel URI (thanks jeking3)
- Add code coverage to the project (thanks neozenith)
- Drop support to python 3.4
- Add deprecation warning on python 2.7, next major release will drop python 2.7 support
Fixes
- Fix build problems on requests tests (thanks to dunossauro)
- Fix matching on 'body' failing when Unicode symbols are present in them (thanks valgur)
- Fix bugs on aiohttp integration (thanks graingert, steinnes, stj, lamenezes, lmazuel)
- Fix Biopython incompatibility (thanks rishab121)
- Fix Boto3 integration (thanks 1oglop1, arthurHamon2)
```
### 2.0.0
```
- Support python 3.7 (fix httplib2 and urllib2, thanks felixonmars)
- [356] Fixes `before_record_response` so the original response isn't changed (thanks kgraves)
- Fix requests stub when using proxy (thanks samuelfekete daneoshiga)
- (only for aiohttp stub) Drop support to python 3.4 asyncio.coroutine (aiohttp doesn't support python it anymore)
- Fix aiohttp stub to work with aiohttp client (thanks stj)
- Fix aiohttp stub to accept content type passed
- Improve docs (thanks adamchainz)
```
### 1.13.0
```
- Fix support to latest aiohttp version (3.3.2).
- Fix content-type bug in aiohttp stub.
- Properly save URL with query params properly when using aiohttp.
```
### 1.12.0
```
- Fix support to latest aiohttp version (3.2.1)
- Adapted setup to PEP508
- Support binary responses on aiohttp
- Dropped support for EOL python versions (2.6 and 3.3)
```
### 1.11.0
```
Allow injection of persistence methods + bugfixes (thanks j-funk and IvanMalison)
Support python 3.6 + CI tests (thanks derekbekoe and graingert)
Support pytest-asyncio coroutines (thanks graingert)
```
### 1.10.5
```
- Added a fix to httplib2 (thanks carlosds730)
- Fix an issue with aiohttp (thanks madninja)
- Add missing requirement yarl (thanks lamenezes),
- Remove duplicate mock triple (thanks FooBarQuaxx)
```
### 1.10.0
```
vcr.py now supports aiohttp!
```
### 1.9.0
```
- Add support for boto3 (thanks desdm, foorbarna).
- Fix deepcopy issue for response headers when `decode_compressed_response` is enabled (thanks nickdirienzo)
```
### 1.7.3
```
[188] `additional_matchers` kwarg on `use_casstte`. [191] Actually support passing multiple before_record_request functions (thanks agriffis).
```
### 1.7.2
```
[186] Get effective_url in tornado (thanks mvschaik), [187] Set request_time on Response object in tornado (thanks abhinav).
```
### 1.7.1
```
Patch `fetch_impl` instead of the entire HTTPClient class for Tornado (thanks abhinav).
```
### 1.6.1
```
[169] Support conditional requirements in old versions of pip, Fix RST parse errors generated by pandoc, [Tornado] Fix unsupported features exception not being raised, [166] content-aware body matcher.
```
### 1.6.0
```
[120] Tornado support (thanks abhinav), [147] packaging fixes (thanks graingert), [158] allow filtering post params in requests (thanks MrJohz), [140] add xmlrpclib support (thanks Diaoul).
```
### 1.5.2
```
directory (thanks gazpachoking).
```
### 1.4.0
```
Filter post data parameters (thanks eadmundo), support for posting files through requests, inject_cassette kwarg to access cassette from `use_cassette` decorated function, `with_current_defaults` actually works (thanks samstav).
```
### 1.2.0
```
Add custom_patches argument to VCR/Cassette objects to allow users to stub custom classes when cassettes become active.
```
### 1.1.4
```
Add force reset around calls to actual connection from stubs, to ensure compatibility with the version of httplib/urlib2 in python 2.7.9.
```
### 1.1.3
```
Fix python3 headers field (thanks rtaboada), fix boto test (thanks telaviv), fix new_episodes record mode (thanks jashugan), fix Windows connectionpool stub bug (thanks gazpachoking)
```
### 1.1.2
```
Also: Make json serialize error handling correct. Improve logging of match failures.
```
### 1.1.1
```
Use function signature preserving `wrapt.decorator` to write the
decorator portion of use_cassette in order to ensure compatibility with
py.test fixtures and python 2. Move all request filtering into the
`before_record_callable`.
```
### 1.1.0
```
- Move context management of use_cassette into CassetteContextDecorator so that a separate cassette is created for each invocation of a use_cassette decorated function.
- VCR now passes a callable to CassetteContextDecorator (instead of passing the arguments for cassette creation) so that changes to the VCRs default configuration can propagate to functions that have already been decorated.
- Add mock and contextlib2 as dependencies.
- Do all patching through mock.patch. This made it so that CassetteContextDecorators actually stack properly.
- Remove **enter** and **exit** from Cassette class.
- Add before_record_response hook to Cassette and VCR classes. This is mainly for the purpose of scrubbing responses.
- Version bump (1.0.3 -> 1.1.0).
- Remove contextdecorator dependency.
```
### 1.0.3
```
Fixes a bug with the requests 2.4 stub.
```
### 1.0.0
```
**BACKWARDS INCOMPATIBLE**: Please see the 'upgrade' section in the README.
Add support for filtering sensitive data from requests, matching query strings after the order changes and improving the built-in matchers, (thanks to mshytikov), support for ignoring requests to certain hosts, bump supported Python3 version to 3.4, fix some bugs with Boto support (thanks marusich), fix error with URL field capitalization in README (thanks simon-weber), added some log messages to help with debugging, added all_played property on cassette (thanks mshytikov)
```
### 0.6.0
```
Store response headers as a list since a HTTP response can have the same header twice (happens with set-cookie sometimes). This has the added benefit of preserving the order of headers. Thanks smallcode for the bug report leading to this change. I have made an effort to ensure backwards compatibility with the old cassettes' header storage mechanism, but if you want to upgrade to the new header storage, you should delete your cassettes and re-record them. Also this release adds better error messages (thanks msabramo) and adds support for using VCR as a decorator (thanks smallcode for the motivation)
```
### 0.5.0
```
Change the response_of method to responses_of since cassettes can now contain more than one response for a request. Since this changes the API, I'm bumping the version. Also includes 2 bugfixes: a better error message when attempting to overwrite a cassette file, and a fix for a bug with requests sessions (thanks msabramo)
```
### 0.4.0
```
Change default request recording behavior for multiple requests. If you make the same request multiple times to the same URL, the response might be different each time (maybe the response has a timestamp in it or something), so this will make the same request multiple times and save them all. Then, when you are replaying the cassette, the responses will be played back in the same order in which they were received. If you were making multiple requests to the same URL in a cassette before version 0.4.0, you might need to regenerate your cassette files. Also, removes support for the cassette.play_count counter API, since individual requests aren't unique anymore. A cassette might contain the same request several times. Also removes secure overwrite feature since that was breaking overwriting files in Windows, and fixes a bug preventing requests's automatic decompression from working
```
### 0.3.1
```
Fix issue causing full paths to be sent on the HTTP request line.
```
### 0.3.0
```
Backwards incompatible release - Added support for record modes, and changed the default recording behavior to the "once" record mode. Please see the documentation on record modes for more. Added support for custom request matching, and changed the default request matching behavior to match only on the URL and method. Also, improved the httplib mocking to add support for the HTTPConnection.send() method. This means that requests won't actually be sent until the response is read, since I need to record the entire request in order to match up the appropriate response. I don't think this should cause any issues unless you are sending requests without ever loading the response (which none of the standard httplib wrappers do, as far as I know. Thanks to fatuhoku for some of the ideas and the motivation behind this release.
```
### 0.2.1
```
This is a minor version increase to fix an installation issue
```
### 0.2.0
```
- Added configuration API, which lets you configure some settings on VCR (see the README).
- VCR no longer saves cassettes if they haven't changed at all (thanks sirpengi)
- VCR now supports JSON as well as YAML (thanks sirpengi).
- Added amazing new skeumorphic logo, thanks hairarrow.
```
### 0.1.0
```
_backwards incompatible release - delete your old cassette files_:
This release adds the ability to access the cassette to make assertions on it, as well as a major code refactor thanks to dlecocq. It also fixes a couple longstanding bugs with redirects and HTTPS. [3 and 4]
```
Links
- PyPI: https://pypi.org/project/vcrpy
- Changelog: https://data.safetycli.com/changelogs/vcrpy/
- Repo: https://github.com/kevin1024/vcrpy
This PR pins vcrpy to the latest release 6.0.1.
Changelog
### 6.0.1 ``` Bugfix with to Tornado cassette generator (thanks graingert) ``` ### 6.0.0 ``` - **BREAKING**: Fix issue with httpx support (thanks parkerhancock) in 784. NOTE: You may have to recreate some of your cassettes produced in previous releases due to the binary format being saved incorrectly in previous releases - **BREAKING**: Drop support for `boto` (vcrpy still supports boto3, but is dropping the deprecated `boto` support in this release. (thanks jairhenrique) - Fix compatibility issue with Python 3.12 (thanks hartwork) - Drop simplejson (fixes some compatibility issues) (thanks jairhenrique) - Run CI on Python 3.12 and PyPy 3.9-3.10 (thanks mgorny) - Various linting and docs improvements (thanks jairhenrique) - Tornado fixes (thanks graingert) ``` ### 5.1.0 ``` - Use ruff for linting (instead of current flake8/isort/pyflakes) - thanks jairhenrique - Enable rule B (flake8-bugbear) on ruff - thanks jairhenrique - Configure read the docs V2 - thanks jairhenrique - Fix typo in docs - thanks quasimik - Make json.loads of Python >=3.6 decode bytes by itself - thanks hartwork - Fix body matcher for chunked requests (fixes 734) - thanks hartwork - Fix query param filter for aiohttp (fixes 517) - thanks hartwork and salomvary - Remove unnecessary dependency on six. - thanks charettes - build(deps): update sphinx requirement from <7 to <8 - thanks jairhenrique - Add action to validate docs - thanks jairhenrique - Add editorconfig file - thanks jairhenrique - Drop iscoroutinefunction fallback function for unsupported python thanks jairhenrique ``` ### 5.0.0 ``` - BREAKING CHANGE: Drop support for Python 3.7. 3.7 is EOL as of 6/27/23 Thanks jairhenrique - BREAKING CHANGE: Custom Cassette persisters no longer catch ValueError. If you have implemented a custom persister (has anyone implemented a custom persister? Let us know!) then you will need to throw a CassetteNotFoundError when unable to find a cassette. See 681 for discussion and reason for this change. Thanks amosjyng for the PR and the review from hartwork ``` ### 4.4.0 ``` - HUGE thanks to hartwork for all the work done on this release! - Bring vcr/unittest in to vcrpy as a full feature of vcr instead of a separate library. Big thanks to hartwork for doing this and to agriffis for originally creating the library - Make decompression robust towards already decompressed input (thanks hartwork) - Bugfix: Add read1 method (fixes compatibilitywith biopython), thanks mghantous - Bugfix: Prevent filters from corrupting request (thanks abramclark) - Bugfix: Add support for `response.raw.stream()` to fix urllib v2 compat - Bugfix: Replace `assert` with `raise AssertionError`: fixes support for `PYTHONOPTIMIZE=1` - Add pytest.mark.online to run test suite offline, thanks jspricke - use python3 and pip3 binaries to ease debian packaging (thanks hartwork) - Add codespell (thanks mghantous) ``` ### 4.3.1 ``` Support urllib3 v1 and v2. NOTE: there is an issue running urllib3 v2 on Python older than 3.10, so this is currently blocked in the requirements. Hopefully we can resolve this situation in the future. Thanks to shifqu, hartwork, jairhenrique, pquentin, and vEpiphyte for your work on this. ``` ### 4.3.0 ``` * Add support for Python 3.11 (Thanks evgeni) * Drop support for botocore <1.11.0 and requests <2.16.2 (thanks hartwork) * Bugfix: decode_compressed_response raises exception on empty responses. Thanks CharString * Don't save requests from decorated tests if decorated test fails (thanks dan-passaro) * Fix not calling all the exit stack when record_on_exception is False (thanks Terseus) * Various CI, documentation, testing, and formatting improvements (Thanks jairhenrique, dan-passaro, hartwork, and Terseus) ``` ### 4.2.1 ``` - Fix a bug where the first request in a redirect chain was not being recorded with aiohttp - Various typos and small fixes, thanks jairhenrique, timgates42 ``` ### 4.2.0 ``` * Drop support for python < 3.7, thanks jairhenrique, IvanMalison, AthulMuralidhar * Various aiohttp bigfixes (thanks pauloromeira and boechat107) * Bugfix: filter_post_data_parameters not working with aiohttp. Thank you vprakashplanview, scop, jairhenrique, and cinemascop89 * Bugfix: Some random misspellings (thanks scop) * Migrate the CI suite to Github Actions from Travis (thanks jairhenrique and cclauss) * Various documentation and code misspelling fixes (thanks scop and Justintime50) * Bugfix: httpx support (select between allow_redirects/follow_redirects) (thanks immerrr) ``` ### 4.1.1 ``` * Fix HTTPX support for versions greater than 0.15 (thanks jairhenrique) * Include a trailing newline on json cassettes (thanks AaronRobson) ``` ### 4.1.0 ``` - 4.1.0 - Add support for httpx!! (thanks herdigiorgi) - Add the new `allow_playback_repeats` option (thanks tysonholub) - Several aiohttp improvements (cookie support, multiple headers with same key) (Thanks pauloromeira) - Use enums for record modes (thanks aaronbannin) - Bugfix: Do not redirect on 304 in aiohttp (Thanks royjs) - Bugfix: Fix test suite by switching to mockbin (thanks jairhenrique) ``` ### 4.0.2 ``` * Correct mock imports. Fixes 504 * Remove move dependency that was masking error from tox.ini ``` ### 4.0.1 ``` Fix logo alignment for PyPI release ``` ### 4.0.0 ``` - Remove Python2 support (hugovk) - Add Python 3.8 TravisCI support (neozenith) - Updated the logo to a modern material design (sean0x42) ``` ### 3.0.0 ``` - **This release is a breaking change** as it changes how `aiohttp` follows redirects and your cassettes may need to be re-recorded with this update. - Fix multiple requests being replayed per single request in `aiohttp` stub 495 (nickdirienzo) - Add support for request_info on mocked responses in `aiohttp` stub 495 (nickdirienzo) - doc: fixed variable name (a -> cass) in an example for rewind 492 (yarikoptic) ``` ### 2.1.1 ``` - 2.1.1 - Format code with black (neozenith) - Use latest pypy3 in Travis (hugovk) - Improve documentation about custom matchers (gward) - Fix exception when body is empty (keithprickett) - Add `pytest-recording` to the documentation as an alternative Pytest plugin (Stranger6667) - Fix yarl and python3.5 version issue (neozenith) - Fix header matcher for boto3 - fixes 474 (simahawk) ``` ### 2.1.0 ``` Updates - Add a rewind method to reset a cassette (thanks khamidou) - New error message with more details on why the cassette failed to play a request (thanks arthurHamon2, neozenith) - Handle connect tunnel URI (thanks jeking3) - Add code coverage to the project (thanks neozenith) - Drop support to python 3.4 - Add deprecation warning on python 2.7, next major release will drop python 2.7 support Fixes - Fix build problems on requests tests (thanks to dunossauro) - Fix matching on 'body' failing when Unicode symbols are present in them (thanks valgur) - Fix bugs on aiohttp integration (thanks graingert, steinnes, stj, lamenezes, lmazuel) - Fix Biopython incompatibility (thanks rishab121) - Fix Boto3 integration (thanks 1oglop1, arthurHamon2) ``` ### 2.0.0 ``` - Support python 3.7 (fix httplib2 and urllib2, thanks felixonmars) - [356] Fixes `before_record_response` so the original response isn't changed (thanks kgraves) - Fix requests stub when using proxy (thanks samuelfekete daneoshiga) - (only for aiohttp stub) Drop support to python 3.4 asyncio.coroutine (aiohttp doesn't support python it anymore) - Fix aiohttp stub to work with aiohttp client (thanks stj) - Fix aiohttp stub to accept content type passed - Improve docs (thanks adamchainz) ``` ### 1.13.0 ``` - Fix support to latest aiohttp version (3.3.2). - Fix content-type bug in aiohttp stub. - Properly save URL with query params properly when using aiohttp. ``` ### 1.12.0 ``` - Fix support to latest aiohttp version (3.2.1) - Adapted setup to PEP508 - Support binary responses on aiohttp - Dropped support for EOL python versions (2.6 and 3.3) ``` ### 1.11.0 ``` Allow injection of persistence methods + bugfixes (thanks j-funk and IvanMalison) Support python 3.6 + CI tests (thanks derekbekoe and graingert) Support pytest-asyncio coroutines (thanks graingert) ``` ### 1.10.5 ``` - Added a fix to httplib2 (thanks carlosds730) - Fix an issue with aiohttp (thanks madninja) - Add missing requirement yarl (thanks lamenezes), - Remove duplicate mock triple (thanks FooBarQuaxx) ``` ### 1.10.0 ``` vcr.py now supports aiohttp! ``` ### 1.9.0 ``` - Add support for boto3 (thanks desdm, foorbarna). - Fix deepcopy issue for response headers when `decode_compressed_response` is enabled (thanks nickdirienzo) ``` ### 1.7.3 ``` [188] `additional_matchers` kwarg on `use_casstte`. [191] Actually support passing multiple before_record_request functions (thanks agriffis). ``` ### 1.7.2 ``` [186] Get effective_url in tornado (thanks mvschaik), [187] Set request_time on Response object in tornado (thanks abhinav). ``` ### 1.7.1 ``` Patch `fetch_impl` instead of the entire HTTPClient class for Tornado (thanks abhinav). ``` ### 1.6.1 ``` [169] Support conditional requirements in old versions of pip, Fix RST parse errors generated by pandoc, [Tornado] Fix unsupported features exception not being raised, [166] content-aware body matcher. ``` ### 1.6.0 ``` [120] Tornado support (thanks abhinav), [147] packaging fixes (thanks graingert), [158] allow filtering post params in requests (thanks MrJohz), [140] add xmlrpclib support (thanks Diaoul). ``` ### 1.5.2 ``` directory (thanks gazpachoking). ``` ### 1.4.0 ``` Filter post data parameters (thanks eadmundo), support for posting files through requests, inject_cassette kwarg to access cassette from `use_cassette` decorated function, `with_current_defaults` actually works (thanks samstav). ``` ### 1.2.0 ``` Add custom_patches argument to VCR/Cassette objects to allow users to stub custom classes when cassettes become active. ``` ### 1.1.4 ``` Add force reset around calls to actual connection from stubs, to ensure compatibility with the version of httplib/urlib2 in python 2.7.9. ``` ### 1.1.3 ``` Fix python3 headers field (thanks rtaboada), fix boto test (thanks telaviv), fix new_episodes record mode (thanks jashugan), fix Windows connectionpool stub bug (thanks gazpachoking) ``` ### 1.1.2 ``` Also: Make json serialize error handling correct. Improve logging of match failures. ``` ### 1.1.1 ``` Use function signature preserving `wrapt.decorator` to write the decorator portion of use_cassette in order to ensure compatibility with py.test fixtures and python 2. Move all request filtering into the `before_record_callable`. ``` ### 1.1.0 ``` - Move context management of use_cassette into CassetteContextDecorator so that a separate cassette is created for each invocation of a use_cassette decorated function. - VCR now passes a callable to CassetteContextDecorator (instead of passing the arguments for cassette creation) so that changes to the VCRs default configuration can propagate to functions that have already been decorated. - Add mock and contextlib2 as dependencies. - Do all patching through mock.patch. This made it so that CassetteContextDecorators actually stack properly. - Remove **enter** and **exit** from Cassette class. - Add before_record_response hook to Cassette and VCR classes. This is mainly for the purpose of scrubbing responses. - Version bump (1.0.3 -> 1.1.0). - Remove contextdecorator dependency. ``` ### 1.0.3 ``` Fixes a bug with the requests 2.4 stub. ``` ### 1.0.0 ``` **BACKWARDS INCOMPATIBLE**: Please see the 'upgrade' section in the README. Add support for filtering sensitive data from requests, matching query strings after the order changes and improving the built-in matchers, (thanks to mshytikov), support for ignoring requests to certain hosts, bump supported Python3 version to 3.4, fix some bugs with Boto support (thanks marusich), fix error with URL field capitalization in README (thanks simon-weber), added some log messages to help with debugging, added all_played property on cassette (thanks mshytikov) ``` ### 0.6.0 ``` Store response headers as a list since a HTTP response can have the same header twice (happens with set-cookie sometimes). This has the added benefit of preserving the order of headers. Thanks smallcode for the bug report leading to this change. I have made an effort to ensure backwards compatibility with the old cassettes' header storage mechanism, but if you want to upgrade to the new header storage, you should delete your cassettes and re-record them. Also this release adds better error messages (thanks msabramo) and adds support for using VCR as a decorator (thanks smallcode for the motivation) ``` ### 0.5.0 ``` Change the response_of method to responses_of since cassettes can now contain more than one response for a request. Since this changes the API, I'm bumping the version. Also includes 2 bugfixes: a better error message when attempting to overwrite a cassette file, and a fix for a bug with requests sessions (thanks msabramo) ``` ### 0.4.0 ``` Change default request recording behavior for multiple requests. If you make the same request multiple times to the same URL, the response might be different each time (maybe the response has a timestamp in it or something), so this will make the same request multiple times and save them all. Then, when you are replaying the cassette, the responses will be played back in the same order in which they were received. If you were making multiple requests to the same URL in a cassette before version 0.4.0, you might need to regenerate your cassette files. Also, removes support for the cassette.play_count counter API, since individual requests aren't unique anymore. A cassette might contain the same request several times. Also removes secure overwrite feature since that was breaking overwriting files in Windows, and fixes a bug preventing requests's automatic decompression from working ``` ### 0.3.1 ``` Fix issue causing full paths to be sent on the HTTP request line. ``` ### 0.3.0 ``` Backwards incompatible release - Added support for record modes, and changed the default recording behavior to the "once" record mode. Please see the documentation on record modes for more. Added support for custom request matching, and changed the default request matching behavior to match only on the URL and method. Also, improved the httplib mocking to add support for the HTTPConnection.send() method. This means that requests won't actually be sent until the response is read, since I need to record the entire request in order to match up the appropriate response. I don't think this should cause any issues unless you are sending requests without ever loading the response (which none of the standard httplib wrappers do, as far as I know. Thanks to fatuhoku for some of the ideas and the motivation behind this release. ``` ### 0.2.1 ``` This is a minor version increase to fix an installation issue ``` ### 0.2.0 ``` - Added configuration API, which lets you configure some settings on VCR (see the README). - VCR no longer saves cassettes if they haven't changed at all (thanks sirpengi) - VCR now supports JSON as well as YAML (thanks sirpengi). - Added amazing new skeumorphic logo, thanks hairarrow. ``` ### 0.1.0 ``` _backwards incompatible release - delete your old cassette files_: This release adds the ability to access the cassette to make assertions on it, as well as a major code refactor thanks to dlecocq. It also fixes a couple longstanding bugs with redirects and HTTPS. [3 and 4] ```Links
- PyPI: https://pypi.org/project/vcrpy - Changelog: https://data.safetycli.com/changelogs/vcrpy/ - Repo: https://github.com/kevin1024/vcrpy