Skip to content

Commit 2333ef3

Browse files
authored
Upgrade urllib3 to 1.26.17 (#12343)
1 parent 496b268 commit 2333ef3

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

news/urllib3.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade urllib3 to 1.26.17

src/pip/_vendor/urllib3/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file is protected via CODEOWNERS
2-
__version__ = "1.26.16"
2+
__version__ = "1.26.17"

src/pip/_vendor/urllib3/request.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from __future__ import absolute_import
22

3+
import sys
4+
35
from .filepost import encode_multipart_formdata
6+
from .packages import six
47
from .packages.six.moves.urllib.parse import urlencode
58

69
__all__ = ["RequestMethods"]
@@ -168,3 +171,21 @@ def request_encode_body(
168171
extra_kw.update(urlopen_kw)
169172

170173
return self.urlopen(method, url, **extra_kw)
174+
175+
176+
if not six.PY2:
177+
178+
class RequestModule(sys.modules[__name__].__class__):
179+
def __call__(self, *args, **kwargs):
180+
"""
181+
If user tries to call this module directly urllib3 v2.x style raise an error to the user
182+
suggesting they may need urllib3 v2
183+
"""
184+
raise TypeError(
185+
"'module' object is not callable\n"
186+
"urllib3.request() method is not supported in this release, "
187+
"upgrade to urllib3 v2 to use it\n"
188+
"see https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html"
189+
)
190+
191+
sys.modules[__name__].__class__ = RequestModule

src/pip/_vendor/urllib3/util/retry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Retry(object):
235235
RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503])
236236

237237
#: Default headers to be used for ``remove_headers_on_redirect``
238-
DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Authorization"])
238+
DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Cookie", "Authorization"])
239239

240240
#: Maximum backoff time.
241241
DEFAULT_BACKOFF_MAX = 120

src/pip/_vendor/vendor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ requests==2.31.0
1111
certifi==2023.7.22
1212
chardet==5.1.0
1313
idna==3.4
14-
urllib3==1.26.16
14+
urllib3==1.26.17
1515
rich==13.4.2
1616
pygments==2.15.1
1717
typing_extensions==4.7.1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy