Skip to content
Myr

Update urllib3 to 43b5b2b452e4344374de7d08ececcca495079b8d

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ian Cordasco · committed by Ian Cordasco · parent 39e49e5 · Browse files · 4 files+30 added−15 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+30 added−15 removed

  • other:+30 added−15 removed

4 files+30 added−15 removed

modified:requests/packages/urllib3/util/ssl_.py+10 added-1 removed
1from binascii import hexlify, unhexlify2from hashlib import md5, sha1, sha25634from ..exceptions import SSLError4from ..exceptions import SSLError, InsecurePlatformWarning567SSLContext = None8HAS_SNI = False9create_default_context = None1011import errno12import ssl13import warnings1415try: # Test for SSL features16 from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv2317 from ssl import HAS_SNI # Has SNI?
51 unmodified lines
69 )70 self.ciphers = cipher_suite7172 def wrap_socket(self, socket, server_hostname=None):73 warnings.warn(74 'A true SSLContext object is not available. This prevents '75 'urllib3 from configuring SSL appropriately and may cause '76 'certain SSL connections to fail. For more information, see '77 'https://urllib3.readthedocs.org/en/latest/security.html'78 '#insecureplatformwarning.',79 InsecurePlatformWarning80 )81 kwargs = {82 'keyfile': self.keyfile,83 'certfile': self.certfile,84 'ca_certs': self.ca_certs,
182 unmodified lines
modified:requests/packages/urllib3/__init__.py+1 added-1 removed
2 unmodified lines
3"""45__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'6__license__ = 'MIT'7__version__ = 'dev'7__version__ = '1.10.2'8910from .connectionpool import (11 HTTPConnectionPool,
55 unmodified lines
modified:requests/packages/urllib3/_collections.py+14 added-13 removed
18 unmodified lines
1920__all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict']212223MULTIPLE_HEADERS_ALLOWED = frozenset(['cookie', 'set-cookie', 'set-cookie2'])2423_Null = object()242526class RecentlyUsedContainer(MutableMapping):
113 unmodified lines
140141 def __init__(self, headers=None, **kwargs):142 dict.__init__(self)143 if headers is not None:144 if isinstance(headers, HTTPHeaderDict):145 self._copy_from(headers)146 else:146 self.extend(headers)147 self.extend(headers)148 if kwargs:149 self.extend(kwargs)150151 def __setitem__(self, key, val):
71 unmodified lines
223 # If already several items got inserted, we have a list224 vals.append(val)225 else:226 # vals should be a tuple then, i.e. only one item so far226 if key_lower in MULTIPLE_HEADERS_ALLOWED:227 # Need to convert the tuple to list for further extension228 _dict_setitem(self, key_lower, [vals[0], vals[1], val])227 # Need to convert the tuple to list for further extension228 _dict_setitem(self, key_lower, [vals[0], vals[1], val])229 else:230 _dict_setitem(self, key_lower, new_vals)229230 def extend(*args, **kwargs):231 """Generic import function for any type of header-like object.232 Adapted version of MutableMapping.update in order to insert items
40 unmodified lines
273274 def __repr__(self):275 return "%s(%s)" % (type(self).__name__, dict(self.itermerged()))276279 def copy(self):280 clone = type(self)()281 for key in self:282 val = _dict_getitem(self, key)277 def _copy_from(self, other):278 for key in other:279 val = _dict_getitem(other, key)280 if isinstance(val, list):281 # Don't need to convert tuples282 val = list(val)286 _dict_setitem(clone, key, val)283 _dict_setitem(self, key, val)284285 def copy(self):286 clone = type(self)()287 clone._copy_from(self)288 return clone289290 def iteritems(self):291 """Iterate over all header lines, including duplicate ones."""
29 unmodified lines
modified:requests/packages/urllib3/exceptions.py+5 added
155 unmodified lines
156157class SystemTimeWarning(SecurityWarning):158 "Warned when system time is suspected to be wrong"159 pass160161162class InsecurePlatformWarning(SecurityWarning):163 "Warned when certain SSL configuration is not available on a platform."164 pass