mirror of https://github.com/pypa/pip
Upgrade urllib3 to 1.26.17 (#12343)
This commit is contained in:
parent
496b268c1b
commit
2333ef3b53
|
@ -0,0 +1 @@
|
|||
Upgrade urllib3 to 1.26.17
|
|
@ -1,2 +1,2 @@
|
|||
# This file is protected via CODEOWNERS
|
||||
__version__ = "1.26.16"
|
||||
__version__ = "1.26.17"
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
|
||||
from .filepost import encode_multipart_formdata
|
||||
from .packages import six
|
||||
from .packages.six.moves.urllib.parse import urlencode
|
||||
|
||||
__all__ = ["RequestMethods"]
|
||||
|
@ -168,3 +171,21 @@ class RequestMethods(object):
|
|||
extra_kw.update(urlopen_kw)
|
||||
|
||||
return self.urlopen(method, url, **extra_kw)
|
||||
|
||||
|
||||
if not six.PY2:
|
||||
|
||||
class RequestModule(sys.modules[__name__].__class__):
|
||||
def __call__(self, *args, **kwargs):
|
||||
"""
|
||||
If user tries to call this module directly urllib3 v2.x style raise an error to the user
|
||||
suggesting they may need urllib3 v2
|
||||
"""
|
||||
raise TypeError(
|
||||
"'module' object is not callable\n"
|
||||
"urllib3.request() method is not supported in this release, "
|
||||
"upgrade to urllib3 v2 to use it\n"
|
||||
"see https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html"
|
||||
)
|
||||
|
||||
sys.modules[__name__].__class__ = RequestModule
|
||||
|
|
|
@ -235,7 +235,7 @@ class Retry(object):
|
|||
RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503])
|
||||
|
||||
#: Default headers to be used for ``remove_headers_on_redirect``
|
||||
DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Authorization"])
|
||||
DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Cookie", "Authorization"])
|
||||
|
||||
#: Maximum backoff time.
|
||||
DEFAULT_BACKOFF_MAX = 120
|
||||
|
|
|
@ -11,7 +11,7 @@ requests==2.31.0
|
|||
certifi==2023.7.22
|
||||
chardet==5.1.0
|
||||
idna==3.4
|
||||
urllib3==1.26.16
|
||||
urllib3==1.26.17
|
||||
rich==13.4.2
|
||||
pygments==2.15.1
|
||||
typing_extensions==4.7.1
|
||||
|
|
Loading…
Reference in New Issue