On 01.11.2014 12:26, Jakub Warmuz wrote:
> IMO a package patch should be provided to import global urllib3 instead,
> following Debian packaging standards

As discussed on #debian-python I'm attaching a patch. Let me know if I
can help further.

-- 
Yours virtually,
Kuba
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 31346)
+++ debian/changelog	(working copy)
@@ -1,3 +1,13 @@
+python-docker (0.5.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Added debian/patches/02_use-system-urllib3.patch (Closes: #767445).
+  * Renamed debian/patches/requirements.patch to
+    debian/patches/01_requirements.patch following convention from other
+    Python packages.
+
+ -- Jakub Warmuz <ja...@warmuz.org>  Sat, 01 Nov 2014 18:19:57 +0100
+
 python-docker (0.5.3-1) unstable; urgency=medium
 
   * Update to 0.5.3 upstream release
Index: debian/patches/01_requirements.patch
===================================================================
--- debian/patches/01_requirements.patch	(revision 0)
+++ debian/patches/01_requirements.patch	(working copy)
@@ -0,0 +1,22 @@
+Author: Tianon Gravi <admwig...@gmail.com>
+Forwarded: https://github.com/dotcloud/docker-py/issues/101 (upstream has no interest)
+Description: unpin dependencies so newer versions satisfy them appropriately
+
+diff --git a/requirements.txt b/requirements.txt
+index a1cc1af..d4920a7 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,3 +1,3 @@
+-requests==2.2.1
++requests>=2.2.1
+ six>=1.3.0
+-websocket-client==0.11.0
++websocket-client>=0.11.0
+diff --git a/requirements3.txt b/requirements3.txt
+index 68533d1..ab74f44 100644
+--- a/requirements3.txt
++++ b/requirements3.txt
+@@ -1,2 +1,2 @@
+-requests==2.2.1
++requests>=2.2.1
+ six>=1.3.0
Index: debian/patches/02_use-system-urllib3.patch
===================================================================
--- debian/patches/02_use-system-urllib3.patch	(revision 0)
+++ debian/patches/02_use-system-urllib3.patch	(working copy)
@@ -0,0 +1,33 @@
+Description: Use the system python-urllib3 instead of the
+ requests.packages.urllib3.
+Author: Jakub Warmuz <ja...@warmuz.org>
+Last-Update: 2014-11-01
+
+--- a/docker/ssladapter/ssladapter.py
++++ b/docker/ssladapter/ssladapter.py
+@@ -4,10 +4,7 @@
+ """
+ from distutils.version import StrictVersion
+ from requests.adapters import HTTPAdapter
+-try:
+-    import requests.packages.urllib3 as urllib3
+-except ImportError:
+-    import urllib3
++import urllib3
+ 
+ 
+ PoolManager = urllib3.poolmanager.PoolManager
+--- a/docker/unixconn/unixconn.py
++++ b/docker/unixconn/unixconn.py
+@@ -20,10 +20,7 @@
+ import requests.adapters
+ import socket
+ 
+-try:
+-    import requests.packages.urllib3.connectionpool as connectionpool
+-except ImportError:
+-    import urllib3.connectionpool as connectionpool
++import urllib3.connectionpool as connectionpool
+ 
+ 
+ class UnixHTTPConnection(httplib.HTTPConnection, object):
Index: debian/patches/requirements.patch
===================================================================
--- debian/patches/requirements.patch	(revision 31346)
+++ debian/patches/requirements.patch	(working copy)
@@ -1,22 +0,0 @@
-Author: Tianon Gravi <admwig...@gmail.com>
-Forwarded: https://github.com/dotcloud/docker-py/issues/101 (upstream has no interest)
-Description: unpin dependencies so newer versions satisfy them appropriately
-
-diff --git a/requirements.txt b/requirements.txt
-index a1cc1af..d4920a7 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -1,3 +1,3 @@
--requests==2.2.1
-+requests>=2.2.1
- six>=1.3.0
--websocket-client==0.11.0
-+websocket-client>=0.11.0
-diff --git a/requirements3.txt b/requirements3.txt
-index 68533d1..ab74f44 100644
---- a/requirements3.txt
-+++ b/requirements3.txt
-@@ -1,2 +1,2 @@
--requests==2.2.1
-+requests>=2.2.1
- six>=1.3.0
Index: debian/patches/series
===================================================================
--- debian/patches/series	(revision 31346)
+++ debian/patches/series	(working copy)
@@ -1,2 +1,4 @@
 # see https://github.com/dotcloud/docker-py/issues/101
-requirements.patch
+01_requirements.patch
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767445
+02_use-system-urllib3.patch

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to