aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDaniele Tricoli <eriol@mornie.org>2014-11-14 03:52:02 +0000
committerDaniele Tricoli <eriol@mornie.org>2014-11-14 03:52:02 +0000
commit14dc4eca16b91b7ddb4f56b05e2f8fbc649cded5 (patch)
treebe75e3ac14db9a9263f0b587aae2d8742723b9e2 /debian
parent9ff5bf44d0521b90d730015577b2051c4cf3645c (diff)
downloadpython-requests-14dc4eca16b91b7ddb4f56b05e2f8fbc649cded5.tar
python-requests-14dc4eca16b91b7ddb4f56b05e2f8fbc649cded5.tar.gz
* 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)
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch16
2 files changed, 22 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 9d75aa9..88b5c9d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+requests (2.4.3-4) UNRELEASED; 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