Merge pull request #4835 from requests/2.20.0
Before adoption: this commit came in with the history the project adopted, so no landing records it.
v2.20.0
authored by Nate Prewitt · committed by GitHub · parents 2c6a842, bd84045 · Browse files · 20 files·+88 added−102 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
20 files+88 added−102 removed
- tests:+24 added−33 removed
- other:+64 added−69 removed
Provenance
- Commit
75bdc99- Tree
47b8d2e- Author
Nate Prewitt <nate.prewitt@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
2c6a842- Parent 2
bd84045
20 files changed+88 added−102 removed
modified:requests/__init__.py+5 added-10 removed
55 unmodified lines56 57 # Check urllib3 for compatibility.58 major, minor, patch = urllib3_version # noqa: F81159 major, minor, patch = int(major), int(minor), int(patch)60- # urllib3 >= 1.21.1, <= 1.2360+ # urllib3 >= 1.21.1, <= 1.2461 assert major == 162 assert minor >= 2163- assert minor <= 2363+ assert minor <= 2464 65 # Check chardet for compatibility.66 major, minor, patch = chardet_version.split('.')[:3]67 major, minor, patch = int(major), int(minor), int(patch)10 unmodified lines78 except ValueError:79 return80 81 if cryptography_version < [1, 3, 4]:82- warning = 'Old version of cryptography ({0}) may cause slowdown.'.format(cryptography_version)82+ warning = 'Old version of cryptography ({}) may cause slowdown.'.format(cryptography_version)83 warnings.warn(warning, RequestsDependencyWarning)84 85 # Check imported dependencies for compatibility.86 try:87 check_compatibility(urllib3.__version__, chardet.__version__)88 except (AssertionError, ValueError):89- warnings.warn("urllib3 ({0}) or chardet ({1}) doesn't match a supported "89+ warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "90 "version!".format(urllib3.__version__, chardet.__version__),91 RequestsDependencyWarning)92 93 # Attempt to enable urllib3's SNI support, if possible28 unmodified lines122 )123 124 # Set default logging handler to avoid "No handler found" warnings.125 import logging126-try: # Python 2.7+127- from logging import NullHandler126+from logging import NullHandler128-except ImportError:129- class NullHandler(logging.Handler):130- def emit(self, record):131- pass127 128 logging.getLogger(__name__).addHandler(NullHandler())129 130 # FileModeWarnings go off per the default.1 unmodified linemodified:requests/__version__.py+2 added-2 removed
3 unmodified lines4 5 __title__ = 'requests'6 __description__ = 'Python HTTP for Humans.'7 __url__ = 'http://python-requests.org'8-__version__ = '2.19.1'9-__build__ = 0x0219018+__version__ = '2.20.0'9+__build__ = 0x02200010 __author__ = 'Kenneth Reitz'11 __author_email__ = 'me@kennethreitz.org'12 __license__ = 'Apache 2.0'13 __copyright__ = 'Copyright 2018 Kenneth Reitz'1 unmodified linemodified:requests/adapters.py+7 added-9 removed
127 unmodified lines128 129 self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)130 131 def __getstate__(self):132- return dict((attr, getattr(self, attr, None)) for attr in133- self.__attrs__)132+ return {attr: getattr(self, attr, None) for attr in self.__attrs__}133 134 def __setstate__(self, state):135 # Can't handle by adding 'proxy_manager' to self.__attrs__ because136 # self.poolmanager uses a lambda function, which isn't pickleable.87 unmodified lines224 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)225 226 if not cert_loc or not os.path.exists(cert_loc):227 raise IOError("Could not find a suitable TLS CA certificate bundle, "229- "invalid path: {0}".format(cert_loc))228+ "invalid path: {}".format(cert_loc))229 230 conn.cert_reqs = 'CERT_REQUIRED'231 232 if not os.path.isdir(cert_loc):13 unmodified lines246 conn.cert_file = cert247 conn.key_file = None248 if conn.cert_file and not os.path.exists(conn.cert_file):249 raise IOError("Could not find the TLS certificate file, "251- "invalid path: {0}".format(conn.cert_file))250+ "invalid path: {}".format(conn.cert_file))251 if conn.key_file and not os.path.exists(conn.key_file):252 raise IOError("Could not find the TLS key file, "254- "invalid path: {0}".format(conn.key_file))253+ "invalid path: {}".format(conn.key_file))254 255 def build_response(self, req, resp):256 """Builds a :class:`Response <requests.Response>` object from a urllib3257 response. This should not be called from user code, and is only exposed166 unmodified lines424 connect, read = timeout425 timeout = TimeoutSauce(connect=connect, read=read)426 except ValueError as e:427 # this may raise a string formatting error.429- err = ("Invalid timeout {0}. Pass a (connect, read) "428+ err = ("Invalid timeout {}. Pass a (connect, read) "429 "timeout tuple, or a single float to set "430 "both timeouts to the same value".format(timeout))431 raise ValueError(err)432 elif isinstance(timeout, TimeoutSauce):41 unmodified lines474 low_conn.send(b'0\r\n\r\n')475 476 # Receive the response from the server477 try:479- # For Python 2.7+ versions, use buffering of HTTP480- # responses478+ # For Python 2.7, use buffering of HTTP responses479 r = low_conn.getresponse(buffering=True)480 except TypeError:483- # For compatibility with Python 2.6 versions and back481+ # For compatibility with Python 3.3+482 r = low_conn.getresponse()483 484 resp = HTTPResponse.from_httplib(485 r,48 unmodified linesmodified:requests/auth.py+2 added-2 removed
36 unmodified lines37 # for things like ints. This will be removed in 3.0.0.38 if not isinstance(username, basestring):39 warnings.warn(40 "Non-string usernames will no longer be supported in Requests "41- "3.0.0. Please convert the object you've passed in ({0!r}) to "41+ "3.0.0. Please convert the object you've passed in ({!r}) to "42 "a string or bytes object in the near future to avoid "43 "problems.".format(username),44 category=DeprecationWarning,45 )1 unmodified line47 48 if not isinstance(password, basestring):49 warnings.warn(50 "Non-string passwords will no longer be supported in Requests "51- "3.0.0. Please convert the object you've passed in ({0!r}) to "51+ "3.0.0. Please convert the object you've passed in ({!r}) to "52 "a string or bytes object in the near future to avoid "53 "problems.".format(password),54 category=DeprecationWarning,55 )250 unmodified linesmodified:requests/compat.py+1 added-2 removed
41 unmodified lines42 from urllib2 import parse_http_list43 import cookielib44 from Cookie import Morsel45 from StringIO import StringIO46- from collections import Callable, Mapping, MutableMapping46+ from collections import Callable, Mapping, MutableMapping, OrderedDict47 48- from urllib3.packages.ordered_dict import OrderedDict48 49 builtin_str = str50 bytes = str51 str = unicode19 unmodified linesmodified:requests/cookies.py+15 added-14 removed
442 unmodified lines443 444 By default, the pair of `name` and `value` will be set for the domain ''445 and sent on every request (this is sometimes called a "supercookie").446 """447- result = dict(448- version=0,449- name=name,450- value=value,451- port=None,452- domain='',453- path='/',454- secure=False,455- expires=None,456- discard=True,457- comment=None,458- comment_url=None,459- rest={'HttpOnly': None},460- rfc2109=False,)447+ result = {448+ 'version': 0,449+ 'name': name,450+ 'value': value,451+ 'port': None,452+ 'domain': '',453+ 'path': '/',454+ 'secure': False,455+ 'expires': None,456+ 'discard': True,457+ 'comment': None,458+ 'comment_url': None,459+ 'rest': {'HttpOnly': None},460+ 'rfc2109': False,461+ }462 463 badargs = set(kwargs) - set(result)464 if badargs:465 err = 'create_cookie() got unexpected keyword arguments: %s'84 unmodified linesmodified:requests/help.py+1 added-2 removed
87 unmodified lines88 idna_info = {89 'version': getattr(idna, '__version__', ''),90 }91 92- # OPENSSL_VERSION_NUMBER doesn't exist in the Python 2.6 ssl module.93- system_ssl = getattr(ssl, 'OPENSSL_VERSION_NUMBER', None)92+ system_ssl = ssl.OPENSSL_VERSION_NUMBER93 system_ssl_info = {94 'version': '%x' % system_ssl if system_ssl is not None else ''95 }96 23 unmodified linesmodified:requests/hooks.py+2 added-2 removed
13 unmodified lines14 HOOKS = ['response']15 16 17 def default_hooks():18- return dict((event, []) for event in HOOKS)18+ return {event: [] for event in HOOKS}19 20 # TODO: response is the only one21 22 23 def dispatch_hook(key, hooks, hook_data, **kwargs):24 """Dispatches a hook dictionary on a given piece of data."""25- hooks = hooks or dict()25+ hooks = hooks or {}26 hooks = hooks.get(key)27 if hooks:28 if hasattr(hooks, '__call__'):29 hooks = [hooks]5 unmodified linesmodified:requests/models.py+1 added-4 removed
650 unmodified lines651 # sure the content has been fully read.652 if not self._content_consumed:653 self.content654 655- return dict(656- (attr, getattr(self, attr, None))657- for attr in self.__attrs__658- )655+ return {attr: getattr(self, attr, None) for attr in self.__attrs__}656 657 def __setstate__(self, state):658 for name, value in state.items():659 setattr(self, name, value)294 unmodified linesmodified:requests/sessions.py+1 added-1 removed
736 unmodified lines737 for key in keys_to_move:738 self.adapters[key] = self.adapters.pop(key)739 740 def __getstate__(self):741- state = dict((attr, getattr(self, attr, None)) for attr in self.__attrs__)741+ state = {attr: getattr(self, attr, None) for attr in self.__attrs__}742 return state743 744 def __setstate__(self, state):745 for attr, value in state.items():16 unmodified linesmodified:requests/utils.py+3 added-8 removed
171 unmodified lines172 netrc_path = None173 174 for f in NETRC_FILES:175 try:176- loc = os.path.expanduser('~/{0}'.format(f))176+ loc = os.path.expanduser('~/{}'.format(f))177 except KeyError:178 # os.path.expanduser can fail when $HOME is undefined and179 # getpwuid fails. See https://bugs.python.org/issue20164 &180 # https://github.com/requests/requests/issues/1846547 unmodified lines728 return True729 else:730 host_with_port = parsed.hostname731 if parsed.port:732- host_with_port += ':{0}'.format(parsed.port)732+ host_with_port += ':{}'.format(parsed.port)733 734 for host in no_proxy:735 if parsed.hostname.endswith(host) or host_with_port.endswith(host):736 # The URL does match something in no_proxy, so we don't want737 # to apply the proxies on this URL.738 return True739 740- # If the system proxy settings indicate that this URL should be bypassed,741- # don't proxy.742- # The proxy_bypass function is incredibly buggy on OS X in early versions743- # of Python 2.6, so allow this call to fail. Only catch the specific744- # exceptions we've seen, though: this call failing in other ways can reveal745- # legitimate problems.740 with set_environ('no_proxy', no_proxy_arg):741+ # parsed.hostname can be `None` in cases such as a file URI.742 try:743 bypass = proxy_bypass(parsed.hostname)744 except (TypeError, socket.gaierror):745 bypass = False230 unmodified linesmodified:tests/test_help.py-9 removed
5 unmodified lines6 7 from requests.help import info8 9 10-@pytest.mark.skipif(sys.version_info[:2] != (2,6), reason="Only run on Python 2.6")11-def test_system_ssl_py26():12- """OPENSSL_VERSION_NUMBER isn't provided in Python 2.6, verify we don't13- blow up in this case.14- """15- assert info()['system_ssl'] == {'version': ''}16-17-18-@pytest.mark.skipif(sys.version_info < (2,7), reason="Only run on Python 2.7+")10 def test_system_ssl():11 """Verify we're actually setting system_ssl when it should be available."""12 assert info()['system_ssl']['version'] != ''13 18 unmodified linesmodified:tests/test_lowlevel.py+14 added-14 removed
14 unmodified lines15 server = Server.basic_response_server(wait_to_close_event=close_server)16 data = iter([b'a', b'b', b'c'])17 18 with server as (host, port):19- url = 'http://{0}:{1}/'.format(host, port)19+ url = 'http://{}:{}/'.format(host, port)20 r = requests.post(url, data=data, stream=True)21 close_server.set() # release server block22 23 assert r.status_code == 20052 unmodified lines76 close_server = threading.Event()77 server = Server(digest_response_handler, wait_to_close_event=close_server)78 79 with server as (host, port):80- url = 'http://{0}:{1}/'.format(host, port)80+ url = 'http://{}:{}/'.format(host, port)81 r = requests.get(url, auth=auth)82 # Verify server succeeded in authenticating.83 assert r.status_code == 20084 # Verify Authorization was sent in final request.41 unmodified lines126 close_server = threading.Event()127 server = Server(digest_failed_response_handler, wait_to_close_event=close_server)128 129 with server as (host, port):130- url = 'http://{0}:{1}/'.format(host, port)130+ url = 'http://{}:{}/'.format(host, port)131 r = requests.get(url, auth=auth)132 # Verify server didn't authenticate us.133 assert r.status_code == 401134 assert r.history[0].status_code == 40128 unmodified lines163 close_server = threading.Event()164 server = Server(digest_response_handler, wait_to_close_event=close_server)165 166 with server as (host, port):167- url = 'http://{0}:{1}/'.format(host, port)167+ url = 'http://{}:{}/'.format(host, port)168 r = requests.get(url, auth=auth)169 # Verify server didn't receive auth from us.170 assert r.status_code == 200171 assert len(r.history) == 08 unmodified lines180 181 _proxy_combos = []182 for prefix, schemes in _schemes_by_var_prefix:183 for scheme in schemes:184- _proxy_combos.append(("{0}_proxy".format(prefix), scheme))184+ _proxy_combos.append(("{}_proxy".format(prefix), scheme))185 186 _proxy_combos += [(var.upper(), scheme) for var, scheme in _proxy_combos]187 188 189 @pytest.mark.parametrize("var,scheme", _proxy_combos)190 def test_use_proxy_from_environment(httpbin, var, scheme):191- url = "{0}://httpbin.org".format(scheme)191+ url = "{}://httpbin.org".format(scheme)192 fake_proxy = Server() # do nothing with the requests; just close the socket193 with fake_proxy as (host, port):194- proxy_url = "socks5://{0}:{1}".format(host, port)194+ proxy_url = "socks5://{}:{}".format(host, port)195 kwargs = {var: proxy_url}196 with override_environ(**kwargs):197 # fake proxy's lack of response will cause a ConnectionError198 with pytest.raises(requests.exceptions.ConnectionError):12 unmodified lines211 redirect_request = [] # stores the second request to the server212 213 def redirect_resp_handler(sock):214 consume_socket_content(sock, timeout=0.5)215- location = u'//{0}:{1}/{2}'.format(host, port, path)215+ location = u'//{}:{}/{}'.format(host, port, path)216 sock.send(217 b'HTTP/1.1 301 Moved Permanently\r\n'218 b'Content-Length: 0\r\n'219 b'Location: ' + location.encode('utf8') + b'\r\n'5 unmodified lines225 close_server = threading.Event()226 server = Server(redirect_resp_handler, wait_to_close_event=close_server)227 228 with server as (host, port):229- url = u'http://{0}:{1}'.format(host, port)229+ url = u'http://{}:{}'.format(host, port)230 r = requests.get(url=url, allow_redirects=True)231 assert r.status_code == 200232 assert len(r.history) == 1233 assert r.history[0].status_code == 301234 assert redirect_request[0].startswith(b'GET /' + expected_path + b' HTTP/1.1')235- assert r.url == u'{0}/{1}'.format(url, expected_path.decode('ascii'))235+ assert r.url == u'{}/{}'.format(url, expected_path.decode('ascii'))236 237 close_server.set()238 239 def test_fragment_not_sent_with_request():9 unmodified lines249 close_server = threading.Event()250 server = Server(response_handler, wait_to_close_event=close_server)251 252 with server as (host, port):253- url = 'http://{0}:{1}/path/to/thing/#view=edit&token=hunter2'.format(host, port)253+ url = 'http://{}:{}/path/to/thing/#view=edit&token=hunter2'.format(host, port)254 r = requests.get(url)255 raw_request = r.content256 257 assert r.status_code == 20034 unmodified lines292 close_server = threading.Event()293 server = Server(response_handler, wait_to_close_event=close_server)294 295 with server as (host, port):296- url = 'http://{0}:{1}/path/to/thing/#view=edit&token=hunter2'.format(host, port)296+ url = 'http://{}:{}/path/to/thing/#view=edit&token=hunter2'.format(host, port)297 r = requests.get(url)298 raw_request = r.content299 300 assert r.status_code == 200301 assert len(r.history) == 2302 assert r.history[0].request.url == url303 304 # Verify we haven't overwritten the location with our previous fragment.305- assert r.history[1].request.url == 'http://{0}:{1}/get#relevant-section'.format(host, port)305+ assert r.history[1].request.url == 'http://{}:{}/get#relevant-section'.format(host, port)306 # Verify previous fragment is used and not the original.307- assert r.url == 'http://{0}:{1}/final-url/#relevant-section'.format(host, port)307+ assert r.url == 'http://{}:{}/final-url/#relevant-section'.format(host, port)308 309 close_server.set()modified:tests/test_requests.py+6 added-6 removed
156 unmodified lines157 parts = urlparse(httpbin('get'))158 url = scheme + parts.netloc + parts.path159 r = requests.Request('GET', url)160 r = s.send(r.prepare())161- assert r.status_code == 200, 'failed for scheme {0}'.format(scheme)161+ assert r.status_code == 200, 'failed for scheme {}'.format(scheme)162 163 def test_HTTP_200_OK_GET_ALTERNATIVE(self, httpbin):164 r = requests.Request('GET', httpbin('get'))165 s = requests.Session()649 unmodified lines815 def test_invalid_ca_certificate_path(self, httpbin_secure):816 INVALID_PATH = '/garbage'817 with pytest.raises(IOError) as e:818 requests.get(httpbin_secure(), verify=INVALID_PATH)819- assert str(e.value) == 'Could not find a suitable TLS CA certificate bundle, invalid path: {0}'.format(INVALID_PATH)819+ assert str(e.value) == 'Could not find a suitable TLS CA certificate bundle, invalid path: {}'.format(INVALID_PATH)820 821 def test_invalid_ssl_certificate_files(self, httpbin_secure):822 INVALID_PATH = '/garbage'823 with pytest.raises(IOError) as e:824 requests.get(httpbin_secure(), cert=INVALID_PATH)825- assert str(e.value) == 'Could not find the TLS certificate file, invalid path: {0}'.format(INVALID_PATH)825+ assert str(e.value) == 'Could not find the TLS certificate file, invalid path: {}'.format(INVALID_PATH)826 827 with pytest.raises(IOError) as e:828 requests.get(httpbin_secure(), cert=('.', INVALID_PATH))829- assert str(e.value) == 'Could not find the TLS key file, invalid path: {0}'.format(INVALID_PATH)829+ assert str(e.value) == 'Could not find the TLS key file, invalid path: {}'.format(INVALID_PATH)830 831 def test_http_with_certificate(self, httpbin):832 r = requests.get(httpbin(), cert='.')833 assert r.status_code == 20029 unmodified lines863 requests.get(httpbin_secure('status', '200'))864 865 def test_urlencoded_get_query_multivalued_param(self, httpbin):866 867- r = requests.get(httpbin('get'), params=dict(test=['foo', 'baz']))867+ r = requests.get(httpbin('get'), params={'test': ['foo', 'baz']})868 assert r.status_code == 200869 assert r.url == httpbin('get?test=foo&test=baz')870 871 def test_form_encoded_post_query_multivalued_element(self, httpbin):585 unmodified lines1457 r = s.get(httpbin('get'), params={'FOO': 'bar'})1458 assert r.json()['args'] == {'foo': 'bar', 'FOO': 'bar'}1459 1460 def test_long_authinfo_in_url(self):1461- url = 'http://{0}:{1}@{2}:9000/path?query#frag'.format(1461+ url = 'http://{}:{}@{}:9000/path?query#frag'.format(1462 'E8A3BE87-9E3F-4620-8858-95478E385B5B',1463 'EA770032-DA4D-4D84-8CE9-29C6D910BF1E',1464 'exactly-------------sixty-----------three------------characters',1465 )1042 unmodified linesmodified:tests/test_testserver.py+3 added-3 removed
48 unmodified lines49 "\r\nroflol"50 )51 52 with server as (host, port):53- r = requests.get('http://{0}:{1}'.format(host, port))53+ r = requests.get('http://{}:{}'.format(host, port))54 55 assert r.status_code == 20056 assert r.text == u'roflol'57 assert r.headers['Content-Length'] == '6'58 59 def test_basic_response(self):60 """the basic response server returns an empty http response"""61 with Server.basic_response_server() as (host, port):62- r = requests.get('http://{0}:{1}'.format(host, port))62+ r = requests.get('http://{}:{}'.format(host, port))63 assert r.status_code == 20064 assert r.text == u''65 assert r.headers['Content-Length'] == '0'66 15 unmodified lines82 83 server = Server.basic_response_server(requests_to_handle=requests_to_handle)84 85 with server as (host, port):86- server_url = 'http://{0}:{1}'.format(host, port)86+ server_url = 'http://{}:{}'.format(host, port)87 for _ in range(requests_to_handle):88 r = requests.get(server_url)89 assert r.status_code == 20090 76 unmodified linesmodified:tests/test_utils.py+1 added-1 removed
663 unmodified lines664 """665 cookiedict = {'test': 'cookies',666 'good': 'cookies'}667 cj = add_dict_to_cookiejar(cookiejar, cookiedict)668- cookies = dict((cookie.name, cookie.value) for cookie in cj)668+ cookies = {cookie.name: cookie.value for cookie in cj}669 assert cookiedict == cookies670 671 672 @pytest.mark.parametrize(110 unmodified linesmodified:AUTHORS.rst+1 added-1 removed
123 unmodified lines124 - Dmitry Medvinsky <me@dmedvinsky.name>125 - Bryce Boe <bbzbryce@gmail.com> (`@bboe <https://github.com/bboe>`_)126 - Colin Dunklau <colin.dunklau@gmail.com> (`@cdunklau <https://github.com/cdunklau>`_)127 - Bob Carroll <bob.carroll@alum.rit.edu> (`@rcarz <https://github.com/rcarz>`_)128-- Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar> (`@hobarrera <https://github.com/hobarrera>`_)128+- Hugo Osvaldo Barrera <hugo@barrera.io> (`@hobarrera <https://github.com/hobarrera>`_)129 - Łukasz Langa <lukasz@langa.pl>130 - Dave Shawley <daveshawley@gmail.com>131 - James Clarke (`@jam <https://github.com/jam>`_)132 - Kevin Burke <kev@inburke.com>59 unmodified linesmodified:HISTORY.md+18 added-1 removed
4 unmodified lines5 ---6 7 **Bugfixes**8 9+- \[Short description of non-trivial change.\]10+11+2.20.0 (2018-10-18)12+-------------------13+14+**Bugfixes**15+16 - Content-Type header parsing is now case-insensitive (e.g.17 charset=utf8 v Charset=utf8).18 - Fixed exception leak where certain redirect urls would raise19 uncaught urllib3 exceptions.20+- Requests removes Authorization header from requests redirected21+ from https to http on the same hostname. (CVE-2018-18074)22+- `should_bypass_proxies` now handles URIs without hostnames (e.g.23+ files).24 14-- \[Short description of non-trivial change.\]25+**Dependencies**26 27+- Requests now supports urllib3 v1.24.28+29+**Deprecations**30+31+- Requests has officially stopped support for Python 2.6.32+33 2.19.1 (2018-06-14)34 -------------------35 36 **Bugfixes**1587 unmodified linesmodified:setup.py+4 added-10 removed
37 unmodified lines38 os.system('python setup.py sdist bdist_wheel')39 os.system('twine upload dist/*')40 sys.exit()41 42-# pyOpenSSL version 18.0.0 dropped support for Python 2.643-if sys.version_info < (2, 7):44- PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14, < 18.0.0'45-else:46- PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14'47-42 packages = ['requests']43 44 requires = [45 'chardet>=3.0.2,<3.1.0',46 'idna>=2.5,<2.8',53- 'urllib3>=1.21.1,<1.24',47+ 'urllib3>=1.21.1,<1.25',48 'certifi>=2017.4.17'49 50 ]51 test_requirements = [26 unmodified lines78 packages=packages,79 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},80 package_dir={'requests': 'requests'},81 include_package_data=True,88- python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",82+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",83 install_requires=requires,84 license=about['__license__'],85 zip_safe=False,86 classifiers=[14 unmodified lines101 ],102 cmdclass={'test': PyTest},103 tests_require=test_requirements,104 extras_require={111- 'security': [PYOPENSSL_VERSION, 'cryptography>=1.3.4', 'idna>=2.0.0'],105+ 'security': ['pyOpenSSL >= 0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],106 'socks': ['PySocks>=1.5.6, !=1.5.7'],113- 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],107+ 'socks:sys_platform == "win32" and python_version == "2.7"': ['win_inet_pton'],108 },109 )modified:tox.ini+1 added-1 removed
1 [tox]2-envlist = py26,py27,py34,py35,py362+envlist = py27,py34,py35,py363 4 [testenv]5 6 commands =2 unmodified lines