Fix DeprecationWarning raised by urllib3 1.26.13 (#246)
* Fix DeprecationWarning raised by urllib3 1.26.13 urllib3 has started to emit a DeprecationWarning whenever HTTPResponse.getheaders() is called since version 1.26.13. This changes the one place where this is done to instead use HTTPResponse.headers instead, which is the recommend way of retrieving the headers going forwards. Signed-off-by: Jeppe Fihl-Pearson <[email protected]> * Add CHANGELOG entry Signed-off-by: Jeppe Fihl-Pearson <[email protected]> Signed-off-by: Jeppe Fihl-Pearson <[email protected]>
This commit is contained in:
@@ -273,7 +273,7 @@ class Urllib3HttpConnection(Connection):
|
||||
method, full_url, url, orig_body, response.status, raw_data, duration
|
||||
)
|
||||
|
||||
return response.status, response.getheaders(), raw_data
|
||||
return response.status, response.headers, raw_data
|
||||
|
||||
def get_response_headers(self, response):
|
||||
return {header.lower(): value for header, value in response.headers.items()}
|
||||
|
||||
Reference in New Issue
Block a user