Update urllib3==1.26.14

This commit is contained in:
JonnyWong16 2023-03-02 20:08:58 -08:00
commit 8e8cedd2ba
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 7 additions and 7 deletions

View file

@ -1,2 +1,2 @@
# This file is protected via CODEOWNERS # This file is protected via CODEOWNERS
__version__ = "1.26.13" __version__ = "1.26.14"

View file

@ -224,7 +224,7 @@ class AppEngineManager(RequestMethods):
) )
# Check if we should retry the HTTP response. # Check if we should retry the HTTP response.
has_retry_after = bool(http_response.getheader("Retry-After")) has_retry_after = bool(http_response.headers.get("Retry-After"))
if retries.is_retry(method, http_response.status, has_retry_after): if retries.is_retry(method, http_response.status, has_retry_after):
retries = retries.increment(method, url, response=http_response, _pool=self) retries = retries.increment(method, url, response=http_response, _pool=self)
log.debug("Retry: %s", url) log.debug("Retry: %s", url)

View file

@ -69,7 +69,7 @@ class NTLMConnectionPool(HTTPSConnectionPool):
log.debug("Request headers: %s", headers) log.debug("Request headers: %s", headers)
conn.request("GET", self.authurl, None, headers) conn.request("GET", self.authurl, None, headers)
res = conn.getresponse() res = conn.getresponse()
reshdr = dict(res.getheaders()) reshdr = dict(res.headers)
log.debug("Response status: %s %s", res.status, res.reason) log.debug("Response status: %s %s", res.status, res.reason)
log.debug("Response headers: %s", reshdr) log.debug("Response headers: %s", reshdr)
log.debug("Response data: %s [...]", res.read(100)) log.debug("Response data: %s [...]", res.read(100))
@ -101,7 +101,7 @@ class NTLMConnectionPool(HTTPSConnectionPool):
conn.request("GET", self.authurl, None, headers) conn.request("GET", self.authurl, None, headers)
res = conn.getresponse() res = conn.getresponse()
log.debug("Response status: %s %s", res.status, res.reason) log.debug("Response status: %s %s", res.status, res.reason)
log.debug("Response headers: %s", dict(res.getheaders())) log.debug("Response headers: %s", dict(res.headers))
log.debug("Response data: %s [...]", res.read()[:100]) log.debug("Response data: %s [...]", res.read()[:100])
if res.status != 200: if res.status != 200:
if res.status == 401: if res.status == 401:

View file

@ -666,7 +666,7 @@ class HTTPResponse(io.IOBase):
def getheaders(self): def getheaders(self):
warnings.warn( warnings.warn(
"HTTPResponse.getheaders() is deprecated and will be removed " "HTTPResponse.getheaders() is deprecated and will be removed "
"in urllib3 v2.1.0. Instead access HTTResponse.headers directly.", "in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.",
category=DeprecationWarning, category=DeprecationWarning,
stacklevel=2, stacklevel=2,
) )
@ -675,7 +675,7 @@ class HTTPResponse(io.IOBase):
def getheader(self, name, default=None): def getheader(self, name, default=None):
warnings.warn( warnings.warn(
"HTTPResponse.getheader() is deprecated and will be removed " "HTTPResponse.getheader() is deprecated and will be removed "
"in urllib3 v2.1.0. Instead use HTTResponse.headers.get(name, default).", "in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).",
category=DeprecationWarning, category=DeprecationWarning,
stacklevel=2, stacklevel=2,
) )

View file

@ -63,7 +63,7 @@ IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$")
BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$") BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$")
ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$") ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$")
_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*([0-9]{0,5}))?$") % ( _HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % (
REG_NAME_PAT, REG_NAME_PAT,
IPV4_PAT, IPV4_PAT,
IPV6_ADDRZ_PAT, IPV6_ADDRZ_PAT,