[Python-modules-commits] [requests] 08/13: merge patched into master
Daniele Tricoli
eriol-guest at moszumanska.debian.org
Thu Sep 8 22:32:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
eriol-guest pushed a commit to branch master
in repository requests.
commit fde228207040ecc3f012170a299f774a4430d453
Merge: cc2d917 3259bc6
Author: Daniele Tricoli <eriol at mornie.org>
Date: Thu Sep 8 22:00:53 2016 +0200
merge patched into master
HISTORY.rst | 44 +-
PKG-INFO | 51 +-
README.rst | 5 +-
debian/.git-dpm | 6 +-
debian/patches/01_use-system-ca-certificates.patch | 4 +-
debian/patches/02_populate-install_requires.patch | 2 +-
debian/patches/03_export-IncompleteRead.patch | 8 +-
debian/patches/use-pip-unbundling.patch | 2 +-
requests/__init__.py | 7 +-
requests/adapters.py | 22 +-
requests/api.py | 1 -
requests/auth.py | 12 +-
requests/certs.py | 4 +-
requests/compat.py | 6 +-
requests/cookies.py | 103 +++-
requests/exceptions.py | 18 +-
requests/hooks.py | 2 +-
requests/models.py | 54 +-
requests/packages/urllib3/__init__.py | 2 +-
requests/packages/urllib3/connectionpool.py | 37 +-
requests/packages/urllib3/contrib/appengine.py | 2 +-
requests/packages/urllib3/contrib/socks.py | 2 +-
requests/packages/urllib3/packages/six.py | 635 ++++++++++++++++++---
requests/packages/urllib3/poolmanager.py | 93 ++-
requests/packages/urllib3/response.py | 4 +
requests/packages/urllib3/util/connection.py | 47 +-
requests/packages/urllib3/util/retry.py | 14 +-
requests/packages/urllib3/util/ssl_.py | 4 +-
requests/sessions.py | 71 ++-
requests/status_codes.py | 2 +-
requests/structures.py | 7 +-
requests/utils.py | 131 ++++-
requirements.txt | 1 +
33 files changed, 1160 insertions(+), 243 deletions(-)
diff --cc debian/.git-dpm
index 218869a,0000000..6c7b6ce
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- 3311851f0cffea52cd779d01a6bf31cd8d34a37f
- 3311851f0cffea52cd779d01a6bf31cd8d34a37f
- 5ee4efb2658ebe0fad3cc5d12271af49dd073ab3
++3259bc619e3e9f621463b0fe4bbbf37645452b66
++3259bc619e3e9f621463b0fe4bbbf37645452b66
++18d81e2cb9c8604a1f0b53fda23b035caa7601c9
+18d81e2cb9c8604a1f0b53fda23b035caa7601c9
+requests_2.11.1.orig.tar.gz
+7083e52275a9bcc02757e8b53c0be07cb73149a1
+485936
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/01_use-system-ca-certificates.patch
index ff837d0,0000000..60745a7
mode 100644,000000..100644
--- a/debian/patches/01_use-system-ca-certificates.patch
+++ b/debian/patches/01_use-system-ca-certificates.patch
@@@ -1,51 -1,0 +1,51 @@@
- From b670a11fa2cd604df0351133075be4f8aa1ffb97 Mon Sep 17 00:00:00 2001
++From 79f5f2846ad58132f349a2b753e5bc6475987de8 Mon Sep 17 00:00:00 2001
+From: Daniele Tricoli <eriol at mornie.org>
+Date: Thu, 8 Oct 2015 13:41:42 -0700
+Subject: Use the bundle provided by ca-certificates instead of
+
+ the embedded one.
+Forwarded: not-needed
+Last-Update: 2014-10-08
+
+Patch-Name: 01_use-system-ca-certificates.patch
+---
+ MANIFEST.in | 2 +-
+ requests/certs.py | 4 ++--
+ setup.py | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/MANIFEST.in b/MANIFEST.in
+index 439de49..7888aee 100644
+--- a/MANIFEST.in
++++ b/MANIFEST.in
+@@ -1 +1 @@
+-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
++include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
+diff --git a/requests/certs.py b/requests/certs.py
- index 07e6475..e61ee5d 100644
++index f922b99..248d12f 100644
+--- a/requests/certs.py
++++ b/requests/certs.py
+@@ -18,8 +18,8 @@ try:
+ except ImportError:
+ def where():
+ """Return the preferred certificate bundle."""
+- # vendored bundle inside Requests
+- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
++ # On Debian systems use ca-certificates
++ return '/etc/ssl/certs/ca-certificates.crt'
+
+ if __name__ == '__main__':
+ print(where())
+diff --git a/setup.py b/setup.py
+index 3a39052..3d79616 100755
+--- a/setup.py
++++ b/setup.py
+@@ -68,7 +68,7 @@ setup(
+ author_email='me at kennethreitz.com',
+ url='http://python-requests.org',
+ packages=packages,
+- package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},
++ package_data={'': ['LICENSE', 'NOTICE'],},
+ package_dir={'requests': 'requests'},
+ include_package_data=True,
+ install_requires=requires,
diff --cc debian/patches/02_populate-install_requires.patch
index 6c35a5a,0000000..8a10964
mode 100644,000000..100644
--- a/debian/patches/02_populate-install_requires.patch
+++ b/debian/patches/02_populate-install_requires.patch
@@@ -1,31 -1,0 +1,31 @@@
- From 490dac0b51a3ba6df874cf91c6be969585573820 Mon Sep 17 00:00:00 2001
++From eb1914814f0e6c5e46861c2246811ed18d0bac4d Mon Sep 17 00:00:00 2001
+From: Daniele Tricoli <eriol at mornie.org>
+Date: Fri, 23 Oct 2015 16:03:52 +0200
+Subject: Populate install_requires for unbundled packages
+
+This will avoid breakage updating urllib3 via pip when requests/urllib3
+are already installed via the system packages.
+
+Forwarded: not-needed
+Bug-OpenStack: https://review.openstack.org/#/c/213310/0
+Bug-Upstream: https://github.com/kennethreitz/requests/issues/2816
+Patch-Name: 02_populate-install_requires.patch
+---
+ setup.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 3d79616..9a49cdb 100755
+--- a/setup.py
++++ b/setup.py
+@@ -44,7 +44,9 @@ packages = [
+ 'requests.packages.urllib3.packages.ssl_match_hostname',
+ ]
+
+-requires = []
++requires = [
++ 'urllib3==1.15.1',
++]
+ test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov']
+
+ with open('requests/__init__.py', 'r') as fd:
diff --cc debian/patches/03_export-IncompleteRead.patch
index 0777c9c,0000000..41231fc
mode 100644,000000..100644
--- a/debian/patches/03_export-IncompleteRead.patch
+++ b/debian/patches/03_export-IncompleteRead.patch
@@@ -1,35 -1,0 +1,35 @@@
- From 03f38561a6a0efa0e41a09e2d388a920cb035b44 Mon Sep 17 00:00:00 2001
++From 9b1a5ef69e9b6de15d1d25f52a2d86a8ada06870 Mon Sep 17 00:00:00 2001
+From: Daniele Tricoli <eriol at mornie.org>
+Date: Thu, 8 Oct 2015 13:41:43 -0700
+Subject: Export IncompleteRead from requests.compat since it's
+
+ imported by python-pip.
+Forwarded: not-needed
+Bug-Debian: https://bugs.debian.org/766419
+Last-Update: 2014-10-23
+
+Patch-Name: 03_export-IncompleteRead.patch
+---
+ requests/compat.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/requests/compat.py b/requests/compat.py
- index 70edff7..a338846 100644
++index eb6530d..664c246 100644
+--- a/requests/compat.py
++++ b/requests/compat.py
- @@ -40,6 +40,7 @@ if is_py2:
++@@ -44,6 +44,7 @@ if is_py2:
+ from Cookie import Morsel
+ from StringIO import StringIO
+ from .packages.urllib3.packages.ordered_dict import OrderedDict
++ from httplib import IncompleteRead
+
+ builtin_str = str
+ bytes = str
- @@ -54,6 +55,7 @@ elif is_py3:
++@@ -58,6 +59,7 @@ elif is_py3:
+ from http.cookies import Morsel
+ from io import StringIO
+ from collections import OrderedDict
++ from http.client import IncompleteRead
+
+ builtin_str = str
+ str = str
diff --cc debian/patches/use-pip-unbundling.patch
index c42f661,0000000..376ad35
mode 100644,000000..100644
--- a/debian/patches/use-pip-unbundling.patch
+++ b/debian/patches/use-pip-unbundling.patch
@@@ -1,82 -1,0 +1,82 @@@
- From 3311851f0cffea52cd779d01a6bf31cd8d34a37f Mon Sep 17 00:00:00 2001
++From 3259bc619e3e9f621463b0fe4bbbf37645452b66 Mon Sep 17 00:00:00 2001
+From: Daniele Tricoli <eriol at mornie.org>
+Date: Sat, 18 Jun 2016 18:57:45 +0200
+Subject: Use the same unbundling strategy implemented by pip
+
+Description: Use the same unbundling strategy implemented by pip.
+Author: The pip developers <python-virtualenv at groups.google.com>
+Patch-Name: use-pip-unbundling.patch
+---
+ requests/packages/__init__.py | 61 ++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 51 insertions(+), 10 deletions(-)
+
+diff --git a/requests/packages/__init__.py b/requests/packages/__init__.py
+index 971c2ad..7a87131 100644
+--- a/requests/packages/__init__.py
++++ b/requests/packages/__init__.py
+@@ -23,14 +23,55 @@ request.
+ from __future__ import absolute_import
+ import sys
+
+-try:
+- from . import urllib3
+-except ImportError:
+- import urllib3
+- sys.modules['%s.urllib3' % __name__] = urllib3
++# On Debian we use the unbundling strategy implemented by pip inside
++# pip._vendor.__init__.
++def vendored(modulename):
++ vendored_name = "{0}.{1}".format(__name__, modulename)
+
+-try:
+- from . import chardet
+-except ImportError:
+- import chardet
+- sys.modules['%s.chardet' % __name__] = chardet
++ try:
++ __import__(vendored_name, globals(), locals(), level=0)
++ except ImportError:
++ try:
++ __import__(modulename, globals(), locals(), level=0)
++ except ImportError:
++ # We can just silently allow import failures to pass here. If we
++ # got to this point it means that ``import requests.packages.whatever``
++ # failed and so did ``import whatever``. Since we're importing this
++ # upfront in an attempt to alias imports, not erroring here will
++ # just mean we get a regular import error whenever requests
++ # *actually* tries to import one of these modules to use it, which
++ # actually gives us a better error message than we would have
++ # otherwise gotten.
++ pass
++ else:
++ sys.modules[vendored_name] = sys.modules[modulename]
++ base, head = vendored_name.rsplit(".", 1)
++ setattr(sys.modules[base], head, sys.modules[modulename])
++
++vendored('chardet')
++vendored('urllib3')
++vendored('urllib3._collections')
++vendored('urllib3.connection')
++vendored('urllib3.connectionpool')
++vendored('urllib3.contrib')
++vendored('urllib3.contrib.ntlmpool')
++vendored('urllib3.contrib.pyopenssl')
++vendored('urllib3.exceptions')
++vendored('urllib3.fields')
++vendored('urllib3.filepost')
++vendored('urllib3.packages')
++vendored('urllib3.packages.ordered_dict')
++vendored('urllib3.packages.six')
++vendored('urllib3.packages.ssl_match_hostname')
++vendored('urllib3.packages.ssl_match_hostname._implementation')
++vendored('urllib3.poolmanager')
++vendored('urllib3.request')
++vendored('urllib3.response')
++vendored('urllib3.util')
++vendored('urllib3.util.connection')
++vendored('urllib3.util.request')
++vendored('urllib3.util.response')
++vendored('urllib3.util.retry')
++vendored('urllib3.util.ssl_')
++vendored('urllib3.util.timeout')
++vendored('urllib3.util.url')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/requests.git
More information about the Python-modules-commits
mailing list