Bump urllib3 from 1.26.14 to 1.26.15 (#2017)

* Bump urllib3 from 1.26.14 to 1.26.15

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.14 to 1.26.15.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.14...1.26.15)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update urllib3==1.26.15

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2023-03-13 11:53:56 -07:00 committed by GitHub
parent 93d1f10ad3
commit 705fd2d3e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 8 deletions

View file

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

View file

@ -229,6 +229,11 @@ class HTTPConnection(_HTTPConnection, object):
) )
def request(self, method, url, body=None, headers=None): def request(self, method, url, body=None, headers=None):
# Update the inner socket's timeout value to send the request.
# This only triggers if the connection is re-used.
if getattr(self, "sock", None) is not None:
self.sock.settimeout(self.timeout)
if headers is None: if headers is None:
headers = {} headers = {}
else: else:

View file

@ -379,7 +379,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
timeout_obj = self._get_timeout(timeout) timeout_obj = self._get_timeout(timeout)
timeout_obj.start_connect() timeout_obj.start_connect()
conn.timeout = timeout_obj.connect_timeout conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout)
# Trigger any extra validation we need to do. # Trigger any extra validation we need to do.
try: try:

View file

@ -2,9 +2,8 @@ from __future__ import absolute_import
import time import time
# The default socket timeout, used by httplib to indicate that no timeout was # The default socket timeout, used by httplib to indicate that no timeout was; specified by the user
# specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT, getdefaulttimeout
from socket import _GLOBAL_DEFAULT_TIMEOUT
from ..exceptions import TimeoutStateError from ..exceptions import TimeoutStateError
@ -116,6 +115,10 @@ class Timeout(object):
# __str__ provided for backwards compatibility # __str__ provided for backwards compatibility
__str__ = __repr__ __str__ = __repr__
@classmethod
def resolve_default_timeout(cls, timeout):
return getdefaulttimeout() if timeout is cls.DEFAULT_TIMEOUT else timeout
@classmethod @classmethod
def _validate_timeout(cls, value, name): def _validate_timeout(cls, value, name):
"""Check that a timeout attribute is valid. """Check that a timeout attribute is valid.

View file

@ -50,7 +50,7 @@ _variations = [
"(?:(?:%(hex)s:){0,6}%(hex)s)?::", "(?:(?:%(hex)s:){0,6}%(hex)s)?::",
] ]
UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~" UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~"
IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")" IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+" ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]" IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]"
@ -303,7 +303,7 @@ def _normalize_host(host, scheme):
def _idna_encode(name): def _idna_encode(name):
if name and any([ord(x) > 128 for x in name]): if name and any(ord(x) >= 128 for x in name):
try: try:
import idna import idna
except ImportError: except ImportError:

View file

@ -46,7 +46,7 @@ tempora==5.2.1
tokenize-rt==5.0.0 tokenize-rt==5.0.0
tzdata==2022.7 tzdata==2022.7
tzlocal==4.2 tzlocal==4.2
urllib3==1.26.14 urllib3==1.26.15
webencodings==0.5.1 webencodings==0.5.1
websocket-client==1.5.1 websocket-client==1.5.1
xmltodict==0.13.0 xmltodict==0.13.0