Read the v2.0 migration guide for help upgrading to the latest version of urllib3.
- Changed
HTTPResponse.read()
to raise an error when calling withdecode_content=False
after usingdecode_content=True
to prevent data loss (#2800). - Changed
HTTPResponse.getheaders()
and.getheader()
to previous behavior in 1.26.x. Instead we are deprecating these methods in favor ofHTTPResponse.headers.items()
andHTTPResponse.headers.get()
. Both deprecated methods will be removed in v2.1.0 (#2814) - Fixed an issue where parsing a URL with leading zeroes in the port would be rejected even when the port number after removing the zeroes was valid. (#2806)
- Fixed deprecation warning when using cryptography v39.0.0. This fix requires using pyOpenSSL>=17.1.0 and cryptography>=1.9. (#2829)