Skip to content
Myr

Update urllib3 to a27758625e4169330fcf965652b1093faf5aaaa2

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 a57eacf · Browse files · 4 files+35 added−17 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+35 added−17 removed

  • other:+35 added−17 removed

4 files+35 added−17 removed

modified:requests/packages/urllib3/contrib/pyopenssl.py+5 added
189 unmodified lines
190 if self.suppress_ragged_eofs and e.args == (-1, 'Unexpected EOF'):191 return b''192 else:193 raise194 except OpenSSL.SSL.ZeroReturnError as e:195 if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:196 return b''197 else:198 raise199 except OpenSSL.SSL.WantReadError:200 rd, wd, ed = select.select(201 [self.socket], [], [], self.socket.gettimeout())202 if not rd:
106 unmodified lines
modified:requests/packages/urllib3/util/retry.py+1 added-1 removed
188 unmodified lines
189 """190 return isinstance(err, (ReadTimeoutError, ProtocolError))191192 def is_forced_retry(self, method, status_code):193 """ Is this method/response retryable? (Based on method/codes whitelists)193 """ Is this method/status code retryable? (Based on method/codes whitelists)194 """195 if self.method_whitelist and method.upper() not in self.method_whitelist:196 return False197
88 unmodified lines
modified:requests/packages/urllib3/__init__.py+1 added-1 removed
53 unmodified lines
54# ... Clean up.55del NullHandler565758# Set security warning to only go off once by default.58# Set security warning to always go off by default.59import warnings60warnings.simplefilter('always', exceptions.SecurityWarning)6162def disable_warnings(category=exceptions.HTTPWarning):
4 unmodified lines
modified:requests/packages/urllib3/connectionpool.py+28 added-15 removed
264 unmodified lines
265 Called right before a request is made, after the socket is created.266 """267 pass268269 def _prepare_proxy(self, conn):270 # Nothing to do for HTTP connections.271 pass272273 def _get_timeout(self, timeout):274 """ Helper that always returns a :class:`urllib3.util.Timeout` """275 if timeout is _Default:276 return self.timeout.clone()
236 unmodified lines
513 err = None514515 try:516 # Request a connection from the queue.517 timeout_obj = self._get_timeout(timeout)518 conn = self._get_conn(timeout=pool_timeout)519520 conn.timeout = timeout_obj.connect_timeout521522 is_new_proxy_conn = self.proxy is not None and not getattr(conn, 'sock', None)523 if is_new_proxy_conn:524 self._prepare_proxy(conn)525526 # Make the request on the httplib connection object.527 httplib_response = self._make_request(conn, method, url,517 timeout=timeout,528 timeout=timeout_obj,529 body=body, headers=headers)530531 # If we're going to release the connection in ``finally:``, then532 # the request doesn't need to know about the connection. Otherwise
150 unmodified lines
683 assert_hostname=self.assert_hostname,684 assert_fingerprint=self.assert_fingerprint)685 conn.ssl_version = self.ssl_version686676 if self.proxy is not None:677 # Python 2.7+678 try:679 set_tunnel = conn.set_tunnel680 except AttributeError: # Platform-specific: Python 2.6681 set_tunnel = conn._set_tunnel687 return conn688683 if sys.version_info <= (2, 6, 4) and not self.proxy_headers: # Python 2.6.4 and older684 set_tunnel(self.host, self.port)685 else:686 set_tunnel(self.host, self.port, self.proxy_headers)689 def _prepare_proxy(self, conn):690 """691 Establish tunnel connection early, because otherwise httplib692 would improperly set Host: header to proxy's IP:port.693 """694 # Python 2.7+695 try:696 set_tunnel = conn.set_tunnel697 except AttributeError: # Platform-specific: Python 2.6698 set_tunnel = conn._set_tunnel699688 # Establish tunnel connection early, because otherwise httplib689 # would improperly set Host: header to proxy's IP:port.690 conn.connect()700 if sys.version_info <= (2, 6, 4) and not self.proxy_headers: # Python 2.6.4 and older701 set_tunnel(self.host, self.port)702 else:703 set_tunnel(self.host, self.port, self.proxy_headers)704692 return conn705 conn.connect()706707 def _new_conn(self):708 """709 Return a fresh :class:`httplib.HTTPSConnection`.
65 unmodified lines