diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch | 16 |
1 files changed, 14 insertions, 2 deletions
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 |