Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2.27.0 (2022-01-03)
Improvements
Officially added support for Python 3.10. (Add support for 3.10 #5928)
Added a
requests.exceptions.JSONDecodeError
to unify JSON exceptions betweenPython 2 and 3. This gets raised in the
response.json()
method, and isbackwards compatible as it inherits from previously thrown exceptions.
Can be caught from
requests.exceptions.RequestException
as well. (Fix inconsistent exception type in response.json() method #5856)Improved error text for misnamed
InvalidSchema
andMissingSchema
exceptions. This is a temporary fix until exceptions can be renamed
(Schema->Scheme). (Fix erroneous use of 'schema' instead of 'scheme' #6017)
Improved proxy parsing for proxy URLs missing a scheme. This will address
recent changes to
urlparse
in Python 3.9+. (Move from urlparse to parse_url for prepending schemes #5917)Bugfixes
Fixed defect in
extract_zipped_paths
which could result in an infinite loopfor some paths. (Fix extract_zipped_paths infinite loop when provided invalid unc path #5851)
Fixed handling for
AttributeError
when calculating length of files obtainedby
Tarfile.extractfile()
. (Catch AttributeError in utils.super_len #5239)Fixed urllib3 exception leak, wrapping
urllib3.exceptions.InvalidHeader
withrequests.exceptions.InvalidHeader
. (Appropriately handle urllib3's InvalidHeader exception #5914)Fixed bug where two Host headers were sent for chunked requests. (Send only one Host header in chunked request #5391)
Fixed regression in Requests 2.26.0 where
Proxy-Authorization
wasincorrectly stripped from all requests sent with
Session.send
. (Refactor rebuild_proxies to separate resolution and auth handling #5924)Fixed performance regression in 2.26.0 for hosts with a large number of
proxies available in the environment. (Refactor rebuild_proxies to separate resolution and auth handling #5924)
Fixed idna exception leak, wrapping
UnicodeError
withrequests.exceptions.InvalidURL
for URLs with a leading dot (.) in thedomain. (Raise InvalidUrl if host starts with '.' character. #5414)
Deprecations
don't have exact dates, Requests 2.27.x is likely to be the last release
series providing support.