diff options
author | Daniele Tricoli <eriol@mornie.org> | 2014-11-14 04:50:22 +0100 |
---|---|---|
committer | Daniele Tricoli <eriol@mornie.org> | 2014-11-14 04:50:22 +0100 |
commit | f91ee0d37463200ec4b5ce4f15463b8595f61f72 (patch) | |
tree | 91becccb8b5d0ce067b141b640b202f8930db685 | |
parent | 6a6bfc5f989fd1029c5736eb51aaf188915e9c45 (diff) | |
parent | 3286622ce3ba6daf9b8e1933ffa4f09382905177 (diff) | |
download | python-requests-f91ee0d37463200ec4b5ce4f15463b8595f61f72.tar python-requests-f91ee0d37463200ec4b5ce4f15463b8595f61f72.tar.gz |
Imported Debian patch 2.4.3-4
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch | 16 |
2 files changed, 22 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 9d75aa9..595cc94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +requests (2.4.3-4) unstable; urgency=medium + + * debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch + - Fix requests.packages.urllib3 sub on Python 3. Thanks to Tianon + Gravi for the report. (Closes: #769496) + + -- Daniele Tricoli <eriol@mornie.org> Fri, 14 Nov 2014 04:50:22 +0100 + requests (2.4.3-3) unstable; urgency=medium * debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.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 index e26d9ae..4e6f053 100644 --- a/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch +++ b/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch @@ -3,11 +3,12 @@ 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 +Bug-Debian: https://bugs.debian.org/769496 +Last-Update: 2014-11-14 --- a/requests/__init__.py +++ b/requests/__init__.py -@@ -48,6 +48,24 @@ +@@ -48,6 +48,28 @@ __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2014 Kenneth Reitz' @@ -18,6 +19,8 @@ Last-Update: 2014-11-05 +import urllib3 + +def _attach_namespace(package, where): ++ # Attach package top namespace ++ sys.modules[where + '.' + package.__name__] = package + for loader, name, ispkg in pkgutil.walk_packages(package.__path__, + package.__name__ + '.'): + try: @@ -28,7 +31,16 @@ Last-Update: 2014-11-05 + +_attach_namespace(urllib3, 'requests.packages') +del _attach_namespace ++# Python 3 needs this imported explicitly. ++import requests.packages + # Attempt to enable urllib3's SNI support, if possible try: from urllib3.contrib import pyopenssl +--- a/requests/packages/__init__.py ++++ b/requests/packages/__init__.py +@@ -1,3 +1,3 @@ + from __future__ import absolute_import + +-from . import urllib3 ++import urllib3 |