[Python-modules-commits] r31422 - in packages/requests/trunk/debian (3 files)

eriol-guest at users.alioth.debian.org eriol-guest at users.alioth.debian.org
Tue Nov 11 02:43:52 UTC 2014


    Date: Tuesday, November 11, 2014 @ 02:43:50
  Author: eriol-guest
Revision: 31422

* 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)

Added:
  packages/requests/trunk/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch
Modified:
  packages/requests/trunk/debian/changelog
  packages/requests/trunk/debian/patches/series

Modified: packages/requests/trunk/debian/changelog
===================================================================
--- packages/requests/trunk/debian/changelog	2014-11-10 22:37:20 UTC (rev 31421)
+++ packages/requests/trunk/debian/changelog	2014-11-11 02:43:50 UTC (rev 31422)
@@ -1,3 +1,12 @@
+requests (2.4.3-3) UNRELEASED; 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 at mornie.org>  Tue, 11 Nov 2014 03:28:18 +0100
+
 requests (2.4.3-2) unstable; urgency=medium
 
   * debian/patches/03_export-IncompleteRead.patch

Added: 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	                        (rev 0)
+++ packages/requests/trunk/debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch	2014-11-11 02:43:50 UTC (rev 31422)
@@ -0,0 +1,34 @@
+Description: Make Python import system know that requests.packages.urllib3 and
+urllib3 are the same thing.
+Author: Jakub Wilk <jwilk at 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

Modified: packages/requests/trunk/debian/patches/series
===================================================================
--- packages/requests/trunk/debian/patches/series	2014-11-10 22:37:20 UTC (rev 31421)
+++ packages/requests/trunk/debian/patches/series	2014-11-11 02:43:50 UTC (rev 31422)
@@ -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




More information about the Python-modules-commits mailing list