[Python-modules-commits] r31441 - in packages/requests/trunk/debian (2 files)
eriol-guest at users.alioth.debian.org
eriol-guest at users.alioth.debian.org
Fri Nov 14 03:52:04 UTC 2014
Date: Friday, November 14, 2014 @ 03:52:02
Author: eriol-guest
Revision: 31441
* 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)
Modified:
packages/requests/trunk/debian/changelog
packages/requests/trunk/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch
Modified: packages/requests/trunk/debian/changelog
===================================================================
--- packages/requests/trunk/debian/changelog 2014-11-13 17:47:19 UTC (rev 31440)
+++ packages/requests/trunk/debian/changelog 2014-11-14 03:52:02 UTC (rev 31441)
@@ -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 at 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
Modified: packages/requests/trunk/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch
===================================================================
--- packages/requests/trunk/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch 2014-11-13 17:47:19 UTC (rev 31440)
+++ packages/requests/trunk/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch 2014-11-14 03:52:02 UTC (rev 31441)
@@ -3,11 +3,12 @@
Author: Jakub Wilk <jwilk at 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 @@
+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 @@
+
+_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
More information about the Python-modules-commits
mailing list