Skip to content

Commit e76b1dd

Browse files
committed
Upgrade urllib3 to 1.26.2
1 parent b08c4d5 commit e76b1dd

34 files changed

+1344
-407
lines changed

news/urllib3.vendor.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade urllib3 to 1.26.2

src/pip/_vendor/urllib3/__init__.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
"""
2-
urllib3 - Thread-safe connection pooling and re-using.
2+
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
33
"""
44
from __future__ import absolute_import
5-
import warnings
65

7-
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
6+
# Set default logging handler to avoid "No handler found" warnings.
7+
import logging
8+
import warnings
9+
from logging import NullHandler
810

911
from . import exceptions
12+
from ._version import __version__
13+
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
1014
from .filepost import encode_multipart_formdata
1115
from .poolmanager import PoolManager, ProxyManager, proxy_from_url
1216
from .response import HTTPResponse
1317
from .util.request import make_headers
14-
from .util.url import get_host
15-
from .util.timeout import Timeout
1618
from .util.retry import Retry
17-
18-
19-
# Set default logging handler to avoid "No handler found" warnings.
20-
import logging
21-
from logging import NullHandler
19+
from .util.timeout import Timeout
20+
from .util.url import get_host
2221

2322
__author__ = "Andrey Petrov ([email protected])"
2423
__license__ = "MIT"
25-
__version__ = "1.25.9"
24+
__version__ = __version__
2625

2726
__all__ = (
2827
"HTTPConnectionPool",

src/pip/_vendor/urllib3/_collections.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ def __exit__(self, exc_type, exc_value, traceback):
1717

1818

1919
from collections import OrderedDict
20-
from .exceptions import InvalidHeader
21-
from .packages.six import iterkeys, itervalues, PY3
2220

21+
from .exceptions import InvalidHeader
22+
from .packages import six
23+
from .packages.six import iterkeys, itervalues
2324

2425
__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]
2526

@@ -174,7 +175,7 @@ def __eq__(self, other):
174175
def __ne__(self, other):
175176
return not self.__eq__(other)
176177

177-
if not PY3: # Python 2
178+
if six.PY2: # Python 2
178179
iterkeys = MutableMapping.iterkeys
179180
itervalues = MutableMapping.itervalues
180181

@@ -190,7 +191,7 @@ def __iter__(self):
190191

191192
def pop(self, key, default=__marker):
192193
"""D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
193-
If key is not found, d is returned if given, otherwise KeyError is raised.
194+
If key is not found, d is returned if given, otherwise KeyError is raised.
194195
"""
195196
# Using the MutableMapping function directly fails due to the private marker.
196197
# Using ordinary dict.pop would expose the internal structures.

src/pip/_vendor/urllib3/_version.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file is protected via CODEOWNERS
2+
__version__ = "1.26.2"

0 commit comments

Comments
 (0)