[Python-modules-commits] r31469 - in packages/python-urllib3/trunk/debian (4 files)

stefanor at users.alioth.debian.org stefanor at users.alioth.debian.org
Tue Nov 18 21:26:00 UTC 2014


    Date: Tuesday, November 18, 2014 @ 21:25:59
  Author: stefanor
Revision: 31469

* Team upload.
* Replace 05_do-not-use-embedded-ssl-match-hostname.patch with
  05_avoid-embedded-ssl-match-hostname.patch. Users may use virtualenv with
  cPython << 2.7.9 (or Debian python2.7 2.7.8-7). (Closes: 755106, 763389)

Added:
  packages/python-urllib3/trunk/debian/patches/05_avoid-embedded-ssl-match-hostname.patch
Modified:
  packages/python-urllib3/trunk/debian/changelog
  packages/python-urllib3/trunk/debian/patches/series
Deleted:
  packages/python-urllib3/trunk/debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch

Modified: packages/python-urllib3/trunk/debian/changelog
===================================================================
--- packages/python-urllib3/trunk/debian/changelog	2014-11-18 04:01:34 UTC (rev 31468)
+++ packages/python-urllib3/trunk/debian/changelog	2014-11-18 21:25:59 UTC (rev 31469)
@@ -1,3 +1,12 @@
+python-urllib3 (1.9.1-3) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Replace 05_do-not-use-embedded-ssl-match-hostname.patch with
+    05_avoid-embedded-ssl-match-hostname.patch. Users may use virtualenv with
+    cPython << 2.7.9 (or Debian python2.7 2.7.8-7). (Closes: 755106, 763389)
+
+ -- Stefano Rivera <stefanor at debian.org>  Tue, 18 Nov 2014 12:45:49 -0800
+
 python-urllib3 (1.9.1-2) unstable; urgency=medium
 
   * debian/control

Added: packages/python-urllib3/trunk/debian/patches/05_avoid-embedded-ssl-match-hostname.patch
===================================================================
--- packages/python-urllib3/trunk/debian/patches/05_avoid-embedded-ssl-match-hostname.patch	                        (rev 0)
+++ packages/python-urllib3/trunk/debian/patches/05_avoid-embedded-ssl-match-hostname.patch	2014-11-18 21:25:59 UTC (rev 31469)
@@ -0,0 +1,22 @@
+Description: Do not use embedded copy of ssl.match_hostname, when possible
+ The system python has the necessary features backported, since 2.7.8-7 (and
+ 221a1f9155e2, releasing in 2.7.9, upstream). However, alternative python
+ implementations don't, yet, and urllib3 is used by pip in virtualenvs.
+Author: Stefano Rivera <stefanor at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-11-18
+
+--- a/urllib3/packages/__init__.py
++++ b/urllib3/packages/__init__.py
+@@ -1,4 +1,9 @@
+ from __future__ import absolute_import
+ 
+-from . import ssl_match_hostname
+-
++try:
++    # cPython >= 2.7.9 has ssl features backported from Python3
++    from ssl import CertificateError
++    del CertificateError
++    import ssl as ssl_match_hostname
++except ImportError:
++    from . import ssl_match_hostname

Deleted: packages/python-urllib3/trunk/debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch
===================================================================
--- packages/python-urllib3/trunk/debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch	2014-11-18 04:01:34 UTC (rev 31468)
+++ packages/python-urllib3/trunk/debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch	2014-11-18 21:25:59 UTC (rev 31469)
@@ -1,56 +0,0 @@
-Description: Do not use embedded copy of ssl.match_hostname.
-Author: Daniele Tricoli <eriol at mornie.org>
-Forwarded: not-needed
-Last-Update: 2014-09-23
-
---- a/test/test_connectionpool.py
-+++ b/test/test_connectionpool.py
-@@ -6,7 +6,7 @@
-     HTTPConnectionPool,
- )
- from urllib3.util.timeout import Timeout
--from urllib3.packages.ssl_match_hostname import CertificateError
-+from ssl import CertificateError
- from urllib3.exceptions import (
-     ClosedPoolError,
-     EmptyPoolError,
---- a/urllib3/connection.py
-+++ b/urllib3/connection.py
-@@ -39,7 +39,7 @@
-     ConnectTimeoutError,
-     SystemTimeWarning,
- )
--from .packages.ssl_match_hostname import match_hostname
-+from ssl import match_hostname
- 
- from .util.ssl_ import (
-     resolve_cert_reqs,
---- a/urllib3/connectionpool.py
-+++ b/urllib3/connectionpool.py
-@@ -26,7 +26,7 @@
-     TimeoutError,
-     InsecureRequestWarning,
- )
--from .packages.ssl_match_hostname import CertificateError
-+from ssl import CertificateError
- import six
- from .connection import (
-     port_by_scheme,
---- a/urllib3/packages/__init__.py
-+++ b/urllib3/packages/__init__.py
-@@ -1,4 +1,3 @@
- from __future__ import absolute_import
- 
--from . import ssl_match_hostname
- 
---- a/setup.py
-+++ b/setup.py
-@@ -42,7 +42,7 @@
-       url='http://urllib3.readthedocs.org/',
-       license='MIT',
-       packages=['urllib3',
--                'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
-+                'urllib3.packages',
-                 'urllib3.contrib', 'urllib3.util',
-                 ],
-       requires=[],

Modified: packages/python-urllib3/trunk/debian/patches/series
===================================================================
--- packages/python-urllib3/trunk/debian/patches/series	2014-11-18 04:01:34 UTC (rev 31468)
+++ packages/python-urllib3/trunk/debian/patches/series	2014-11-18 21:25:59 UTC (rev 31469)
@@ -2,4 +2,4 @@
 02_require-cert-verification.patch
 03_force_setuptools.patch
 04_relax_nosetests_options.patch
-05_do-not-use-embedded-ssl-match-hostname.patch
+05_avoid-embedded-ssl-match-hostname.patch




More information about the Python-modules-commits mailing list