[Python-modules-commits] [requests] 11/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 98b0dcf095ca3da37e795c7eb525e410d03cbec8
Merge: fde2282 83ce45b
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Thu Sep 8 22:07:50 2016 +0200

    merge patched into master

 debian/.git-dpm                                   | 4 ++--
 debian/patches/02_populate-install_requires.patch | 6 +++---
 debian/patches/use-pip-unbundling.patch           | 2 +-
 setup.py                                          | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --cc debian/.git-dpm
index 6c7b6ce,0000000..b0050a4
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
- 3259bc619e3e9f621463b0fe4bbbf37645452b66
- 3259bc619e3e9f621463b0fe4bbbf37645452b66
++83ce45b1c361c24a1397bbc8af3e43117edf0799
++83ce45b1c361c24a1397bbc8af3e43117edf0799
 +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/02_populate-install_requires.patch
index 8a10964,0000000..282cd1f
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 eb1914814f0e6c5e46861c2246811ed18d0bac4d Mon Sep 17 00:00:00 2001
++From d3721e08b177b4087f4a7df680ec8312fd105035 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
++index 3d79616..8266add 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',
+++    'urllib3==1.16',
 ++]
 + 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/use-pip-unbundling.patch
index 376ad35,0000000..7998986
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 3259bc619e3e9f621463b0fe4bbbf37645452b66 Mon Sep 17 00:00:00 2001
++From 83ce45b1c361c24a1397bbc8af3e43117edf0799 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