I've been on VCR.py 4.2.0, and am upgrading to 5.1.0. I'm also upgrading to python 3.10, and for various reasons, I have to upgrade urllib3 to v2.
When I run a cassette using urllib3 v2+ and a vcrpy version above 4.2.1, it causes the body of a cassette-saved response to return a string but without decoding the characters from utf-8.
Here's how the body of one requests response looks, in python 3.8.12 / vcr 4.2.0 / urllib3 1.26.7:
I've been on VCR.py 4.2.0, and am upgrading to 5.1.0. I'm also upgrading to python 3.10, and for various reasons, I have to upgrade urllib3 to v2.
When I run a cassette using urllib3 v2+ and a vcrpy version above 4.2.1, it causes the body of a cassette-saved response to return a string but without decoding the characters from utf-8.
Here's how the body of one
requests
response looks, in python 3.8.12 / vcr 4.2.0 / urllib3 1.26.7:And in 3.10.13, with vcr.py 5.1.0 and urllib3 2.1.0 (though I've tested it with everything above 4.2.1.):
And here's the cassette it's playing back:
Thanks for your work! Happy to try to solve this one and put it in a PR, any help in pointing it in the right direction would be appreciated.