From 0abb69b1cb3fbad9db7b52be363e939673c5c429 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Tue, 6 Jun 2017 12:01:41 +0800 Subject: [PATCH 001/116] Fix a typo: verison -> version --- requests/help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/help.py b/requests/help.py index ac0691e3..695b5ee2 100644 --- a/requests/help.py +++ b/requests/help.py @@ -23,7 +23,7 @@ else: def _implementation(): - """Return a dict with the Python implementation and verison. + """Return a dict with the Python implementation and version. Provide both the name and the version of the Python implementation currently running. For example, on CPython 2.7.5 it will return From 5a616ee980ae2cc9d42f8d0221420ad9eed4b2e0 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Tue, 6 Jun 2017 22:44:22 +0100 Subject: [PATCH 002/116] Add the pytest .cache/ directory to .gitignore For example, when a pytest run fails, it saves failure metadata to: `.cache/v/cache/lastfailed` --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b2abf8c2..19ebfd79 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ nosetests.xml junit-report.xml pylint.txt toy.py +.cache/ cover/ build/ docs/_build From 4847f5b8cd4071099f06e178856bc9e1b9193b2e Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Tue, 6 Jun 2017 23:26:07 +0100 Subject: [PATCH 003/116] Allow Requests.Response to be used as a context manager This saves having to wrap the call to requests with `contextlib.closing()`, allowing it to be used directly in a `with` statement, like so: ``` with requests.get('http://httpbin.org/get', stream=True) as r: # Do things with the response here. ``` Fixes #4136. --- AUTHORS.rst | 1 + HISTORY.rst | 5 +++++ docs/user/advanced.rst | 8 ++------ requests/models.py | 6 ++++++ tests/test_requests.py | 6 ++++++ 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 7e0bddf0..cda8e223 100755 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -183,3 +183,4 @@ Patches and Suggestions - Shmuel Amar (`@shmuelamar `_) - Gary Wu (`@garywu `_) - Ryan Pineo (`@ryanpineo `_) +- Ed Morley (`@edmorley `_) diff --git a/HISTORY.rst b/HISTORY.rst index edd07ae1..865169a5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,11 @@ Release History dev +++ +**Improvements** + +- ``Response`` is now a context manager, so can be used directly in a `with` statement + without first having to be wrapped by ``contextlib.closing()``. + **Bugfixes** - Resolve installation failure if multiprocessing is not available diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 2aac434c..a1b68707 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -301,15 +301,11 @@ release the connection back to the pool unless you consume all the data or call :meth:`Response.close `. This can lead to inefficiency with connections. If you find yourself partially reading request bodies (or not reading them at all) while using ``stream=True``, you should -consider using ``contextlib.closing`` (`documented here`_), like this:: +make the request within a ``with`` statement to ensure it's always closed:: - from contextlib import closing - - with closing(requests.get('http://httpbin.org/get', stream=True)) as r: + with requests.get('http://httpbin.org/get', stream=True) as r: # Do things with the response here. -.. _`documented here`: http://docs.python.org/2/library/contextlib.html#contextlib.closing - .. _keep-alive: Keep-Alive diff --git a/requests/models.py b/requests/models.py index 1375a3af..2148024f 100644 --- a/requests/models.py +++ b/requests/models.py @@ -634,6 +634,12 @@ class Response(object): #: is a response. self.request = None + def __enter__(self): + return self + + def __exit__(self, *args): + self.close() + def __getstate__(self): # Consume everything; accessing the content attribute makes # sure the content has been fully read. diff --git a/tests/test_requests.py b/tests/test_requests.py index b8350cb7..365ffcb2 100755 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -1668,6 +1668,12 @@ class TestRequests: next(it) assert len(list(it)) == 3 + def test_response_context_manager(self, httpbin): + with requests.get(httpbin('stream/4'), stream=True) as response: + assert isinstance(response, requests.Response) + + assert response.raw.closed + def test_unconsumed_session_response_closes_connection(self, httpbin): s = requests.session() From f8ccc604987cdad57426b2852951402734b994bb Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 7 Jun 2017 13:50:00 +0100 Subject: [PATCH 004/116] Clearer makefile for building README --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f90248f7..92d1c344 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ ci: py.test -n 8 --boxed --junitxml=report.xml test-readme: - python setup.py check -r -s + @python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!" flake8: flake8 --ignore=E501,F401,E128,E402,E731,F821 requests From d8e236780981f28228441029c689a5e8dccdd71b Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Thu, 8 Jun 2017 12:07:45 -0600 Subject: [PATCH 005/116] convert version compatibility checks to warning --- requests/__init__.py | 52 ++++++++++++++++++++++++------------------ requests/exceptions.py | 5 ++++ 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/requests/__init__.py b/requests/__init__.py index d4461ec9..90a0d11a 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -40,34 +40,44 @@ is at . :license: Apache 2.0, see LICENSE for more details. """ -# Check urllib3 for compatibility. import urllib3 -urllib3_version = urllib3.__version__.split('.') -# Sometimes, urllib3 only reports its version as 16.1. -if len(urllib3_version) == 2: - urllib3_version.append('0') -major, minor, patch = urllib3_version -major, minor, patch = int(major), int(minor), int(patch) -# urllib3 >= 1.21.1, < 1.22 -try: +import chardet +import warnings +from .exceptions import RequestsDependencyWarning + + +def check_compatibility(urllib3_version, chardet_version): + urllib3_version = urllib3_version.split('.') + assert urllib3_version != ['dev'] # Verify urllib3 isn't installed from git. + + # Sometimes, urllib3 only reports its version as 16.1. + if len(urllib3_version) == 2: + urllib3_version.append('0') + + # Check urllib3 for compatibility. + major, minor, patch = urllib3_version # noqa: F811 + major, minor, patch = int(major), int(minor), int(patch) + # urllib3 >= 1.21.1, < 1.22 assert major == 1 assert minor >= 21 assert minor <= 22 -except AssertionError: - raise RuntimeError('Requests dependency \'urllib3\' must be version >= 1.21.1, < 1.22!') - -# Check chardet for compatibility. -import chardet -major, minor, patch = chardet.__version__.split('.')[:3] -major, minor, patch = int(major), int(minor), int(patch) -# chardet >= 3.0.2, < 3.1.0 -try: + # Check chardet for compatibility. + major, minor, patch = chardet_version.split('.')[:3] + major, minor, patch = int(major), int(minor), int(patch) + # chardet >= 3.0.2, < 3.1.0 assert major == 3 assert minor < 1 assert patch >= 2 -except AssertionError: - raise RuntimeError('Requests dependency \'chardet\' must be version >= 3.0.2, < 3.1.0!') + + +# Check imported dependencies for compatibility. +try: + check_compatibility(urllib3.__version__, chardet.__version__) +except (AssertionError, ValueError): + warnings.warn("urllib3 ({0}) or chardet ({1}) doesn't match a supported " + "version!".format(urllib3.__version__, chardet.__version__), + RequestsDependencyWarning) # Attempt to enable urllib3's SNI support, if possible try: @@ -76,8 +86,6 @@ try: except ImportError: pass -import warnings - # urllib3's DependencyWarnings should be silenced. from urllib3.exceptions import DependencyWarning warnings.simplefilter('ignore', DependencyWarning) diff --git a/requests/exceptions.py b/requests/exceptions.py index da5af10b..be7eaed6 100644 --- a/requests/exceptions.py +++ b/requests/exceptions.py @@ -115,3 +115,8 @@ class RequestsWarning(Warning): class FileModeWarning(RequestsWarning, DeprecationWarning): """A file was opened in text mode, but Requests determined its binary length.""" pass + + +class RequestsDependencyWarning(RequestsWarning): + """An imported dependency doesn't match the expected version range.""" + pass From 22d12b0501fa633b80bcda303a718696e408ebfb Mon Sep 17 00:00:00 2001 From: JiuLi Gao Date: Fri, 9 Jun 2017 16:56:14 +0800 Subject: [PATCH 006/116] typo --- requests/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/api.py b/requests/api.py index b2ce1a96..bc2115c1 100644 --- a/requests/api.py +++ b/requests/api.py @@ -73,7 +73,7 @@ def get(url, params=None, **kwargs): def options(url, **kwargs): - r"""Sends a OPTIONS request. + r"""Sends an OPTIONS request. :param url: URL for the new :class:`Request` object. :param \*\*kwargs: Optional arguments that ``request`` takes. From 1d7fd6c8b305351ba34280492fa3a9cf968cfbb8 Mon Sep 17 00:00:00 2001 From: mlcrazy Date: Tue, 6 Jun 2017 17:27:25 -0400 Subject: [PATCH 007/116] Fixes error swallowing in set_environ --- AUTHORS.rst | 1 + requests/utils.py | 14 +++++++------- tests/test_utils.py | 30 ++++++++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 7e0bddf0..0be2effc 100755 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -183,3 +183,4 @@ Patches and Suggestions - Shmuel Amar (`@shmuelamar `_) - Gary Wu (`@garywu `_) - Ryan Pineo (`@ryanpineo `_) +- Matt Liu (`@mlcrazy `_) diff --git a/requests/utils.py b/requests/utils.py index 25af9923..1e4960d7 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -612,18 +612,18 @@ def set_environ(env_name, value): the environment variable 'env_name'. If 'value' is None, do nothing""" - if value is not None: + value_changed = value is not None + if value_changed: old_value = os.environ.get(env_name) os.environ[env_name] = value try: yield finally: - if value is None: - return - if old_value is None: - del os.environ[env_name] - else: - os.environ[env_name] = old_value + if value_changed: + if old_value is None: + del os.environ[env_name] + else: + os.environ[env_name] = old_value def should_bypass_proxies(url, no_proxy): diff --git a/tests/test_utils.py b/tests/test_utils.py index 41858b37..b3f398ee 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import os +import copy from io import BytesIO import pytest @@ -17,7 +18,7 @@ from requests.utils import ( requote_uri, select_proxy, should_bypass_proxies, super_len, to_key_val_list, to_native_string, unquote_header_value, unquote_unreserved, - urldefragauth, add_dict_to_cookiejar) + urldefragauth, add_dict_to_cookiejar, set_environ) from requests._internal_utils import unicode_is_ascii from .compat import StringIO, cStringIO @@ -651,4 +652,29 @@ def test_should_bypass_proxies_win_registry(url, expected, override, monkeypatch.setenv('NO_PROXY', '') monkeypatch.setattr(winreg, 'OpenKey', OpenKey) monkeypatch.setattr(winreg, 'QueryValueEx', QueryValueEx) - assert should_bypass_proxies(url, no_proxy=None) == expected + + +@pytest.mark.parametrize( + 'env_name, value', ( + ('no_proxy', '192.168.0.0/24,127.0.0.1,localhost.localdomain'), + ('no_proxy', None), + ('a_new_key', '192.168.0.0/24,127.0.0.1,localhost.localdomain'), + ('a_new_key', None), + )) +def test_set_environ(env_name, value): + """Tests set_environ will set environ values and will restore the environ.""" + environ_copy = copy.deepcopy(os.environ) + with set_environ(env_name, value): + assert os.environ.get(env_name) == value + + assert os.environ == environ_copy + + +def test_set_environ_raises_exception(): + """Tests set_environ will raise exceptions in context when the + value parameter is None.""" + with pytest.raises(Exception) as exception: + with set_environ('test1', None): + raise Exception('Expected exception') + + assert 'Expected exception' in str(exception.value) From 761e39b443b615b18a3b13f1bdd92d23e7cff204 Mon Sep 17 00:00:00 2001 From: mlcrazy Date: Fri, 9 Jun 2017 14:16:32 -0400 Subject: [PATCH 008/116] Adds changelog entry for #4134 --- HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index edd07ae1..6582073b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,7 @@ dev - Resolve installation failure if multiprocessing is not available - Resolve tests crash if multiprocessing is not able to determine the number of CPU cores +- Resolve error swallowing in utils set_environ generator 2.17.3 (2017-05-29) @@ -1476,4 +1477,3 @@ This is not a backwards compatible change. * Frustration * Conception - From edcc894a2e08b49729b98ad91092dbaada2aa374 Mon Sep 17 00:00:00 2001 From: mlcrazy Date: Fri, 9 Jun 2017 14:29:28 -0400 Subject: [PATCH 009/116] Adds to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 0be2effc..c5218c6a 100755 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -183,4 +183,5 @@ Patches and Suggestions - Shmuel Amar (`@shmuelamar `_) - Gary Wu (`@garywu `_) - Ryan Pineo (`@ryanpineo `_) +- Ed Morley (`@edmorley `_) - Matt Liu (`@mlcrazy `_) From c6a634715637e971e485766bfa37c73613ab7b82 Mon Sep 17 00:00:00 2001 From: Justin Mayhew Date: Sat, 10 Jun 2017 20:38:02 -0300 Subject: [PATCH 010/116] Remove exec permission from files that shouldn't have it --- AUTHORS.rst | 0 requests/sessions.py | 0 tests/test_lowlevel.py | 0 tests/test_requests.py | 1 - 4 files changed, 1 deletion(-) mode change 100755 => 100644 AUTHORS.rst mode change 100755 => 100644 requests/sessions.py mode change 100755 => 100644 tests/test_lowlevel.py mode change 100755 => 100644 tests/test_requests.py diff --git a/AUTHORS.rst b/AUTHORS.rst old mode 100755 new mode 100644 diff --git a/requests/sessions.py b/requests/sessions.py old mode 100755 new mode 100644 diff --git a/tests/test_lowlevel.py b/tests/test_lowlevel.py old mode 100755 new mode 100644 diff --git a/tests/test_requests.py b/tests/test_requests.py old mode 100755 new mode 100644 index 365ffcb2..194a03b3 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for Requests.""" From a0f0258eeea538a12450977584f8d3dca8927ba7 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Mon, 12 Jun 2017 01:27:11 +0800 Subject: [PATCH 011/116] Fix a typo: paramters -> parameters --- tests/test_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_requests.py b/tests/test_requests.py index 194a03b3..cfafc6e4 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -2369,7 +2369,7 @@ class TestPreparingURLs(object): ) def test_parameters_for_nonstandard_schemes(self, input, params, expected): """ - Setting paramters for nonstandard schemes is allowed if those schemes + Setting parameters for nonstandard schemes is allowed if those schemes begin with "http", and is forbidden otherwise. """ r = requests.Request('GET', url=input, params=params) From a8972a5bd24e50a380af22e4f33d1d1c4cd740b3 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 11 Jun 2017 18:10:05 -0400 Subject: [PATCH 012/116] attempt new ads --- docs/_static/custom.css | 39 +++++++++++++++++++++++++++++++ docs/_templates/sidebarintro.html | 8 +------ docs/_templates/sidebarlogo.html | 9 +------ 3 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..3a8af312 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,39 @@ +#carbonads { + display: block; + overflow: hidden; + padding: 1em; + background-color: #eeeeee; + text-align: center; + border: solid 1px #cccccc; + margin: 1.5em 0 2em; + border-radius: 2px; + line-height: 1.5; +} + +#carbonads a { + border-bottom: 0; +} + +#carbonads span { + display: block; + overflow: hidden; +} + +.carbon-img { + display: block; + margin: 0 auto 1em; + text-align: center; +} + +.carbon-text { + display: block; + margin-bottom: 1em; +} + +.carbon-poweredby { + display: block; + text-transform: uppercase; + letter-spacing: 1px; + line-height: 1; + font-size: 10px; +} diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index 9f758dcc..0b1d9dd0 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -15,13 +15,7 @@

-

The Hitchhiker's Guide to Python

- -

This guide is now available in tangible book form!

- - - -

All proceeds are being directly donated to the DjangoGirls organization.

+ diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index d30c0c15..fba676f1 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -21,14 +21,7 @@
-

The Hitchhiker's Guide to Python

- -

This guide is now available in tangible book form!

- - - -

All proceeds are being directly donated to the DjangoGirls organization.

- +

If you enjoy using this project, Say Thanks!

From d93b37cee77c45807cc6659bbd971d2b983c03b1 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 14 Jun 2017 16:43:40 +0100 Subject: [PATCH 013/116] Prepare v2.18.0 --- HISTORY.rst | 6 +++--- requests/__version__.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 45111752..a94b80ad 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,12 +3,12 @@ Release History --------------- -dev -+++ +2.18.0 (2017-06-14) ++++++++++++++++++++ **Improvements** -- ``Response`` is now a context manager, so can be used directly in a `with` statement +- ``Response`` is now a context manager, so can be used directly in a ``with`` statement without first having to be wrapped by ``contextlib.closing()``. **Bugfixes** diff --git a/requests/__version__.py b/requests/__version__.py index b21ba352..4703eaca 100644 --- a/requests/__version__.py +++ b/requests/__version__.py @@ -5,8 +5,8 @@ __title__ = 'requests' __description__ = 'Python HTTP for Humans.' __url__ = 'http://python-requests.org' -__version__ = '2.17.3' -__build__ = 0x021703 +__version__ = '2.18.0' +__build__ = 0x021800 __author__ = 'Kenneth Reitz' __author_email__ = 'me@kennethreitz.org' __license__ = 'Apache 2.0' From dd13b13479db82e3ed555b47c2b41a300f683b03 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 14 Jun 2017 16:45:03 +0100 Subject: [PATCH 014/116] Prepare for next release cycle --- HISTORY.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index a94b80ad..b8e323fa 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,13 @@ Release History --------------- +dev ++++ + +**Improvements** + +**Bugfixes** + 2.18.0 (2017-06-14) +++++++++++++++++++ From 51de61f914fda8d4f6a8ac8c2852abcc82b0b94e Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 14 Jun 2017 18:50:53 +0100 Subject: [PATCH 015/116] v2.18.1 --- HISTORY.rst | 9 +++++---- requests/__version__.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b8e323fa..a359805a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,13 +3,14 @@ Release History --------------- -dev -+++ - -**Improvements** +2.18.1 (2017-06-14) ++++++++++++++++++++ **Bugfixes** +- Fix an error in the packaging whereby the *.whl contained incorrect data that + regressed the fix in v2.17.3. + 2.18.0 (2017-06-14) +++++++++++++++++++ diff --git a/requests/__version__.py b/requests/__version__.py index 4703eaca..8c7ebbbc 100644 --- a/requests/__version__.py +++ b/requests/__version__.py @@ -5,8 +5,8 @@ __title__ = 'requests' __description__ = 'Python HTTP for Humans.' __url__ = 'http://python-requests.org' -__version__ = '2.18.0' -__build__ = 0x021800 +__version__ = '2.18.1' +__build__ = 0x021801 __author__ = 'Kenneth Reitz' __author_email__ = 'me@kennethreitz.org' __license__ = 'Apache 2.0' From 2fde9ee4076b8828f858e37cfdcee66008ff35f9 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 14 Jun 2017 18:52:03 +0100 Subject: [PATCH 016/116] Setup HISTORY for next release --- HISTORY.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index a359805a..fcf44951 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,13 @@ Release History --------------- +dev ++++ + +**Improvements** + +**Bugfixes** + 2.18.1 (2017-06-14) +++++++++++++++++++ From 1263b8660d1f28b4a564d9500e3d0fdb03b05bf4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 16 Jun 2017 18:30:39 -0400 Subject: [PATCH 017/116] stickers --- docs/_templates/sidebarintro.html | 4 +++- docs/_templates/sidebarlogo.html | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index 0b1d9dd0..02d07f47 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -14,10 +14,12 @@ human beings.

- +

Stickers!

+ +Order Stickers!

Stay Informed

Receive updates on new releases and upcoming projects.

diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index fba676f1..09ad797b 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -23,6 +23,12 @@ +

Stickers!

+ + +Order Stickers! + +

If you enjoy using this project, Say Thanks!

From 8ad09b68ea69a00a9f28c7b82a8867526f5575b1 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 25 Aug 2017 22:02:03 -0400 Subject: [PATCH 059/116] coinbin.org --- docs/_templates/sidebarintro.html | 2 +- docs/_templates/sidebarlogo.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index adf031cd..edd6731f 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -31,7 +31,7 @@

More Kenneth Reitz projects:

    -
  • edmsynths.com
  • +
  • coinbin.org
  • pipenv
  • pep8.org
  • httpbin.org
  • diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index f1897afe..59fe5ecb 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -36,7 +36,7 @@

    More Kenneth Reitz projects:

      -
    • edmsynths.com
    • +
    • coinbin.org
    • pipenv
    • pep8.org
    • httpbin.org
    • From 5dcbdb50fc9652cbeffeec22a21d1196e938bfca Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 25 Aug 2017 22:12:34 -0400 Subject: [PATCH 060/116] docs update --- docs/_templates/hacks.html | 12 +++++++++++- docs/conf.py | 6 +++--- docs/index.rst | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/_templates/hacks.html b/docs/_templates/hacks.html index f9fc96cb..c92ea0b2 100644 --- a/docs/_templates/hacks.html +++ b/docs/_templates/hacks.html @@ -51,4 +51,14 @@ var easter_egg = new Konami('http://fortunes.herokuapp.com/random/raw'); - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index b1c941e1..949e1cab 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,7 +58,7 @@ master_doc = 'index' # General information about the project. project = u'Requests' -copyright = u'MMXVII. A Kenneth Reitz Project' +copyright = u'MMXVII. A Kenneth Reitz Project' author = u'Kenneth Reitz' # The version info for the project you're documenting, acts as replacement for @@ -128,7 +128,7 @@ html_theme_options = { 'show_powered_by': False, 'github_user': 'requests', 'github_repo': 'requests', - 'github_banner': True, + 'github_banner': False, 'show_related': False } @@ -167,7 +167,7 @@ html_static_path = ['_static'] # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -html_use_smartypants = False +html_use_smartypants = True # Custom sidebar templates, maps document names to template names. html_sidebars = { diff --git a/docs/index.rst b/docs/index.rst index d4778ae0..3879dfd2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -82,7 +82,7 @@ Institutions that prefer to be unnamed claim to use Requests internally. simple, Pythonic.* Requests is one of the most downloaded Python packages of all time, pulling in -over 11,000,000 downloads every month. All the cool kids are doing it! +over 13,000,000 downloads every month. All the cool kids are doing it! Beloved Features ---------------- From 3a2ea9debac665fed6f5bdac0f1084067e3f0060 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Sun, 27 Aug 2017 08:54:01 +0100 Subject: [PATCH 061/116] Pin to httpbin 0.5.0 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 8d79283f..d7ad8765 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,3 +14,4 @@ docutils flake8 tox detox +httpbin==0.5.0 From dd57439fa56ffa1eb69b9b6d36763924952bc031 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 27 Aug 2017 23:13:50 -0400 Subject: [PATCH 062/116] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index fe6cf5f6..c4730b41 100644 --- a/README.rst +++ b/README.rst @@ -86,11 +86,11 @@ Requests officially supports Python 2.6–2.7 & 3.3–3.7, and runs great on PyP Installation ------------ -To install Requests, simply: +To install Requests, simply use `pipenv `_ (or pip, of course): .. code-block:: bash - $ pip install requests + $ pipenv install requests ✨🍰✨ Satisfaction guaranteed. From 3cceee3459e57fa56fb9218707230ab57b8995d4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 27 Aug 2017 23:16:32 -0400 Subject: [PATCH 063/116] Update install.rst --- docs/user/install.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user/install.rst b/docs/user/install.rst index 43ed789b..5c128cf2 100644 --- a/docs/user/install.rst +++ b/docs/user/install.rst @@ -7,14 +7,14 @@ This part of the documentation covers the installation of Requests. The first step to using any software package is getting it properly installed. -$ pip install requests ----------------------- +$ pipenv install requests +------------------------- To install Requests, simply run this simple command in your terminal of choice:: - $ pip install requests + $ pipenv install requests -If you don't have `pip `_ installed (tisk tisk!), +If you don't have `pipenv `_ installed (tisk tisk!), head over to the Pipenv website for installation instructions. Or, if you prefer to just use pip and don't have it installed, `this Python installation guide `_ can guide you through the process. From 3a6dec98270d00fcf7950b1f468dedf72224e87d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 28 Aug 2017 01:29:29 -0400 Subject: [PATCH 064/116] Update index.rst --- docs/index.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 3879dfd2..a0cd4dc6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,9 +28,7 @@ Release v\ |version|. (:ref:`Installation `) **Requests** is the only *Non-GMO* HTTP library for Python, safe for human consumption. -*Warning: Recreational use of the Python standard library for HTTP may result in dangerous side-effects, -including: security vulnerabilities, verbose code, reinventing the wheel, -constantly reading documentation, depression, headaches, or even death.* +.. warning:: The use of Python 3 is highly preferred over Python 2. Please consider upgrading your applications and infrastructure, if you find yourself *still* using Python 2 in production. If you are using Python 3, congratulations — you are indeed a person of excellent taste.* ------------------- From ad1aff52a03209bec66c932bc7c3739f6c52696c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 28 Aug 2017 01:33:32 -0400 Subject: [PATCH 065/116] Update index.rst --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index a0cd4dc6..2c0a4844 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,7 +28,7 @@ Release v\ |version|. (:ref:`Installation `) **Requests** is the only *Non-GMO* HTTP library for Python, safe for human consumption. -.. warning:: The use of Python 3 is highly preferred over Python 2. Please consider upgrading your applications and infrastructure, if you find yourself *still* using Python 2 in production. If you are using Python 3, congratulations — you are indeed a person of excellent taste.* +.. warning:: The use of **Python 3** is _highly_ preferred over Python 2. Please consider upgrading your applications and infrastructure, if you find yourself *still* using Python 2 in production. If you are using Python 3, congratulations — you are indeed a person of excellent taste. ------------------- From 7e20b9193a59fe4925fbb93deddc3102355ac22f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 28 Aug 2017 01:33:45 -0400 Subject: [PATCH 066/116] Update index.rst --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 2c0a4844..33cb0227 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,7 +28,7 @@ Release v\ |version|. (:ref:`Installation `) **Requests** is the only *Non-GMO* HTTP library for Python, safe for human consumption. -.. warning:: The use of **Python 3** is _highly_ preferred over Python 2. Please consider upgrading your applications and infrastructure, if you find yourself *still* using Python 2 in production. If you are using Python 3, congratulations — you are indeed a person of excellent taste. +.. warning:: The use of **Python 3** is *highly* preferred over Python 2. Please consider upgrading your applications and infrastructure, if you find yourself *still* using Python 2 in production. If you are using Python 3, congratulations — you are indeed a person of excellent taste. ------------------- From 572d2f453464a2733253eab3d85109fccfb483d4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 28 Aug 2017 01:50:35 -0400 Subject: [PATCH 067/116] =?UTF-8?q?Python=202=20Death=20Sentence=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kenneth Reitz --- docs/_templates/hacks.html | 44 +++++++++++++++++++++++-------- docs/_templates/sidebarintro.html | 2 +- docs/_templates/sidebarlogo.html | 2 +- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/docs/_templates/hacks.html b/docs/_templates/hacks.html index c92ea0b2..0d88a6ec 100644 --- a/docs/_templates/hacks.html +++ b/docs/_templates/hacks.html @@ -1,4 +1,34 @@ + + + + + + + + + @@ -51,14 +83,4 @@ var easter_egg = new Konami('http://fortunes.herokuapp.com/random/raw'); - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index edd6731f..adf031cd 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -31,7 +31,7 @@

      More Kenneth Reitz projects:

        -
      • coinbin.org
      • +
      • edmsynths.com
      • pipenv
      • pep8.org
      • httpbin.org
      • diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index 59fe5ecb..f1897afe 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -36,7 +36,7 @@

        More Kenneth Reitz projects:

          -
        • coinbin.org
        • +
        • edmsynths.com
        • pipenv
        • pep8.org
        • httpbin.org
        • From 369be8afd07e7a0f38bc4f78d6f3764a800711aa Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 28 Aug 2017 02:01:36 -0400 Subject: [PATCH 068/116] pretty little note Signed-off-by: Kenneth Reitz --- docs/conf.py | 9 +++++---- docs/index.rst | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 949e1cab..4bda98b0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,7 +58,7 @@ master_doc = 'index' # General information about the project. project = u'Requests' -copyright = u'MMXVII. A Kenneth Reitz Project' +copyright = u'MMXVII. A Kenneth Reitz Project' author = u'Kenneth Reitz' # The version info for the project you're documenting, acts as replacement for @@ -128,8 +128,9 @@ html_theme_options = { 'show_powered_by': False, 'github_user': 'requests', 'github_repo': 'requests', - 'github_banner': False, - 'show_related': False + 'github_banner': True, + 'show_related': False, + 'note_bg': '#FFF59C' } # Add any paths that contain custom themes here, relative to this directory. @@ -167,7 +168,7 @@ html_static_path = ['_static'] # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -html_use_smartypants = True +html_use_smartypants = False # Custom sidebar templates, maps document names to template names. html_sidebars = { diff --git a/docs/index.rst b/docs/index.rst index 33cb0227..919caaac 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,7 +28,8 @@ Release v\ |version|. (:ref:`Installation `) **Requests** is the only *Non-GMO* HTTP library for Python, safe for human consumption. -.. warning:: The use of **Python 3** is *highly* preferred over Python 2. Please consider upgrading your applications and infrastructure, if you find yourself *still* using Python 2 in production. If you are using Python 3, congratulations — you are indeed a person of excellent taste. +.. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste. + —*Kenneth Reitz* ------------------- From 785c733415d605e332ca608cbabcb9dfe0442f88 Mon Sep 17 00:00:00 2001 From: Pascal Van Acker Date: Mon, 28 Aug 2017 10:58:44 +0200 Subject: [PATCH 069/116] Add environment info to prepared requests When using prepared requests, the environment is not taken into account. This should be reflected in the documentation. --- docs/user/advanced.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 4aa1dfac..c7f960fa 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -187,6 +187,25 @@ applied, replace the call to :meth:`Request.prepare() print(resp.status_code) +When you are using the prepared request flow, keep in mind that it does not take into account the environment. +This can cause problems if you are using environment variables to change the behaviour of requests. +For example: Self-signed SSL certificates specified in ``REQUESTS_CA_BUNDLE`` will not be taken into account. +As a result an ``SSL: CERTIFICATE_VERIFY_FAILED`` is thrown. +You can get around this behaviour by explicity merging the environment settings into your session: + + from requests import Request, Session + + s = Session() + req = Request('GET', url) + + prepped = s.prepare_request(req) + + # Merge environment settings into session + settings = s.merge_environment_settings(prepped.url, None, None, None, None) + resp = s.send(prepped, **settings) + + print(resp.status_code) + .. _verification: SSL Cert Verification From ac9a3e53206e7f059c4a232aa7780ba42c232d7b Mon Sep 17 00:00:00 2001 From: Pascal Van Acker Date: Mon, 28 Aug 2017 11:14:05 +0200 Subject: [PATCH 070/116] fixed syntax for code block for prepared requests --- docs/user/advanced.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index c7f960fa..2a03a0e1 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -191,7 +191,7 @@ When you are using the prepared request flow, keep in mind that it does not take This can cause problems if you are using environment variables to change the behaviour of requests. For example: Self-signed SSL certificates specified in ``REQUESTS_CA_BUNDLE`` will not be taken into account. As a result an ``SSL: CERTIFICATE_VERIFY_FAILED`` is thrown. -You can get around this behaviour by explicity merging the environment settings into your session: +You can get around this behaviour by explicity merging the environment settings into your session:: from requests import Request, Session From 96b9a3f0fc7551aa3c2d25b093ba85a49d5b0497 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 28 Aug 2017 12:25:26 -0400 Subject: [PATCH 071/116] Update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index ed4892d4..7aa8d611 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Learn more: https://github.com/kennethreitz/setup.py import os import re From e0e5b2e3aa23a805c8bc8adbd54af57ff37ead5c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 29 Aug 2017 16:16:52 -0400 Subject: [PATCH 072/116] Update philosophy.rst --- docs/dev/philosophy.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/dev/philosophy.rst b/docs/dev/philosophy.rst index c0c0612f..fcc2a35e 100644 --- a/docs/dev/philosophy.rst +++ b/docs/dev/philosophy.rst @@ -31,6 +31,10 @@ Standard Library? Requests has no *active* plans to be included in the standard library. This decision has been discussed at length with Guido as well as numerous core developers. +.. raw:: html + + + Essentially, the standard library is where a library goes to die. It is appropriate for a module to be included when active development is no longer necessary. Linux Distro Packages From 940c1246e0b84442f72c9e78566b5e298b716cde Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 1 Sep 2017 13:10:29 -0400 Subject: [PATCH 073/116] taste --- docs/_templates/sidebarintro.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index adf031cd..7e1795a3 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -25,8 +25,6 @@

          Say Thanks!

          Join Mailing List.

          -

          BTC: 1Me2iXTJ91FYZhrGvaGaRDCBtnZ4KdxCug

          -

          Other Projects

          More Kenneth Reitz projects:

          From b9638ec7be9134786e28684ca17f3d161297ac5e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 1 Sep 2017 13:10:52 -0400 Subject: [PATCH 074/116] taste --- docs/_templates/sidebarlogo.html | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index f1897afe..fba676f1 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -24,7 +24,6 @@

          If you enjoy using this project, Say Thanks!

          -

          BTC: 1Me2iXTJ91FYZhrGvaGaRDCBtnZ4KdxCug

          From 054ad4aa67df93bd87eecfa5448479cb1151f7ef Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 12:59:01 -0400 Subject: [PATCH 075/116] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index c4730b41..6c7532a7 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -Requests: HTTP for Humans -========================= +Requests: HTTP for Humans ✨🍰✨ +================================ .. image:: https://img.shields.io/pypi/v/requests.svg :target: https://pypi.python.org/pypi/requests From e22e3a50592a9495e0000686bf7825c9422a82db Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:37:24 -0400 Subject: [PATCH 076/116] Update README.rst --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 6c7532a7..7a0f40bc 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -Requests: HTTP for Humans ✨🍰✨ -================================ +Requests: HTTP for Humans +========================= .. image:: https://img.shields.io/pypi/v/requests.svg :target: https://pypi.python.org/pypi/requests @@ -20,11 +20,11 @@ Requests: HTTP for Humans ✨🍰✨ .. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg :target: https://saythanks.io/to/kennethreitz - - Requests is the only *Non-GMO* HTTP library for Python, safe for human consumption. +.. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg + **Warning:** Recreational use of the Python standard library for HTTP may result in dangerous side-effects, including: security vulnerabilities, verbose code, reinventing the wheel, constantly reading documentation, depression, headaches, or even death. From d5a05469f15f6a0437cdfcc6df5da61ae7da8bf8 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:38:13 -0400 Subject: [PATCH 077/116] Update README.rst --- README.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.rst b/README.rst index 7a0f40bc..e0dc5e4f 100644 --- a/README.rst +++ b/README.rst @@ -25,10 +25,6 @@ consumption. .. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg -**Warning:** Recreational use of the Python standard library for HTTP may result in dangerous side-effects, -including: security vulnerabilities, verbose code, reinventing the wheel, -constantly reading documentation, depression, headaches, or even death. - Behold, the power of Requests: .. code-block:: python From 9c8ae76928913db076bce13111f791ed4211f60f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:40:02 -0400 Subject: [PATCH 078/116] Update index.rst --- docs/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 919caaac..52289f02 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,7 +35,6 @@ consumption. **Behold, the power of Requests**:: - >>> import requests >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) >>> r.status_code 200 From 2c438cacd1541bf9cdeb0eaa1b055a95e453561d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:44:57 -0400 Subject: [PATCH 079/116] Create extensions.rst --- docs/community/extensions.rst | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/community/extensions.rst diff --git a/docs/community/extensions.rst b/docs/community/extensions.rst new file mode 100644 index 00000000..9d9d9e84 --- /dev/null +++ b/docs/community/extensions.rst @@ -0,0 +1,37 @@ +Community Extensions +==================== + +This document contains a list of curated community extensions for Requests. + +Exceptional Extensions +---------------------- + +These are the best of the best. + +Requests-Toolbelt ++++++++++++++++++ + + + +Requests-Threads +++++++++++++++++ + + +Cache Control ++++++++++++++ + +Requests-Futures +++++++++++++++++ + + +Worthy Mentions +--------------- + + + +Participation Award +------------------- + +These aren't extensions, necessarily. But they utilize Requests, so they get mentioned here: + +- From 830c18e4f941298b1a07ab6df7ae953dd2f0bae1 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:45:28 -0400 Subject: [PATCH 080/116] Update index.rst --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 52289f02..c44e2f85 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -130,8 +130,9 @@ This part of the documentation, which is mostly prose, details the Requests ecosystem and community. .. toctree:: - :maxdepth: 1 + :maxdepth: 3 + commmunity/extensions community/faq community/recommended community/out-there From 8371b56d0f6e04a0effc259640dcc3eacaf218c9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:46:24 -0400 Subject: [PATCH 081/116] Delete extensions.rst --- docs/community/extensions.rst | 37 ----------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 docs/community/extensions.rst diff --git a/docs/community/extensions.rst b/docs/community/extensions.rst deleted file mode 100644 index 9d9d9e84..00000000 --- a/docs/community/extensions.rst +++ /dev/null @@ -1,37 +0,0 @@ -Community Extensions -==================== - -This document contains a list of curated community extensions for Requests. - -Exceptional Extensions ----------------------- - -These are the best of the best. - -Requests-Toolbelt -+++++++++++++++++ - - - -Requests-Threads -++++++++++++++++ - - -Cache Control -+++++++++++++ - -Requests-Futures -++++++++++++++++ - - -Worthy Mentions ---------------- - - - -Participation Award -------------------- - -These aren't extensions, necessarily. But they utilize Requests, so they get mentioned here: - -- From 0488c640e2fa0d6d5f193c536179be08ee348917 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:46:47 -0400 Subject: [PATCH 082/116] Update index.rst --- docs/index.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index c44e2f85..ac714502 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -130,11 +130,10 @@ This part of the documentation, which is mostly prose, details the Requests ecosystem and community. .. toctree:: - :maxdepth: 3 + :maxdepth: 2 - commmunity/extensions - community/faq community/recommended + community/faq community/out-there community/support community/vulnerabilities From 49ec082a776790442600451b35b32fb5dc85f101 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:50:38 -0400 Subject: [PATCH 083/116] Update recommended.rst --- docs/community/recommended.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/community/recommended.rst b/docs/community/recommended.rst index ae2ae5eb..73520342 100644 --- a/docs/community/recommended.rst +++ b/docs/community/recommended.rst @@ -34,6 +34,14 @@ requested by users within the community. .. _Requests-Toolbelt: http://toolbelt.readthedocs.io/en/latest/index.html + +Requests-Threads +---------------- + +`Requests-Threads` is a Requests session that returns the amazing Twisted's awaitable Deferreds instead of Response objects. This allows the use of ``async``/``await`` keyword usage on Python 3, or Twisted's style of programming, if desired. + +.. _Requests-Threads: https://github.com/requests/requests-threads + Requests-OAuthlib ----------------- From 8be8105c424be63c644514dddc805b05a3f52a6e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:53:26 -0400 Subject: [PATCH 084/116] Update advanced.rst --- docs/user/advanced.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 2a03a0e1..23efd385 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -955,8 +955,9 @@ response at a time. However, these calls will still block. If you are concerned about the use of blocking IO, there are lots of projects out there that combine Requests with one of Python's asynchronicity frameworks. -Two excellent examples are `grequests`_ and `requests-futures`_. +Some excellent examples are `requests-threads`_, `grequests`_, and `requests-futures`_. +.. _`requests-threads`: https://github.com/requests/requests-threads .. _`grequests`: https://github.com/kennethreitz/grequests .. _`requests-futures`: https://github.com/ross/requests-futures From 1ad51b0a41aaaa48d6012891925f5cd5f5af955b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 15:55:53 -0400 Subject: [PATCH 085/116] Update index.rst --- docs/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index ac714502..ae9ff25f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,8 @@ consumption. .. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste. —*Kenneth Reitz* + + .. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg ------------------- From e35c829b59b8504e11b6f9dad48efd18ccc69edb Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:03:49 -0400 Subject: [PATCH 086/116] Update index.rst --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index ae9ff25f..e2bb462e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -31,7 +31,8 @@ consumption. .. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste. —*Kenneth Reitz* - .. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg + +.. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg ------------------- From 175452a6b62016b6c2fbb86cd97edba47f5ded6d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:04:07 -0400 Subject: [PATCH 087/116] Update index.rst --- docs/index.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index e2bb462e..72f93b90 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -31,9 +31,7 @@ consumption. .. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste. —*Kenneth Reitz* - -.. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg - + ------------------- **Behold, the power of Requests**:: From 8c57515696fb6386a16dbc3f1538c00e82c96204 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:05:57 -0400 Subject: [PATCH 088/116] Update intro.rst --- docs/user/intro.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/user/intro.rst b/docs/user/intro.rst index 816ad0a4..e8395d9d 100644 --- a/docs/user/intro.rst +++ b/docs/user/intro.rst @@ -3,6 +3,8 @@ Introduction ============ +.. image:: https://farm5.staticflickr.com/4317/35198386374_1939af3de6_k_d.jpg + Philosophy ---------- From 530198e0c011c2d08843046578c2e235da2855e6 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:08:22 -0400 Subject: [PATCH 089/116] Update install.rst --- docs/user/install.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/user/install.rst b/docs/user/install.rst index 5c128cf2..1dd9de8e 100644 --- a/docs/user/install.rst +++ b/docs/user/install.rst @@ -3,6 +3,9 @@ Installation of Requests ======================== +.. image:: https://farm5.staticflickr.com/4230/35550376215_da1bf77a8c_k_d.jpg + + This part of the documentation covers the installation of Requests. The first step to using any software package is getting it properly installed. From c04b044b30a76518a98b0a247827a63e90bb6f8d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:09:08 -0400 Subject: [PATCH 090/116] Update advanced.rst --- docs/user/advanced.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 23efd385..613df205 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -3,6 +3,8 @@ Advanced Usage ============== +.. image:: https://farm5.staticflickr.com/4263/35163665790_d182d84f5e_k_d.jpg + This document covers some of Requests more advanced features. .. _session-objects: From 8af65a1eca7716ec5dd7a8068a8a0080f208abab Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:09:51 -0400 Subject: [PATCH 091/116] Update quickstart.rst --- docs/user/quickstart.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 71382d53..7fe1e0d2 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -3,6 +3,8 @@ Quickstart ========== +.. image:: https://farm5.staticflickr.com/4259/35163667010_8bfcaef274_k_d.jpg + .. module:: requests.models Eager to get started? This page gives a good introduction in how to get started From afaaae185ce23b0deffeff74083a4986322950ce Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:10:49 -0400 Subject: [PATCH 092/116] Update authentication.rst --- docs/user/authentication.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/user/authentication.rst b/docs/user/authentication.rst index 2b7a8690..8ffab504 100644 --- a/docs/user/authentication.rst +++ b/docs/user/authentication.rst @@ -3,6 +3,8 @@ Authentication ============== +.. image:: https://farm5.staticflickr.com/4258/35550409215_3b08d49d22_k_d.jpg + This document discusses using various kinds of authentication with Requests. Many web services require authentication, and there are many different types. From f3eeb3854281eaecf5378724dce77b76496a4038 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:11:52 -0400 Subject: [PATCH 093/116] Update vulnerabilities.rst --- docs/community/vulnerabilities.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/vulnerabilities.rst b/docs/community/vulnerabilities.rst index 5ff3f2cc..a6ab887e 100644 --- a/docs/community/vulnerabilities.rst +++ b/docs/community/vulnerabilities.rst @@ -1,6 +1,8 @@ Vulnerability Disclosure ======================== +.. image:: https://farm5.staticflickr.com/4211/34709353644_b041e9e1c2_k_d.jpg + If you think you have found a potential security vulnerability in requests, please email `sigmavirus24 `_ and `Lukasa `_ directly. **Do not file a public issue.** From e63d481a7a0d4cb169405fb8c074f6ca9b19e582 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:12:38 -0400 Subject: [PATCH 094/116] Update authors.rst --- docs/dev/authors.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/dev/authors.rst b/docs/dev/authors.rst index 2e96919c..38815823 100644 --- a/docs/dev/authors.rst +++ b/docs/dev/authors.rst @@ -1,5 +1,6 @@ Authors ======= +.. image:: https://farm5.staticflickr.com/4230/35163669920_f19e591efc_k_d.jpg .. include:: ../../AUTHORS.rst From 8ef20d5c36ffa648d438febe5088115ae31e856f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:13:08 -0400 Subject: [PATCH 095/116] Update contributing.rst --- docs/dev/contributing.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/dev/contributing.rst b/docs/dev/contributing.rst index 265994b3..efc79bbf 100644 --- a/docs/dev/contributing.rst +++ b/docs/dev/contributing.rst @@ -3,6 +3,8 @@ Contributor's Guide =================== +.. image:: https://farm5.staticflickr.com/4237/35550408335_7671fde302_k_d.jpg + If you're reading this, you're probably interested in contributing to Requests. Thank you very much! Open source projects live-and-die based on the support they receive from others, and the fact that you're even considering @@ -203,4 +205,4 @@ while keeping an open ear and mind. If you believe there is a feature missing, feel free to raise a feature request, but please do be aware that the overwhelming likelihood is that your -feature request will not be accepted. \ No newline at end of file +feature request will not be accepted. From 389da34fc9a0ab100d9b4bde7475d1bed479014d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:14:07 -0400 Subject: [PATCH 096/116] Update philosophy.rst --- docs/dev/philosophy.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/dev/philosophy.rst b/docs/dev/philosophy.rst index fcc2a35e..563c551c 100644 --- a/docs/dev/philosophy.rst +++ b/docs/dev/philosophy.rst @@ -1,6 +1,8 @@ Development Philosophy ====================== +.. image:: https://farm5.staticflickr.com/4231/34484831073_636008a23d_k_d.jpg + Requests is an open but opinionated library, created by an open but opinionated developer. From 18e37c9368e0a9623806eefe7de2bde4b376edb0 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:14:48 -0400 Subject: [PATCH 097/116] Update todo.rst --- docs/dev/todo.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/dev/todo.rst b/docs/dev/todo.rst index 75ec3085..50b18155 100644 --- a/docs/dev/todo.rst +++ b/docs/dev/todo.rst @@ -1,6 +1,8 @@ How to Help =========== +.. image:: https://farm5.staticflickr.com/4290/34450900104_bc1d424213_k_d.jpg + Requests is under active development, and contributions are more than welcome! #. Check for open issues or open a fresh issue to start a discussion around a bug. From 0d82afa0c375f635ad26e98b3af4f99563586386 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:18:00 -0400 Subject: [PATCH 098/116] Update recommended.rst --- docs/community/recommended.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/recommended.rst b/docs/community/recommended.rst index 73520342..0f652d54 100644 --- a/docs/community/recommended.rst +++ b/docs/community/recommended.rst @@ -3,6 +3,8 @@ Recommended Packages and Extensions =================================== +.. image:: https://farm5.staticflickr.com/4218/35224319272_cfc0e621fb_k_d.jpg + Requests has a great variety of powerful and useful third-party extensions. This page provides an overview of some of the best of them. From c57bd07a341ca5d71bfa2c6a245a263d4cc53d54 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:19:01 -0400 Subject: [PATCH 099/116] Update faq.rst --- docs/community/faq.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/faq.rst b/docs/community/faq.rst index 70872292..7f5a0e1e 100644 --- a/docs/community/faq.rst +++ b/docs/community/faq.rst @@ -3,6 +3,8 @@ Frequently Asked Questions ========================== +.. image:: https://farm5.staticflickr.com/4290/35294660055_42c02b2316_k_d.jpg + This part of the documentation answers common questions about Requests. Encoded Data? From 328cff252d1652c66b536387ad97152663a4543e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:19:36 -0400 Subject: [PATCH 100/116] Update out-there.rst --- docs/community/out-there.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/out-there.rst b/docs/community/out-there.rst index 645c0ac4..5ce5f79f 100644 --- a/docs/community/out-there.rst +++ b/docs/community/out-there.rst @@ -1,6 +1,8 @@ Integrations ============ +.. image:: https://farm5.staticflickr.com/4239/34450900674_15863ddea0_k_d.jpg + Python for iOS -------------- From c49f3643ae3c837b0c8863e8fc2f4efd885bf412 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:20:03 -0400 Subject: [PATCH 101/116] Update release-process.rst --- docs/community/release-process.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/release-process.rst b/docs/community/release-process.rst index c0943ddc..2e317ceb 100644 --- a/docs/community/release-process.rst +++ b/docs/community/release-process.rst @@ -1,6 +1,8 @@ Release Process and Rules ========================= +.. image:: https://farm5.staticflickr.com/4215/34450901614_b74ae720db_k_d.jpg + .. versionadded:: v2.6.2 Starting with the version to be released after ``v2.6.2``, the following rules From 068d8863d18908bdf0aea238168d157fb164bc91 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:21:04 -0400 Subject: [PATCH 102/116] Update support.rst --- docs/community/support.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/support.rst b/docs/community/support.rst index 4d5b0c35..02e8da75 100644 --- a/docs/community/support.rst +++ b/docs/community/support.rst @@ -3,6 +3,8 @@ Support ======= +.. image:: https://farm5.staticflickr.com/4198/34080352913_5c13ffb336_k_d.jpg + If you have questions or issues about Requests, there are several options: StackOverflow From 4bda7b66e7ece5be51b459edd046a70915b4792c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 4 Sep 2017 16:21:57 -0400 Subject: [PATCH 103/116] Update updates.rst --- docs/community/updates.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/community/updates.rst b/docs/community/updates.rst index e1f0d8db..f755a493 100644 --- a/docs/community/updates.rst +++ b/docs/community/updates.rst @@ -4,6 +4,8 @@ Community Updates ================= +.. image:: https://farm5.staticflickr.com/4244/34080354873_516c283ad0_k_d.jpg + If you'd like to stay up to date on the community and development of Requests, there are several options: From fdb9b753b47e7abead1ec75d860c9c9b929ca5f5 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 5 Sep 2017 11:31:16 -0400 Subject: [PATCH 104/116] Update authors.rst --- docs/dev/authors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/authors.rst b/docs/dev/authors.rst index 38815823..4cdd14cd 100644 --- a/docs/dev/authors.rst +++ b/docs/dev/authors.rst @@ -1,6 +1,6 @@ Authors ======= -.. image:: https://farm5.staticflickr.com/4230/35163669920_f19e591efc_k_d.jpg +.. image:: https://static1.squarespace.com/static/533ad9bde4b098d084a846b1/t/534f6e1ce4b09b70f38ee6c1/1432265542589/DSCF3147.jpg?format=2500w .. include:: ../../AUTHORS.rst From 4c300c2067517738e80c3e908279828a6edc7de3 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 17 Sep 2017 11:24:05 -0400 Subject: [PATCH 105/116] pipfile Signed-off-by: Kenneth Reitz --- Makefile | 10 +- Pipfile | 25 +++ Pipfile.lock | 522 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 2 +- 4 files changed, 553 insertions(+), 6 deletions(-) create mode 100644 Pipfile create mode 100644 Pipfile.lock diff --git a/Makefile b/Makefile index 92d1c344..79d229f2 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,20 @@ .PHONY: docs init: - pip install -r requirements.txt + pipenv install --dev --skip-lock test: # This runs all of the tests, on both Python 2 and Python 3. detox ci: - py.test -n 8 --boxed --junitxml=report.xml + pipenv run py.test -n 8 --boxed --junitxml=report.xml test-readme: - @python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!" + @pipenv run python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!" flake8: - flake8 --ignore=E501,F401,E128,E402,E731,F821 requests + pipenv run flake8 --ignore=E501,F401,E128,E402,E731,F821 requests coverage: - py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests + pipenv run py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests publish: pip install 'twine>=1.5.0' diff --git a/Pipfile b/Pipfile new file mode 100644 index 00000000..fbe38b17 --- /dev/null +++ b/Pipfile @@ -0,0 +1,25 @@ +[[source]] +url = "https://pypi.python.org/simple" +verify_ssl = true + +[dev-packages] + +pytest = ">=2.8.0" +codecov = "*" +pytest-httpbin = "==0.0.7" +pytest-mock = "*" +pytest-cov = "*" +pytest-xdist = "*" +alabaster = "*" +readme_renderer = "*" +Sphinx = "<=1.5.5" +PySocks = "*" +docutils = "*" +flake8 = "*" +tox = "*" +detox = "*" +httpbin = "==0.5.0" + +[packages] + +"-e ." = {extras = ["socks"]} \ No newline at end of file diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 00000000..a3e6c1d5 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,522 @@ +{ + "_meta": { + "hash": { + "sha256": "d3e988a0aa3b604f8687d0c3bc3d357f321d026abbb48b0b97829a506530424d" + }, + "host-environment-markers": { + "implementation_name": "cpython", + "implementation_version": "0", + "os_name": "posix", + "platform_machine": "x86_64", + "platform_python_implementation": "CPython", + "platform_release": "16.7.0", + "platform_system": "Darwin", + "platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64", + "python_full_version": "2.7.13", + "python_version": "2.7", + "sys_platform": "darwin" + }, + "pipfile-spec": 3, + "requires": {}, + "sources": [ + { + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "-e .": { + "extras": [ + "socks" + ] + }, + "certifi": { + "hashes": [ + "sha256:54a07c09c586b0e4c619f02a5e94e36619da8e2b053e20f594348c0611803704", + "sha256:40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5" + ], + "version": "==2017.7.27.1" + }, + "chardet": { + "hashes": [ + "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691", + "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" + ], + "version": "==3.0.4" + }, + "idna": { + "hashes": [ + "sha256:8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4", + "sha256:2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" + ], + "version": "==2.6" + }, + "pysocks": { + "hashes": [ + "sha256:18842328a4e6061f084cfba70f6950d9140ecf7418b3df7cef558ebb217bac8d", + "sha256:d00329f27efa157db7efe3ca26fcd69033cd61f83822461ee3f8a353b48e33cf" + ], + "version": "==1.6.7" + }, + "requests": { + "hashes": [ + "sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b", + "sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" + ], + "version": "==2.18.4" + }, + "urllib3": { + "hashes": [ + "sha256:06330f386d6e4b195fbfc736b297f58c5a892e4440e54d294d7004e3a9bbea1b", + "sha256:cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" + ], + "version": "==1.22" + } + }, + "develop": { + "alabaster": { + "hashes": [ + "sha256:2eef172f44e8d301d25aff8068fddd65f767a3f04b5f15b0f4922f113aa1c732", + "sha256:37cdcb9e9954ed60912ebc1ca12a9d12178c26637abdf124e3cde2341c257fe0" + ], + "version": "==0.7.10" + }, + "apipkg": { + "hashes": [ + "sha256:65d2aa68b28e7d31233bb2ba8eb31cda40e4671f8ac2d6b241e358c9652a74b9", + "sha256:2e38399dbe842891fe85392601aab8f40a8f4cc5a9053c326de35a1cc0297ac6" + ], + "version": "==1.4" + }, + "babel": { + "hashes": [ + "sha256:f20b2acd44f587988ff185d8949c3e208b4b3d5d20fcab7d91fe481ffa435528", + "sha256:6007daf714d0cd5524bbe436e2d42b3c20e68da66289559341e48d2cd6d25811" + ], + "version": "==2.5.1" + }, + "bleach": { + "hashes": [ + "sha256:a6d9d5f5b7368c1689ad7f128af8e792beea23393688872b576c0271e6564a16", + "sha256:b9522130003e4caedf4f00a39c120a906dcd4242329c1c8f621f5370203cbc30" + ], + "version": "==2.0.0" + }, + "certifi": { + "hashes": [ + "sha256:54a07c09c586b0e4c619f02a5e94e36619da8e2b053e20f594348c0611803704", + "sha256:40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5" + ], + "version": "==2017.7.27.1" + }, + "chardet": { + "hashes": [ + "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691", + "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" + ], + "version": "==3.0.4" + }, + "click": { + "hashes": [ + "sha256:29f99fc6125fbc931b758dc053b3114e55c77a6e4c6c3a2674a2dc986016381d", + "sha256:f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" + ], + "version": "==6.7" + }, + "codecov": { + "hashes": [ + "sha256:ad82f054837b02081f86ed1eb6c04cddc029fbc734eaf92ff73da1db3a79188b", + "sha256:db1c182ca896244d8644d8410a33f6f6dd1cc24d80209907a65077445923f00c" + ], + "version": "==2.0.9" + }, + "configparser": { + "hashes": [ + "sha256:5308b47021bc2340965c371f0f058cc6971a04502638d4244225c49d80db273a" + ], + "version": "==3.5.0" + }, + "coverage": { + "hashes": [ + "sha256:c1456f66c536010cf9e4633a8853a9153e8fd588393695295afd4d0fc16c1d74", + "sha256:97a7ec51cdde3a386e390b159b20f247ccb478084d925c75f1faa3d26c01335e", + "sha256:83e955b975666b5a07d217135e7797857ce844eb340a99e46cc25525120417c4", + "sha256:483ed14080c5301048128bb027b77978c632dd9e92e3ecb09b7e28f5b92abfcf", + "sha256:ef574ab9640bcfa2f3c671831faf03f65788945fdf8efa4d4a1fffc034838e2a", + "sha256:c5a205b4da3c624f5119dc4d84240789b5906bb8468902ec22dcc4aad8aa4638", + "sha256:5dea90ed140e7fa9bc00463313f9bc4a6e6aff297b4969615e7a688615c4c4d2", + "sha256:f9e83b39d29c2815a38e4118d776b482d4082b5bf9c9147fbc99a3f83abe480a", + "sha256:700040c354f0230287906b1276635552a3def4b646e0145555bc9e2e5da9e365", + "sha256:7f1eacae700c66c3d7362a433b228599c9d94a5a3a52613dddd9474e04deb6bc", + "sha256:13ef9f799c8fb45c446a239df68034de3a6f3de274881b088bebd7f5661f79f8", + "sha256:dfb011587e2b7299112f08a2a60d2601706aac9abde37aa1177ea825adaed923", + "sha256:381be5d31d3f0d912334cf2c159bc7bea6bfe6b0e3df6061a3bf2bf88359b1f6", + "sha256:83a477ac4f55a6ef59552683a0544d47b68a85ce6a80fd0ca6b3dc767f6495fb", + "sha256:dfd35f1979da31bcabbe27bcf78d4284d69870731874af629082590023a77336", + "sha256:9681efc2d310cfc53863cc6f63e88ebe7a48124550fa822147996cb09390b6ab", + "sha256:53770b20ac5b4a12e99229d4bae57af0945be87cc257fce6c6c7571a39f0c5d4", + "sha256:8801880d32f11b6df11c32a961e186774b4634ae39d7c43235f5a24368a85f07", + "sha256:16db2c69a1acbcb3c13211e9f954e22b22a729909d81f983b6b9badacc466eda", + "sha256:ef43a06a960b46c73c018704051e023ee6082030f145841ffafc8728039d5a88", + "sha256:c3e2736664a6074fc9bd54fb643f5af0fc60bfedb2963b3d3f98c7450335e34c", + "sha256:17709e22e4c9f5412ba90f446fb13b245cc20bf4a60377021bbff6c0f1f63e7c", + "sha256:a2f7106d1167825c4115794c2ba57cc3b15feb6183db5328fa66f94c12902d8b", + "sha256:2a08e978f402696c6956eee9d1b7e95d3ad042959b71bafe1f3e4557cbd6e0ac", + "sha256:57f510bb16efaec0b6f371b64a8000c62e7e3b3e48e8b0a5745ade078d849814", + "sha256:0f1883eab9c19aa243f51308751b8a2a547b9b817b721cc0ecf3efb99fafbea7", + "sha256:e00fe141e22ce6e9395aa24d862039eb180c6b7e89df0bbaf9765e9aebe560a9", + "sha256:ec596e4401553caa6dd2e3349ce47f9ef82c1f1bcba5d8ac3342724f0df8d6ff", + "sha256:c820a533a943ebc860acc0ce6a00dd36e0fdf2c6f619ff8225755169428c5fa2", + "sha256:b7f7283eb7badd2b8a9c6a9d6eeca200a0a24db6be79baee2c11398f978edcaa", + "sha256:a5ed27ad3e8420b2d6b625dcbd3e59488c14ccc06030167bcf14ffb0f4189b77", + "sha256:d7b70b7b4eb14d0753d33253fe4f121ca99102612e2719f0993607deb30c6f33", + "sha256:4047dc83773869701bde934fb3c4792648eda7c0e008a77a0aec64157d246801", + "sha256:7a9c44400ee0f3b4546066e0710e1250fd75831adc02ab99dda176ad8726f424", + "sha256:0f649e68db74b1b5b8ca4161d08eb2b8fa8ae11af1ebfb80e80e112eb0ef5300", + "sha256:52964fae0fafef8bd283ad8e9a9665205a9fdf912535434defc0ec3def1da26b", + "sha256:36aa6c8db83bc27346ddcd8c2a60846a7178ecd702672689d3ea1828eb1a4d11", + "sha256:9824e15b387d331c0fc0fef905a539ab69784368a1d6ac3db864b4182e520948", + "sha256:4a678e1b9619a29c51301af61ab84122e2f8cc7a0a6b40854b808ac6be604300", + "sha256:8bb7c8dca54109b61013bc4114d96effbf10dea136722c586bce3a5d9fc4e730", + "sha256:1a41d621aa9b6ab6457b557a754d50aaff0813fad3453434de075496fca8a183", + "sha256:0fa423599fc3d9e18177f913552cdb34a8d9ad33efcf52a98c9d4b644edb42c5", + "sha256:e61a4ba0b2686040cb4828297c7e37bcaf3a1a1c0bc0dbe46cc789dde51a80fa", + "sha256:ce9ef0fc99d11d418662e36fd8de6d71b19ec87c2eab961a117cc9d087576e72" + ], + "version": "==4.4.1" + }, + "decorator": { + "hashes": [ + "sha256:95a26b17806e284452bfd97fa20aa1e8cb4ee23542bda4dbac5e4562aa1642cd", + "sha256:7cb64d38cb8002971710c8899fbdfb859a23a364b7c99dab19d1f719c2ba16b5" + ], + "version": "==4.1.2" + }, + "detox": { + "hashes": [ + "sha256:af0097ea01263f68f546826df69b9301458d6cec0ed278c53c01f9529fbd349e", + "sha256:4719ca48c4ea5ffd908b1bc3d5d1b593b41e71dee17180d58d8a3e7e8f588d45" + ], + "version": "==0.11" + }, + "docutils": { + "hashes": [ + "sha256:7a4bd47eaf6596e1295ecb11361139febe29b084a87bf005bf899f9a42edc3c6", + "sha256:02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6", + "sha256:51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274" + ], + "version": "==0.14" + }, + "enum-compat": { + "hashes": [ + "sha256:939ceff18186a5762ae4db9fa7bfe017edbd03b66526b798dd8245394c8a4192" + ], + "version": "==0.0.2" + }, + "enum34": { + "hashes": [ + "sha256:6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79", + "sha256:644837f692e5f550741432dd3f223bbb9852018674981b1664e5dc339387588a", + "sha256:8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1", + "sha256:2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850" + ], + "version": "==1.1.6" + }, + "eventlet": { + "hashes": [ + "sha256:0a7d1e1d2f4dd2e0b2cb627dadf7a0f23de0eca88ba2d6af4229abe32a24dec9", + "sha256:08faffab88c1b08bd53ea28bf084a572c89f7e7648bd9d71e6116ac17a51a15d" + ], + "version": "==0.21.0" + }, + "execnet": { + "hashes": [ + "sha256:d2b909c7945832e1c19cfacd96e78da68bdadc656440cfc7dfe59b766744eb8c", + "sha256:f66dd4a7519725a1b7e14ad9ae7d3df8e09b2da88062386e08e941cafc0ef3e6" + ], + "version": "==1.4.1" + }, + "flake8": { + "hashes": [ + "sha256:f1a9d8886a9cbefb52485f4f4c770832c7fb569c084a9a314fb1eaa37c0c2c86", + "sha256:c20044779ff848f67f89c56a0e4624c04298cd476e25253ac0c36f910a1a11d8" + ], + "version": "==3.4.1" + }, + "flask": { + "hashes": [ + "sha256:0749df235e3ff61ac108f69ac178c9770caeaccad2509cb762ce1f65570a8856", + "sha256:49f44461237b69ecd901cc7ce66feea0319b9158743dd27a2899962ab214dac1" + ], + "version": "==0.12.2" + }, + "funcsigs": { + "hashes": [ + "sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca", + "sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50" + ], + "version": "==1.0.2" + }, + "greenlet": { + "hashes": [ + "sha256:96888e47898a471073b394ea641b7d675c1d054c580dd4a04a382bd34e67d89e", + "sha256:d2d5103f6cba131e1be660230018e21f276911d2b68b629ead1c5cb5e5472ac7", + "sha256:bc339de0e0969de5118d0b62a080a7611e2ba729a90f4a3ad78559c51bc5576d", + "sha256:b8ab98f8ae25938326dc4c21e3689a933531500ae4f3bfcefe36e3e25fda4dbf", + "sha256:416a3328d7e0a19aa1df3ec09524a109061fd7b80e010ef0dff9f695b4ac5e20", + "sha256:21232907c8c26838b16915bd8fbbf82fc70c996073464cc70981dd4a96bc841c", + "sha256:6803d8c6b235c861c50afddf00c7467ffbcd5ab960d137ff0f9c36f2cb11ee4b", + "sha256:76dab055476dd4dabb00a967b4df1990b25542d17eaa40a18f66971d10193e0b", + "sha256:70b9ff28921f5a3c03df4896ec8c55f5f94c593d7a79abd98b4c5c4a692ba873", + "sha256:7114b757b4146f4c87a0f00f1e58abd4c4729836679af0fc37266910a4a72eb0", + "sha256:0d90c709355ed13f16676f84e5a9cd67826a9f5c5143381c21e8fc3100ade1f1", + "sha256:ebae83b6247f83b1e8d887733dfa8046ce6e29d8b3e2a7380256e9de5c6ae55d", + "sha256:e841e3ece633acae5e2bf6102140a605ffee7d5d4921dca1625c5fdc0f0b3248", + "sha256:3e5e9be157ece49e4f97f3225460caf758ccb00f934fcbc5db34367cc1ff0aee", + "sha256:e77b708c37b652c7501b9f8f6056b23633c567aaa0d29edfef1c11673c64b949", + "sha256:0da1fc809c3bdb93fbacd0f921f461aacd53e554a7b7d4e9953ba09131c4206e", + "sha256:66fa5b101fcf4521138c1a29668074268d938bbb7de739c8faa9f92ea1f05e1f", + "sha256:e5451e1ce06b74a4861576c2db74405a4398c4809a105774550a9e52cfc8c4da", + "sha256:9c407aa6adfd4eea1232e81aa9f3cb3d9b955a9891c4819bf9b498c77efba14b", + "sha256:b56ac981f07b77e72ad5154278b93396d706572ea52c2fce79fee2abfcc8bfa6", + "sha256:e4c99c6010a5d153d481fdaf63b8a0782825c0721506d880403a3b9b82ae347e" + ], + "version": "==0.4.12" + }, + "html5lib": { + "hashes": [ + "sha256:b8934484cf22f1db684c0fae27569a0db404d0208d20163fbf51cc537245d008", + "sha256:ee747c0ffd3028d2722061936b5c65ee4fe13c8e4613519b4447123fc4546298" + ], + "version": "==0.999999999" + }, + "httpbin": { + "hashes": [ + "sha256:710069973216d4bbf9ab6757f1e9a1f3be05832ce77da023adce0a98dfeecfee", + "sha256:79fbc5d27e4194ea908b0fa18e09a59d95d287c91667aa69bcd010342d1589b5" + ], + "version": "==0.5.0" + }, + "idna": { + "hashes": [ + "sha256:8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4", + "sha256:2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f" + ], + "version": "==2.6" + }, + "imagesize": { + "hashes": [ + "sha256:6ebdc9e0ad188f9d1b2cdd9bc59cbe42bf931875e829e7a595e6b3abdc05cdfb", + "sha256:0ab2c62b87987e3252f89d30b7cedbec12a01af9274af9ffa48108f2c13c6062" + ], + "version": "==0.7.1" + }, + "itsdangerous": { + "hashes": [ + "sha256:cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519" + ], + "version": "==0.24" + }, + "jinja2": { + "hashes": [ + "sha256:2231bace0dfd8d2bf1e5d7e41239c06c9e0ded46e70cc1094a0aa64b0afeb054", + "sha256:ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff" + ], + "version": "==2.9.6" + }, + "markupsafe": { + "hashes": [ + "sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" + ], + "version": "==1.0" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, + "mock": { + "hashes": [ + "sha256:5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", + "sha256:b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba" + ], + "version": "==2.0.0" + }, + "pbr": { + "hashes": [ + "sha256:60c25b7dfd054ef9bb0ae327af949dd4676aa09ac3a9471cdc871d8a9213f9ac", + "sha256:05f61c71aaefc02d8e37c0a3eeb9815ff526ea28b3b76324769e6158d7f95be1" + ], + "version": "==3.1.1" + }, + "pluggy": { + "hashes": [ + "sha256:bd60171dbb250fdebafad46ed16d97065369da40568ae948ef7117eee8536e94" + ], + "version": "==0.5.2" + }, + "py": { + "hashes": [ + "sha256:2ccb79b01769d99115aa600d7eed99f524bf752bba8f041dc1c184853514655a", + "sha256:0f2d585d22050e90c7d293b6451c83db097df77871974d90efd5a30dc12fcde3" + ], + "version": "==1.4.34" + }, + "pycodestyle": { + "hashes": [ + "sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9", + "sha256:682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766" + ], + "version": "==2.3.1" + }, + "pyflakes": { + "hashes": [ + "sha256:cc5eadfb38041f8366128786b4ca12700ed05bbf1403d808e89d57d67a3875a7", + "sha256:aa0d4dff45c0cc2214ba158d29280f8fa1129f3e87858ef825930845146337f4" + ], + "version": "==1.5.0" + }, + "pygments": { + "hashes": [ + "sha256:78f3f434bcc5d6ee09020f92ba487f95ba50f1e3ef83ae96b9d5ffa1bab25c5d", + "sha256:dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" + ], + "version": "==2.2.0" + }, + "pysocks": { + "hashes": [ + "sha256:18842328a4e6061f084cfba70f6950d9140ecf7418b3df7cef558ebb217bac8d", + "sha256:d00329f27efa157db7efe3ca26fcd69033cd61f83822461ee3f8a353b48e33cf" + ], + "version": "==1.6.7" + }, + "pytest": { + "hashes": [ + "sha256:b84f554f8ddc23add65c411bf112b2d88e2489fd45f753b1cae5936358bdf314", + "sha256:f46e49e0340a532764991c498244a60e3a37d7424a532b3ff1a6a7653f1a403a" + ], + "version": "==3.2.2" + }, + "pytest-cov": { + "hashes": [ + "sha256:890fe5565400902b0c78b5357004aab1c814115894f4f21370e2433256a3eeec", + "sha256:03aa752cf11db41d281ea1d807d954c4eda35cfa1b21d6971966cc041bbf6e2d" + ], + "version": "==2.5.1" + }, + "pytest-forked": { + "hashes": [ + "sha256:f275cb48a73fc61a6710726348e1da6d68a978f0ec0c54ece5a5fae5977e5a08", + "sha256:e4500cd0509ec4a26535f7d4112a8cc0f17d3a41c29ffd4eab479d2a55b30805" + ], + "version": "==0.2" + }, + "pytest-httpbin": { + "hashes": [ + "sha256:f430f0b5742a9d325148a3428f890f538f331cb7b244a49873cc322f838c85ea", + "sha256:03af8a7055c8bbcb68b14d9a14c103c82c97aeb86a8f1b29cd63d83644c2f021" + ], + "version": "==0.0.7" + }, + "pytest-mock": { + "hashes": [ + "sha256:7ed6e7e8c636fd320927c5d73aedb77ac2eeb37196c3410e6176b7c92fdf2f69", + "sha256:920d1167af5c2c2ad3fa0717d0c6c52e97e97810160c15721ac895cac53abb1c" + ], + "version": "==1.6.3" + }, + "pytest-xdist": { + "hashes": [ + "sha256:7924d45c2430191fe3679a58116c74ceea13307d7822c169d65fd59a24b3a4fe" + ], + "version": "==1.20.0" + }, + "pytz": { + "hashes": [ + "sha256:c883c2d6670042c7bc1688645cac73dd2b03193d1f7a6847b6154e96890be06d", + "sha256:03c9962afe00e503e2d96abab4e8998a0f84d4230fa57afe1e0528473698cdd9", + "sha256:487e7d50710661116325747a9cd1744d3323f8e49748e287bc9e659060ec6bf9", + "sha256:43f52d4c6a0be301d53ebd867de05e2926c35728b3260157d274635a0a947f1c", + "sha256:d1d6729c85acea5423671382868627129432fba9a89ecbb248d8d1c7a9f01c67", + "sha256:54a935085f7bf101f86b2aff75bd9672b435f51c3339db2ff616e66845f2b8f9", + "sha256:39504670abb5dae77f56f8eb63823937ce727d7cdd0088e6909e6dcac0f89043", + "sha256:ddc93b6d41cfb81266a27d23a79e13805d4a5521032b512643af8729041a81b4", + "sha256:f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589" + ], + "version": "==2017.2" + }, + "readme-renderer": { + "hashes": [ + "sha256:c9637bfcf1ff40f7683b3439f4b97eb0f9a1cffc2a1fad5fa01debd667ddb111", + "sha256:9deab442963a63a71ab494bf581b1c844473995a2357f4b3228a1df1c8cba8da" + ], + "version": "==17.2" + }, + "requests": { + "hashes": [ + "sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b", + "sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" + ], + "version": "==2.18.4" + }, + "six": { + "hashes": [ + "sha256:0ff78c403d9bccf5a425a6d31a12aa6b47f1c21ca4dc2573a7e2f32a97335eb1", + "sha256:105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" + ], + "version": "==1.10.0" + }, + "snowballstemmer": { + "hashes": [ + "sha256:9f3bcd3c401c3e862ec0ebe6d2c069ebc012ce142cce209c098ccb5b09136e89", + "sha256:919f26a68b2c17a7634da993d91339e288964f93c274f1343e3bbbe2096e1128" + ], + "version": "==1.2.1" + }, + "sphinx": { + "hashes": [ + "sha256:11f271e7a9398385ed730e90f0bb41dc3815294bdcd395b46ed2d033bc2e7d87", + "sha256:4064ea6c56feeb268838cb8fbbee507d0c3d5d92fa63a7df935a916b52c9e2f5" + ], + "version": "==1.5.5" + }, + "tox": { + "hashes": [ + "sha256:49d88f2c217352c499450e9f61ca82fd9c8873d01a45555bb342a32f2b6753a2", + "sha256:d9c279e707d2cfef8d77d10f13b38b3e68b7e470018b45747560f6c3c66d6b83" + ], + "version": "==2.8.2" + }, + "urllib3": { + "hashes": [ + "sha256:06330f386d6e4b195fbfc736b297f58c5a892e4440e54d294d7004e3a9bbea1b", + "sha256:cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f" + ], + "version": "==1.22" + }, + "virtualenv": { + "hashes": [ + "sha256:39d88b533b422825d644087a21e78c45cf5af0ef7a99a1fc9fbb7b481e5c85b0", + "sha256:02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a" + ], + "version": "==15.1.0" + }, + "webencodings": { + "hashes": [ + "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", + "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + ], + "version": "==0.5.1" + }, + "werkzeug": { + "hashes": [ + "sha256:e8549c143af3ce6559699a01e26fa4174f4c591dbee0a499f3cd4c3781cdec3d", + "sha256:903a7b87b74635244548b30d30db4c8947fe64c5198f58899ddcd3a13c23bb26" + ], + "version": "==0.12.2" + } + } +} diff --git a/requirements.txt b/requirements.txt index d7ad8765..6ec7e343 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ --e .[socks] + pytest>=2.8.0 codecov pytest-httpbin==0.0.7 From 70a4ae744c4fbb2096a3994d09b56619b4dde031 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 17 Sep 2017 11:26:22 -0400 Subject: [PATCH 106/116] pip install pipenv Signed-off-by: Kenneth Reitz --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 79d229f2..317a7c76 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .PHONY: docs init: + pip install pipenv --upgrade pipenv install --dev --skip-lock test: # This runs all of the tests, on both Python 2 and Python 3. From c3ecb825c41f90fb6bec28c282c70c84398e08c0 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 17 Sep 2017 11:30:26 -0400 Subject: [PATCH 107/116] don't test on 2.6 Signed-off-by: Kenneth Reitz --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 395f5731..b7693f63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: false language: python python: - - "2.6" + # - "2.6" - "2.7" - "3.4" - "3.5" From d55213246434efc90a1d048b864daf8bb9d8b4bc Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 17 Sep 2017 11:36:54 -0400 Subject: [PATCH 108/116] run coverage w/ pipenv Signed-off-by: Kenneth Reitz --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4f06557e..1da1fa88 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -48,4 +48,4 @@ test_script: - "C:\\MinGW\\bin\\mingw32-make coverage" on_success: - - "codecov -f coverage.xml" + - "pipenv run codecov -f coverage.xml" From a9d05f06cddf8eb74786f22c4e331e5d7c2ce6ca Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 17 Sep 2017 11:39:53 -0400 Subject: [PATCH 109/116] remove requirements.txt Signed-off-by: Kenneth Reitz --- requirements.txt | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 6ec7e343..00000000 --- a/requirements.txt +++ /dev/null @@ -1,17 +0,0 @@ - -pytest>=2.8.0 -codecov -pytest-httpbin==0.0.7 -pytest-mock -pytest-cov -pytest-xdist -alabaster -readme_renderer -Sphinx<=1.5.5 -PySocks -setuptools>=18.5 -docutils -flake8 -tox -detox -httpbin==0.5.0 From 28ae74dbada502b4d1091dca68a6899a7d2d159d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 17 Sep 2017 11:46:33 -0400 Subject: [PATCH 110/116] update tests Signed-off-by: Kenneth Reitz --- tests/test_requests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_requests.py b/tests/test_requests.py index a2b2213f..4d399518 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -634,7 +634,7 @@ class TestRequests: post1 = requests.post(url, data={'some': 'data'}) assert post1.status_code == 200 - with open('requirements.txt') as f: + with open('Pipfile') as f: post2 = requests.post(url, files={'some': f}) assert post2.status_code == 200 @@ -694,7 +694,7 @@ class TestRequests: post1 = requests.post(url, data={'some': 'data'}) assert post1.status_code == 200 - with open('requirements.txt') as f: + with open('Pipfile') as f: post2 = requests.post(url, data={'some': 'data'}, files={'some': f}) assert post2.status_code == 200 @@ -731,7 +731,7 @@ class TestRequests: def test_conflicting_post_params(self, httpbin): url = httpbin('post') - with open('requirements.txt') as f: + with open('Pipfile') as f: pytest.raises(ValueError, "requests.post(url, data='[{\"some\": \"data\"}]', files={'some': f})") pytest.raises(ValueError, "requests.post(url, data=u('[{\"some\": \"data\"}]'), files={'some': f})") From 0eb9a4c1617909bbbb465a9987c7cba0f515eaa6 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 19 Sep 2017 13:19:03 -0400 Subject: [PATCH 111/116] stickers Signed-off-by: Kenneth Reitz --- docs/_templates/sidebarintro.html | 1 + docs/_templates/sidebarlogo.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index 7e1795a3..5b437d85 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -16,6 +16,7 @@ +

          Stickers!

          Stay Informed

          Receive updates on new releases and upcoming projects.

          diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index fba676f1..b31c3477 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -13,7 +13,7 @@ human beings. You are currently looking at the documentation of the development release.

          - +

          Stickers!

          Stay Informed

          Receive updates on new releases and upcoming projects.

          From 40c8bcf70ce397bf8d8ffcf3e8471e5da1d76dfc Mon Sep 17 00:00:00 2001 From: Ian Stapleton Cordasco Date: Sat, 23 Sep 2017 15:53:42 -0500 Subject: [PATCH 112/116] Fix the invalid restructured text in HISTORY file This was breaking the display of our long_description on PyPI. --- HISTORY.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4694e495..7f18ea36 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -52,8 +52,8 @@ dev **Bugfixes** -- Fix an error in the packaging whereby the *.whl contained incorrect data that - regressed the fix in v2.17.3. +- Fix an error in the packaging whereby the ``*.whl`` contained incorrect data + that regressed the fix in v2.17.3. 2.18.0 (2017-06-14) +++++++++++++++++++ From e6afc37be5154fb6a068eb0dc066a5c1c30b0e80 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 25 Sep 2017 11:04:38 -0400 Subject: [PATCH 113/116] new pipfile with new syntax Signed-off-by: Kenneth Reitz --- Pipfile | 19 +++++++++---------- Pipfile.lock | 35 +++++++++++++++-------------------- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/Pipfile b/Pipfile index fbe38b17..716c0058 100644 --- a/Pipfile +++ b/Pipfile @@ -6,20 +6,19 @@ verify_ssl = true pytest = ">=2.8.0" codecov = "*" -pytest-httpbin = "==0.0.7" -pytest-mock = "*" -pytest-cov = "*" -pytest-xdist = "*" +"pytest-httpbin" = "==0.0.7" +"pytest-mock" = "*" +"pytest-cov" = "*" +"pytest-xdist" = "*" alabaster = "*" -readme_renderer = "*" -Sphinx = "<=1.5.5" -PySocks = "*" +"readme-renderer" = "*" +sphinx = "<=1.5.5" +pysocks = "*" docutils = "*" -flake8 = "*" +"flake8" = "*" tox = "*" detox = "*" httpbin = "==0.5.0" [packages] - -"-e ." = {extras = ["socks"]} \ No newline at end of file +"e1839a8" = {path = ".", editable = true, extras=["socks"]} \ No newline at end of file diff --git a/Pipfile.lock b/Pipfile.lock index a3e6c1d5..fd9a1a10 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,22 +1,22 @@ { "_meta": { "hash": { - "sha256": "d3e988a0aa3b604f8687d0c3bc3d357f321d026abbb48b0b97829a506530424d" + "sha256": "72b5a08e9c266b930d308024036e928e6b99ed4b7a50f22af377a463b7867a14" }, "host-environment-markers": { "implementation_name": "cpython", - "implementation_version": "0", + "implementation_version": "3.6.2", "os_name": "posix", "platform_machine": "x86_64", "platform_python_implementation": "CPython", "platform_release": "16.7.0", "platform_system": "Darwin", "platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64", - "python_full_version": "2.7.13", - "python_version": "2.7", + "python_full_version": "3.6.2", + "python_version": "3.6", "sys_platform": "darwin" }, - "pipfile-spec": 3, + "pipfile-spec": 6, "requires": {}, "sources": [ { @@ -26,11 +26,6 @@ ] }, "default": { - "-e .": { - "extras": [ - "socks" - ] - }, "certifi": { "hashes": [ "sha256:54a07c09c586b0e4c619f02a5e94e36619da8e2b053e20f594348c0611803704", @@ -45,6 +40,13 @@ ], "version": "==3.0.4" }, + "e1839a8": { + "editable": true, + "extras": [ + "socks" + ], + "path": "." + }, "idna": { "hashes": [ "sha256:8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4", @@ -59,13 +61,6 @@ ], "version": "==1.6.7" }, - "requests": { - "hashes": [ - "sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b", - "sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e" - ], - "version": "==2.18.4" - }, "urllib3": { "hashes": [ "sha256:06330f386d6e4b195fbfc736b297f58c5a892e4440e54d294d7004e3a9bbea1b", @@ -464,10 +459,10 @@ }, "six": { "hashes": [ - "sha256:0ff78c403d9bccf5a425a6d31a12aa6b47f1c21ca4dc2573a7e2f32a97335eb1", - "sha256:105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" + "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb", + "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" ], - "version": "==1.10.0" + "version": "==1.11.0" }, "snowballstemmer": { "hashes": [ From 15054aa3909da2383e8cfa9abcd296ba46a7200f Mon Sep 17 00:00:00 2001 From: Taylor Rose Date: Tue, 10 Oct 2017 13:21:11 -0400 Subject: [PATCH 114/116] Warn user about possible slowdown when using cryptography version < 1.3.4 --- AUTHORS.rst | 1 + HISTORY.rst | 2 ++ requests/__init__.py | 15 +++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index b87dc443..cdf8c516 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -178,3 +178,4 @@ Patches and Suggestions - Ryan Pineo (`@ryanpineo `_) - Ed Morley (`@edmorley `_) - Matt Liu (`@mlcrazy `_) +- Taylor Hoff (`@PrimordialHelios `_) diff --git a/HISTORY.rst b/HISTORY.rst index 7f18ea36..89a0b0dc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,8 @@ dev **Improvements** +- Warn user about possible slowdown when using cryptography version < 1.3.4 + **Bugfixes** - Parsing empty ``Link`` headers with ``parse_header_links()`` no longer return one bogus entry diff --git a/requests/__init__.py b/requests/__init__.py index 268e7dcc..6fa855df 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -71,6 +71,17 @@ def check_compatibility(urllib3_version, chardet_version): assert patch >= 2 +def _check_cryptography(cryptography_version): + # cryptography < 1.3.4 + try: + cryptography_version = list(map(int, cryptography_version.split('.'))) + except ValueError: + return + + if cryptography_version < [1, 3, 4]: + warning = 'Old version of cryptography ({0}) may cause slowdown.'.format(cryptography_version) + warnings.warn(warning, RequestsDependencyWarning) + # Check imported dependencies for compatibility. try: check_compatibility(urllib3.__version__, chardet.__version__) @@ -83,6 +94,10 @@ except (AssertionError, ValueError): try: from urllib3.contrib import pyopenssl pyopenssl.inject_into_urllib3() + + # Check cryptography version + from cryptography import __version__ as cryptography_version + _check_cryptography(cryptography_version) except ImportError: pass From 4316af7ae82553f094b101d69b3e9c28ebbf0c18 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 15 Oct 2017 19:52:19 +0300 Subject: [PATCH 115/116] Python 3.7 not officially supported yet --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e0dc5e4f..5908162a 100644 --- a/README.rst +++ b/README.rst @@ -77,7 +77,7 @@ Requests is ready for today's web. - ``.netrc`` Support - Chunked Requests -Requests officially supports Python 2.6–2.7 & 3.3–3.7, and runs great on PyPy. +Requests officially supports Python 2.6–2.7 & 3.3–3.6, and runs great on PyPy. Installation ------------ From ec5804c706fcf2260ff85132b878851ffbbc2a6f Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 15 Oct 2017 20:04:51 +0300 Subject: [PATCH 116/116] Python 3.3 has already been dropped (#4231) --- README.rst | 2 +- requests/sessions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5908162a..915f2a11 100644 --- a/README.rst +++ b/README.rst @@ -77,7 +77,7 @@ Requests is ready for today's web. - ``.netrc`` Support - Chunked Requests -Requests officially supports Python 2.6–2.7 & 3.3–3.6, and runs great on PyPy. +Requests officially supports Python 2.6–2.7 & 3.4–3.6, and runs great on PyPy. Installation ------------ diff --git a/requests/sessions.py b/requests/sessions.py index 6570e733..391f857d 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -39,7 +39,7 @@ from .models import REDIRECT_STATI # Preferred clock, based on which one is more accurate on a given system. if platform.system() == 'Windows': - try: # Python 3.3+ + try: # Python 3.4+ preferred_clock = time.perf_counter except AttributeError: # Earlier than Python 3. preferred_clock = time.clock