diff options
author | Daniele Tricoli <eriol@mornie.org> | 2014-11-11 03:28:18 +0100 |
---|---|---|
committer | Daniele Tricoli <eriol@mornie.org> | 2014-11-11 03:28:18 +0100 |
commit | 6a6bfc5f989fd1029c5736eb51aaf188915e9c45 (patch) | |
tree | b7683f51451e505c0dce5854fb9cc87c801e905f | |
parent | e2f6dccb5f27dfc3dd2accc1b35bc65eac609a0f (diff) | |
parent | 9ff5bf44d0521b90d730015577b2051c4cf3645c (diff) | |
download | python-requests-6a6bfc5f989fd1029c5736eb51aaf188915e9c45.tar python-requests-6a6bfc5f989fd1029c5736eb51aaf188915e9c45.tar.gz |
Imported Debian patch 2.4.3-3
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch | 34 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 44 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 96b69e2..9d75aa9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +requests (2.4.3-3) unstable; urgency=medium + + * debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch + - Make Python import system know that requests.packages.urllib3 and + urllib3 are the same thing. Thanks to Jakub Wilk for the patch. + (Closes: #769047) + + -- Daniele Tricoli <eriol@mornie.org> Tue, 11 Nov 2014 03:28:18 +0100 + requests (2.4.3-2) unstable; urgency=medium * debian/patches/03_export-IncompleteRead.patch diff --git a/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch b/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch new file mode 100644 index 0000000..e26d9ae --- /dev/null +++ b/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch @@ -0,0 +1,34 @@ +Description: Make Python import system know that requests.packages.urllib3 and +urllib3 are the same thing. +Author: Jakub Wilk <jwilk@debian.org> +Forwarded: not-needed +Bug-Debian: https://bugs.debian.org/769047 +Last-Update: 2014-11-05 + +--- a/requests/__init__.py ++++ b/requests/__init__.py +@@ -48,6 +48,24 @@ + __license__ = 'Apache 2.0' + __copyright__ = 'Copyright 2014 Kenneth Reitz' + ++# On Debian make Python import system know that requests.packages.urllib3 ++# and urllib3 are the same thing. ++import pkgutil ++import sys ++import urllib3 ++ ++def _attach_namespace(package, where): ++ for loader, name, ispkg in pkgutil.walk_packages(package.__path__, ++ package.__name__ + '.'): ++ try: ++ module = __import__(name) ++ except ImportError: ++ continue ++ sys.modules[where + '.' + name] = module ++ ++_attach_namespace(urllib3, 'requests.packages') ++del _attach_namespace ++ + # Attempt to enable urllib3's SNI support, if possible + try: + from urllib3.contrib import pyopenssl diff --git a/debian/patches/series b/debian/patches/series index 0a8f016..38fffac 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01_use-system-ca-certificates.patch 02_use-system-chardet-and-urllib3.patch 03_export-IncompleteRead.patch +04_make-requests.packages.urllib3-same-as-urllib3.patch |