aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/.git-dpm11
-rw-r--r--debian/changelog304
-rw-r--r--debian/clean1
-rw-r--r--debian/compat1
-rw-r--r--debian/control105
-rw-r--r--debian/copyright90
-rw-r--r--debian/patches/01_do-not-use-embedded-python-six.patch223
-rw-r--r--debian/patches/02_require-cert-verification.patch39
-rw-r--r--debian/patches/03_force_setuptools.patch25
-rw-r--r--debian/patches/04_relax_nosetests_options.patch30
-rw-r--r--debian/patches/05_avoid-embedded-ssl-match-hostname.patch32
-rw-r--r--debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch22
-rw-r--r--debian/patches/series6
-rw-r--r--debian/python-urllib3-whl.install1
-rwxr-xr-xdebian/rules27
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch3
17 files changed, 921 insertions, 0 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm
new file mode 100644
index 0000000..297ce9a
--- /dev/null
+++ b/debian/.git-dpm
@@ -0,0 +1,11 @@
+# see git-dpm(1) from git-dpm package
+7db0aa9b18e70f43ef0bfcdec7f223e5b681aaf0
+7db0aa9b18e70f43ef0bfcdec7f223e5b681aaf0
+2b3d330a120a16e97cecd5163b5d454dcfe38a2b
+2b3d330a120a16e97cecd5163b5d454dcfe38a2b
+python-urllib3_1.12.orig.tar.gz
+1d8b23f0120bbe4bdb3b6993eebe5c958c35c553
+151072
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2617c3d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,304 @@
+python-urllib3 (1.11-2) unstable; urgency=medium
+
+ * debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch
+ - Rely on six to import httplib or http.client. Thanks to Edward Betts
+ for the report. (Closes: #796356)
+
+ -- Daniele Tricoli <eriol@mornie.org> Sun, 23 Aug 2015 21:19:59 +0200
+
+python-urllib3 (1.11-1) unstable; urgency=medium
+
+ * New upstream release.
+ * debian/control
+ - Add python{,3}-tornado to Build-Depends.
+ - Add python-ntlm to python-urllib3's Suggests.
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refresh.
+
+ -- Daniele Tricoli <eriol@mornie.org> Mon, 17 Aug 2015 18:51:43 +0200
+
+python-urllib3 (1.10.4-1) unstable; urgency=medium
+
+ * New upstream release.
+ * debian/watch
+ - Use pypi.debian.net redirector.
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refresh.
+
+ -- Daniele Tricoli <eriol@mornie.org> Sun, 03 May 2015 17:18:55 +0200
+
+python-urllib3 (1.10-1) experimental; urgency=medium
+
+ * New upstream release.
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refresh.
+ * debian/patches/06_do-not-make-SSLv3-mandatory.patch
+ - Remove since it was merged upstream.
+
+ -- Daniele Tricoli <eriol@mornie.org> Thu, 15 Jan 2015 22:58:53 +0100
+
+python-urllib3 (1.9.1-3) unstable; urgency=medium
+
+ [ Stefano Rivera ]
+ * 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)
+
+ [ Daniele Tricoli ]
+ * debian/patches/06_do-not-make-SSLv3-mandatory.patch
+ - Since SSL version 3 is insecure it is supported only if Python
+ supports it. (Closes: #770246)
+
+ -- Daniele Tricoli <eriol@mornie.org> Thu, 20 Nov 2014 13:17:59 +0100
+
+python-urllib3 (1.9.1-2) unstable; urgency=medium
+
+ * debian/control
+ - Bump python{,3}-nose to >=1.3.3 to build urllib3 on Wheezy. Thanks to
+ Nick Phillips for the report. (Closes: #765035)
+
+ -- Daniele Tricoli <eriol@mornie.org> Tue, 21 Oct 2014 02:59:57 +0200
+
+python-urllib3 (1.9.1-1) unstable; urgency=medium
+
+ * New upstream release.
+ * debian/control
+ - Bump Standards-Version to 3.9.6 (no changes needed).
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refresh.
+ * debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch
+ - Refresh.
+ * debian/patches/06_add-test-init-py.patch
+ - Remove since fixed upstream.
+ * debian/rules
+ - Exclude with_dummyserver tests since they are also failing upstream.
+
+ -- Daniele Tricoli <eriol@mornie.org> Tue, 23 Sep 2014 04:28:42 +0200
+
+python-urllib3 (1.9-1) unstable; urgency=medium
+
+ * New upstream release
+ * debian/control
+ - Add python-ndg-httpsclient, python-openssl and python-pyasn1 into
+ python-urllib3's Recomends to ensure that SNI works as expected and to
+ prevent CRIME attack
+ - Add python3-ndg-httpsclient, python3-openssl and python3-pyasn1 into
+ python3-urllib3's Suggests since Python 3 already support SNI and
+ and SSL compression can be disabled using OP_NO_COMPRESSION
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refresh
+ * debian/patches/02_require-cert-verification.patch
+ - Refresh
+ * debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch
+ - Refresh
+ * debian/patches/06_relax-test-requirements.patch
+ - Remove since upstream now does not specify version of packages needed
+ for testing inside setup.py
+ * debian/patches/06_add-test-init-py.patch
+ - Add needed test/__init__.py file not shipped in sdist
+
+ -- Daniele Tricoli <eriol@mornie.org> Mon, 01 Sep 2014 02:56:44 +0200
+
+python-urllib3 (1.8.3-1) unstable; urgency=medium
+
+ * New upstream release (Closes: #754090)
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refresh
+ * debian/patches/04_relax_nosetests_options.patch
+ - Refresh
+
+ -- Daniele Tricoli <eriol@mornie.org> Mon, 07 Jul 2014 16:09:06 +0200
+
+python-urllib3 (1.8.2-1) unstable; urgency=medium
+
+ * New upstream release
+ * debian/clean
+ - Removed .coverage entry
+ * debian/control
+ - Added python3-coverage, python3-mock, python3-nose to Build-Depends
+ - Bumped python(3)-coverage to (>=3.6)
+ - Removed python-tornado from Build-Depends since it was used only for
+ dummyserver
+ * debian/copyright
+ - Updated copyright years
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+ * debian/patches/02_require-cert-verification.patch
+ - Refreshed
+ * debian/patches/03_no-setuptools.patch
+ - Superseded by debian/patches/setuptools.patch
+ * debian/patches/03_force-setuptools.patch
+ - Renamed from setuptools.patch
+ - Added description
+ * debian/patches/05_do-not-use-embedded-ssl-match-hostname.patch
+ - Do not use embedded copy of ssl.match_hostname
+ * debian/patches/06_relax-test-requirements.patch
+ - Relax version of packages needed for testing
+ * debian/rules
+ - Enabled tests at build time also for Python 3 using the custom build
+ plugin of pybuild
+ - Cleaned .coverage file generated by nose using coverage plugin
+ - No need to remove dummyserver since it is not installed anymore
+
+ -- Daniele Tricoli <eriol@mornie.org> Wed, 28 May 2014 19:41:18 +0200
+
+python-urllib3 (1.8-2) unstable; urgency=medium
+
+ * Team upload.
+ * d/control:
+ - Fix python-urllib3-whl Depends.
+ - Fix typo in python-urllib3-whl description.
+
+ -- Barry Warsaw <barry@debian.org> Thu, 22 May 2014 18:19:16 -0400
+
+python-urllib3 (1.8-1) unstable; urgency=medium
+
+ * Team upload.
+
+ [ Daniele Tricoli ]
+ * New upstream release
+ * debian/control
+ - Bumped Standards-Version to 3.9.5 (no changes needed)
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+ * debian/patches/02_require-cert-verification.patch
+ - Refreshed
+
+ [ Barry Warsaw ]
+ * d/control:
+ - Added python-setuptools, python3-setuptools, and python3-wheel to
+ Build-Depends.
+ - Added python-urllib3-whl binary package.
+ * d/rules:
+ - Build the universal wheels.
+ - Simplify through use of PYBUILD_NAME.
+ * d/python-urllib3-whl.install: Added.
+ * d/patches/setuptools.patch: Use setuptools.setup() so that the
+ bdist_wheel command will work.
+
+ -- Barry Warsaw <barry@debian.org> Thu, 15 May 2014 17:21:50 -0400
+
+python-urllib3 (1.7.1-1) unstable; urgency=low
+
+ * New upstream release
+ * Switched to pybuild
+ * debian/clean
+ - Switched to debian/clean for cleaning instead of using debian/rules
+ * debian/compat
+ - Bumped debhelper compatibility level to 9
+ * debian/control
+ - Added python-mock to Build-Depends
+ - Bumped debhelper B-D to (>= 9)
+ * debian/copyright
+ - Removed stanza about mimetools_choose_boundary since not shipped
+ anymore
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+ * debian/patches/02_require-cert-verification.patch
+ - Refreshed
+ * debian/patches/04_relax_nosetests_options.patch
+ - Refreshed
+ * debian/patches/05_fix_python3_syntax_error_in_ntlmpool.patch
+ - Removed since fixed upstream
+ * debian/patches/06_fix_abuse_of_match_hostname_for_DoS.patch
+ - Removed since fixed upstream
+ * debian/watch
+ - Switched download URL to https
+
+ -- Daniele Tricoli <eriol@mornie.org> Thu, 17 Oct 2013 13:28:10 +0200
+
+python-urllib3 (1.6-2) unstable; urgency=high
+
+ * debian/patches/06_fix_abuse_of_match_hostname_for_DoS.patch
+ - Added upstream patch to fix possible abuse of ssl.match_hostname()
+ for denial of service using certificates with many wildcards
+ (CVE-2013-2099) (Closes: #709070) Thanks Henri Salo and Jakub
+ Wilk for the report
+
+ -- Daniele Tricoli <eriol@mornie.org> Mon, 20 May 2013 19:34:17 +0200
+
+python-urllib3 (1.6-1) unstable; urgency=low
+
+ [ Jakub Wilk ]
+ * Use canonical URIs for Vcs-* fields.
+
+ [ Daniele Tricoli ]
+ * New upstream release
+ * Upload to unstable (Closes: #707780)
+ * debian/control
+ - Added python3-six to Build-Depends field
+ - Bumped debhelper dependency to 8.1 for build-{arch,indep} support
+ - Removed python-setuptools from Build-Depends field
+ * debian/copyright
+ - Updated copyright years
+ - Added stanza for urllib3/packages/ordered_dict.py
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+ * debian/patches/02_require-cert-verification.patch
+ - Refreshed
+ * debian/patches/03_no-setuptools.patch
+ - Do not use setuptools
+ * debian/patches/04_relax_nosetests_options.patch
+ - Do not use logging-clear-handlers to see all logging output and
+ disabled cover-min-percentage since it require python-nose (>= 1.3):
+ this way it will be easier to backport python-urllib3 to Wheezy.
+ * debian/patches/05_fix_python3_syntax_error_in_ntlmpool.patch
+ - Fix syntax error 'unicodeescape' codec can't decode bytes in
+ position 130-132 for Python3
+
+ -- Daniele Tricoli <eriol@mornie.org> Sat, 11 May 2013 15:15:38 +0200
+
+python-urllib3 (1.5-1) experimental; urgency=low
+
+ * New upstream release
+ * debian/control
+ - Bumped Standards-Version to 3.9.4 (no changes needed)
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+ * debian/rules
+ - Run tests only for python2.7 since upstream is using
+ assertRaises() as a context manager
+
+ -- Daniele Tricoli <eriol@mornie.org> Fri, 09 Nov 2012 04:23:18 +0100
+
+python-urllib3 (1.3-3) unstable; urgency=low
+
+ * debian/control
+ - Added ca-certificates to Recommends field
+ * debian/patches/02_require-cert-verification.patch
+ - require SSL certificate validation by default by using
+ CERT_REQUIRED and using the system
+ /etc/ssl/certs/ca-certificates.crt.
+ Thanks to Jamie Strandboge for report and patch
+ (Closes: #686872)
+
+ -- Daniele Tricoli <eriol@mornie.org> Mon, 10 Sep 2012 14:33:35 +0200
+
+python-urllib3 (1.3-2) unstable; urgency=low
+
+ * debian/control
+ - Tightened B-D of python-coverage to >= 3.4 (Closes: #668427)
+ - Fixed typo in python3-urllib3's ${python3:Depends}
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+ * debian/rules
+ - Actually remove the embedded python-six from binary packages
+ - Cleaned .egg-info to build packages twice in a row
+
+ -- Daniele Tricoli <eriol@mornie.org> Tue, 17 Apr 2012 21:34:49 +0200
+
+python-urllib3 (1.3-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/control
+ - Bumped Standards-Version to 3.9.3 (no changes needed)
+ * debian/patches/01_do-not-use-embedded-python-six.patch
+ - Refreshed
+
+ -- Daniele Tricoli <eriol@mornie.org> Thu, 29 Mar 2012 02:09:04 +0200
+
+python-urllib3 (1.2.2-1) unstable; urgency=low
+
+ * Initial release (Closes: #648783)
+
+ -- Daniele Tricoli <eriol@mornie.org> Fri, 10 Feb 2012 04:41:11 +0100
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..80574db
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+urllib3.egg-info/*
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..a57c01b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,105 @@
+Source: python-urllib3
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders: Daniele Tricoli <eriol@mornie.org>
+Section: python
+Priority: optional
+Build-Depends:
+ debhelper (>= 9),
+ dh-python,
+ python-all (>= 2.6.6-3),
+ python-coverage (>= 3.6),
+ python-mock,
+ python-nose (>=1.3.3),
+ python-setuptools,
+ python-six,
+ python-tornado,
+ python3-all,
+ python3-coverage (>= 3.6),
+ python3-mock,
+ python3-nose (>=1.3.3),
+ python3-setuptools,
+ python3-six,
+ python3-tornado,
+ python3-wheel,
+Standards-Version: 3.9.6
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.0
+Homepage: http://urllib3.readthedocs.org
+Vcs-Git: git://anonscm.debian.org/python-modules/packages/python-urllib3.git
+Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/python-urllib3.git
+
+Package: python-urllib3
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python:Depends},
+ python-six
+Recommends:
+ ca-certificates,
+ python-ndg-httpsclient,
+ python-openssl,
+ python-pyasn1
+Suggests:
+ python-ntlm
+Description: HTTP library with thread-safe connection pooling for Python
+ urllib3 supports features left out of urllib and urllib2 libraries.
+ .
+ - Re-use the same socket connection for multiple requests (HTTPConnectionPool
+ and HTTPSConnectionPool) (with optional client-side certificate
+ verification).
+ - File posting (encode_multipart_formdata).
+ - Built-in redirection and retries (optional).
+ - Supports gzip and deflate decoding.
+ - Thread-safe and sanity-safe.
+ - Small and easy to understand codebase perfect for extending and
+ building upon.
+
+Package: python3-urllib3
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+ python3-six
+Recommends:
+ ca-certificates
+Suggests:
+ python3-ndg-httpsclient,
+ python3-openssl,
+ python3-pyasn1
+Description: HTTP library with thread-safe connection pooling for Python3
+ urllib3 supports features left out of urllib and urllib2 libraries.
+ .
+ - Re-use the same socket connection for multiple requests (HTTPConnectionPool
+ and HTTPSConnectionPool) (with optional client-side certificate
+ verification).
+ - File posting (encode_multipart_formdata).
+ - Built-in redirection and retries (optional).
+ - Supports gzip and deflate decoding.
+ - Thread-safe and sanity-safe.
+ - Small and easy to understand codebase perfect for extending and
+ building upon.
+ .
+ This package contains the Python 3 version of the library.
+
+Package: python-urllib3-whl
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+ python-six-whl
+Recommends:
+ ca-certificates
+Description: HTTP library with thread-safe connection pooling
+ urllib3 supports features left out of urllib and urllib2 libraries.
+ .
+ - Re-use the same socket connection for multiple requests (HTTPConnectionPool
+ and HTTPSConnectionPool) (with optional client-side certificate
+ verification).
+ - File posting (encode_multipart_formdata).
+ - Built-in redirection and retries (optional).
+ - Supports gzip and deflate decoding.
+ - Thread-safe and sanity-safe.
+ - Small and easy to understand codebase perfect for extending and
+ building upon.
+ .
+ This package contains the universal wheel.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..1662f05
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,90 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: urllib3
+Upstream-Contact: Andrey Petrov <andrey.petrov@shazow.net>
+Source: http://pypi.python.org/pypi/urllib3
+
+Files: *
+Copyright: 2008-2013, Andrey Petrov
+License: Expat
+
+Files: urllib3/packages/six.py
+Copyright: 2010-2011, Benjamin Peterson
+License: Expat
+
+Files: urllib3/packages/ordered_dict.py
+Copyright: 2009, Raymond Hettinger
+License: Expat
+
+Files: urllib3/packages/ssl_match_hostname/__init__.py
+Copyright: 2011, Python Software Foundation
+License: PSF-2
+
+Files: debian/*
+Copyright: 2012-2014, Daniele Tricoli <eriol@mornie.org>
+License: Expat
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: PSF-2
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation
+ ("PSF"), and the Individual or Organization ("Licensee") accessing
+ and otherwise using this software ("Python") in source or binary form
+ and its associated documentation.
+ .
+ 2. Subject to the terms and conditions of this License Agreement, PSF
+ hereby grants Licensee a nonexclusive, royalty-free, world-wide
+ license to reproduce, analyze, test, perform and/or display publicly,
+ prepare derivative works, distribute, and otherwise use Python alone
+ or in any derivative version, provided, however, that PSF's License
+ Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001,
+ 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights
+ Reserved" are retained in Python alone or in any derivative version
+ prepared by Licensee.
+ .
+ 3. In the event Licensee prepares a derivative work that is based on
+ or incorporates Python or any part thereof, and wants to make the
+ derivative work available to others as provided herein, then Licensee
+ hereby agrees to include in any such work a brief summary of the
+ changes made to Python.
+ .
+ 4. PSF is making Python available to Licensee on an "AS IS"
+ basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR
+ FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+ INFRINGE ANY THIRD PARTY RIGHTS.
+ .
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A
+ RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY
+ DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+ .
+ 6. This License Agreement will automatically terminate upon a
+ material breach of its terms and conditions.
+ .
+ 7. Nothing in this License Agreement shall be deemed to create any
+ relationship of agency, partnership, or joint venture between PSF and
+ Licensee. This License Agreement does not grant permission to use PSF
+ trademarks or trade name in a trademark sense to endorse or promote
+ products or services of Licensee, or any third party.
+ .
+ 8. By copying, installing or otherwise using Python, Licensee agrees
+ to be bound by the terms and conditions of this License Agreement.
diff --git a/debian/patches/01_do-not-use-embedded-python-six.patch b/debian/patches/01_do-not-use-embedded-python-six.patch
new file mode 100644
index 0000000..363e772
--- /dev/null
+++ b/debian/patches/01_do-not-use-embedded-python-six.patch
@@ -0,0 +1,223 @@
+From 3a7deaa269ec9e1dc5dfb860e29b053475647cf5 Mon Sep 17 00:00:00 2001
+From: Daniele Tricoli <eriol@mornie.org>
+Date: Thu, 8 Oct 2015 13:19:46 -0700
+Subject: Do not use embedded copy of python-six.
+
+Forwarded: not-needed
+Last-Update: 2015-05-03
+
+Patch-Name: 01_do-not-use-embedded-python-six.patch
+---
+ dummyserver/handlers.py | 2 +-
+ test/__init__.py | 2 +-
+ test/contrib/test_pyopenssl.py | 2 +-
+ test/test_collections.py | 2 +-
+ test/test_fields.py | 2 +-
+ test/test_filepost.py | 2 +-
+ test/test_retry.py | 2 +-
+ urllib3/_collections.py | 2 +-
+ urllib3/connection.py | 2 +-
+ urllib3/connectionpool.py | 2 +-
+ urllib3/fields.py | 2 +-
+ urllib3/filepost.py | 4 ++--
+ urllib3/response.py | 4 ++--
+ urllib3/util/request.py | 2 +-
+ urllib3/util/retry.py | 2 +-
+ 15 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/dummyserver/handlers.py b/dummyserver/handlers.py
+index 43398cd..a7828a3 100644
+--- a/dummyserver/handlers.py
++++ b/dummyserver/handlers.py
+@@ -263,7 +263,7 @@ def _parse_header(line):
+ """
+ import tornado.httputil
+ import email.utils
+- from urllib3.packages import six
++ import six
+ if not six.PY3:
+ line = line.encode('utf-8')
+ parts = tornado.httputil._parseparam(';' + line)
+diff --git a/test/__init__.py b/test/__init__.py
+index f7c4a7a..22d3616 100644
+--- a/test/__init__.py
++++ b/test/__init__.py
+@@ -8,7 +8,7 @@ import socket
+ from nose.plugins.skip import SkipTest
+
+ from urllib3.exceptions import MaxRetryError, HTTPWarning
+-from urllib3.packages import six
++import six
+
+ # We need a host that will not immediately close the connection with a TCP
+ # Reset. SO suggests this hostname
+diff --git a/test/contrib/test_pyopenssl.py b/test/contrib/test_pyopenssl.py
+index 5d57527..f23ff19 100644
+--- a/test/contrib/test_pyopenssl.py
++++ b/test/contrib/test_pyopenssl.py
+@@ -1,5 +1,5 @@
+ from nose.plugins.skip import SkipTest
+-from urllib3.packages import six
++import six
+
+ if six.PY3:
+ raise SkipTest('Testing of PyOpenSSL disabled on PY3')
+diff --git a/test/test_collections.py b/test/test_collections.py
+index 9d72939..78ef634 100644
+--- a/test/test_collections.py
++++ b/test/test_collections.py
+@@ -4,7 +4,7 @@ from urllib3._collections import (
+ HTTPHeaderDict,
+ RecentlyUsedContainer as Container
+ )
+-from urllib3.packages import six
++import six
+ xrange = six.moves.xrange
+
+ from nose.plugins.skip import SkipTest
+diff --git a/test/test_fields.py b/test/test_fields.py
+index cdec68b..66da148 100644
+--- a/test/test_fields.py
++++ b/test/test_fields.py
+@@ -1,7 +1,7 @@
+ import unittest
+
+ from urllib3.fields import guess_content_type, RequestField
+-from urllib3.packages.six import u
++from six import u
+
+
+ class TestRequestField(unittest.TestCase):
+diff --git a/test/test_filepost.py b/test/test_filepost.py
+index 390dbb3..ecc6710 100644
+--- a/test/test_filepost.py
++++ b/test/test_filepost.py
+@@ -2,7 +2,7 @@ import unittest
+
+ from urllib3.filepost import encode_multipart_formdata, iter_fields
+ from urllib3.fields import RequestField
+-from urllib3.packages.six import b, u
++from six import b, u
+
+
+ BOUNDARY = '!! test boundary !!'
+diff --git a/test/test_retry.py b/test/test_retry.py
+index 421e508..8fcc287 100644
+--- a/test/test_retry.py
++++ b/test/test_retry.py
+@@ -1,7 +1,7 @@
+ import unittest
+
+ from urllib3.response import HTTPResponse
+-from urllib3.packages.six.moves import xrange
++from six.moves import xrange
+ from urllib3.util.retry import Retry
+ from urllib3.exceptions import (
+ ConnectTimeoutError,
+diff --git a/urllib3/_collections.py b/urllib3/_collections.py
+index b68b9a5..af8074a 100644
+--- a/urllib3/_collections.py
++++ b/urllib3/_collections.py
+@@ -14,7 +14,7 @@ try: # Python 2.7+
+ from collections import OrderedDict
+ except ImportError:
+ from .packages.ordered_dict import OrderedDict
+-from .packages.six import iterkeys, itervalues, PY3
++from six import iterkeys, itervalues, PY3
+
+
+ __all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict']
+diff --git a/urllib3/connection.py b/urllib3/connection.py
+index 3eab1e2..115eac9 100644
+--- a/urllib3/connection.py
++++ b/urllib3/connection.py
+@@ -3,7 +3,7 @@ import sys
+ import socket
+ from socket import error as SocketError, timeout as SocketTimeout
+ import warnings
+-from .packages import six
++import six
+
+ try: # Python 3
+ from http.client import HTTPConnection as _HTTPConnection, HTTPException
+diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py
+index b38ac68..563f108 100644
+--- a/urllib3/connectionpool.py
++++ b/urllib3/connectionpool.py
+@@ -30,7 +30,7 @@ from .exceptions import (
+ NewConnectionError,
+ )
+ from .packages.ssl_match_hostname import CertificateError
+-from .packages import six
++import six
+ from .connection import (
+ port_by_scheme,
+ DummyConnection,
+diff --git a/urllib3/fields.py b/urllib3/fields.py
+index c853f8d..5fe3c24 100644
+--- a/urllib3/fields.py
++++ b/urllib3/fields.py
+@@ -1,7 +1,7 @@
+ import email.utils
+ import mimetypes
+
+-from .packages import six
++import six
+
+
+ def guess_content_type(filename, default='application/octet-stream'):
+diff --git a/urllib3/filepost.py b/urllib3/filepost.py
+index 0fbf488..97ab970 100644
+--- a/urllib3/filepost.py
++++ b/urllib3/filepost.py
+@@ -3,8 +3,8 @@ import codecs
+ from uuid import uuid4
+ from io import BytesIO
+
+-from .packages import six
+-from .packages.six import b
++import six
++from six import b
+ from .fields import RequestField
+
+ writer = codecs.lookup('utf-8')[3]
+diff --git a/urllib3/response.py b/urllib3/response.py
+index 788eb6c..c41bd2c 100644
+--- a/urllib3/response.py
++++ b/urllib3/response.py
+@@ -7,8 +7,8 @@ from ._collections import HTTPHeaderDict
+ from .exceptions import (
+ ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked
+ )
+-from .packages.six import string_types as basestring, binary_type, PY3
+-from .packages.six.moves import http_client as httplib
++from six import string_types as basestring, binary_type, PY3
++from six.moves import http_client as httplib
+ from .connection import HTTPException, BaseSSLError
+ from .util.response import is_fp_closed, is_response_to_head
+
+diff --git a/urllib3/util/request.py b/urllib3/util/request.py
+index bc64f6b..5f4ccfd 100644
+--- a/urllib3/util/request.py
++++ b/urllib3/util/request.py
+@@ -1,6 +1,6 @@
+ from base64 import b64encode
+
+-from ..packages.six import b
++from six import b
+
+ ACCEPT_ENCODING = 'gzip,deflate'
+
+diff --git a/urllib3/util/retry.py b/urllib3/util/retry.py
+index 1fb1f23..178b374 100644
+--- a/urllib3/util/retry.py
++++ b/urllib3/util/retry.py
+@@ -8,7 +8,7 @@ from ..exceptions import (
+ ReadTimeoutError,
+ ResponseError,
+ )
+-from ..packages import six
++import six
+
+
+ log = logging.getLogger(__name__)
diff --git a/debian/patches/02_require-cert-verification.patch b/debian/patches/02_require-cert-verification.patch
new file mode 100644
index 0000000..b10b3b1
--- /dev/null
+++ b/debian/patches/02_require-cert-verification.patch
@@ -0,0 +1,39 @@
+From f27a60baa815150ce224d1be75464c46d987f749 Mon Sep 17 00:00:00 2001
+From: Jamie Strandboge <jamie@canonical.com>
+Date: Thu, 8 Oct 2015 13:19:47 -0700
+Subject: require SSL certificate validation by default by using
+
+ CERT_REQUIRED and using the system /etc/ssl/certs/ca-certificates.crt
+Bug-Ubuntu: https://launchpad.net/bugs/1047054
+Bug-Debian: http://bugs.debian.org/686872
+Last-Update: 2014-09-01
+
+Patch-Name: 02_require-cert-verification.patch
+---
+ urllib3/connectionpool.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py
+index 563f108..a99d4ec 100644
+--- a/urllib3/connectionpool.py
++++ b/urllib3/connectionpool.py
+@@ -681,6 +681,8 @@ class HTTPSConnectionPool(HTTPConnectionPool):
+ ``ca_cert_dir``, and ``ssl_version`` are only used if :mod:`ssl` is
+ available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
+ the connection socket into an SSL socket.
++
++ On Debian, SSL certificate validation is required by default
+ """
+
+ scheme = 'https'
+@@ -690,8 +692,8 @@ class HTTPSConnectionPool(HTTPConnectionPool):
+ strict=False, timeout=Timeout.DEFAULT_TIMEOUT, maxsize=1,
+ block=False, headers=None, retries=None,
+ _proxy=None, _proxy_headers=None,
+- key_file=None, cert_file=None, cert_reqs=None,
+- ca_certs=None, ssl_version=None,
++ key_file=None, cert_file=None, cert_reqs='CERT_REQUIRED',
++ ca_certs='/etc/ssl/certs/ca-certificates.crt', ssl_version=None,
+ assert_hostname=None, assert_fingerprint=None,
+ ca_cert_dir=None, **conn_kw):
+
diff --git a/debian/patches/03_force_setuptools.patch b/debian/patches/03_force_setuptools.patch
new file mode 100644
index 0000000..b1b3234
--- /dev/null
+++ b/debian/patches/03_force_setuptools.patch
@@ -0,0 +1,25 @@
+From a89ef67cc90bdfc8d4832cdd07baed149bdffd88 Mon Sep 17 00:00:00 2001
+From: Barry Warsaw <barry@debian.org>
+Date: Thu, 8 Oct 2015 13:19:49 -0700
+Subject: Use setuptools.setup() so that the bdist_wheel
+
+ command will work.
+Last-Update: 2014-05-15
+
+Patch-Name: 03_force_setuptools.patch
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 6bdb7b9..1e1888d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env python
+
+-from distutils.core import setup
++from setuptools import setup
+
+ import os
+ import re
diff --git a/debian/patches/04_relax_nosetests_options.patch b/debian/patches/04_relax_nosetests_options.patch
new file mode 100644
index 0000000..bec12aa
--- /dev/null
+++ b/debian/patches/04_relax_nosetests_options.patch
@@ -0,0 +1,30 @@
+From 966d73488bc803f437395d8337bd322a0016084f Mon Sep 17 00:00:00 2001
+From: Daniele Tricoli <eriol@mornie.org>
+Date: Thu, 8 Oct 2015 13:19:50 -0700
+Subject: Do not use logging-clear-handlers to see all logging output and
+
+ disable cover-min-percentage since it require python-nose (>= 1.3): this way
+ it will be easier to backport python-urllib3 to Wheezy.
+Forwarded: not-needed
+Last-Update: 2014-7-7
+
+Patch-Name: 04_relax_nosetests_options.patch
+---
+ setup.cfg | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/setup.cfg b/setup.cfg
+index 6a64ffa..25a6815 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,8 +1,8 @@
+ [nosetests]
+-logging-clear-handlers = true
++# logging-clear-handlers = true
+ with-coverage = true
+ cover-package = urllib3
+-cover-min-percentage = 100
++# cover-min-percentage = 100
+ cover-erase = true
+
+ [flake8]
diff --git a/debian/patches/05_avoid-embedded-ssl-match-hostname.patch b/debian/patches/05_avoid-embedded-ssl-match-hostname.patch
new file mode 100644
index 0000000..9bb55f6
--- /dev/null
+++ b/debian/patches/05_avoid-embedded-ssl-match-hostname.patch
@@ -0,0 +1,32 @@
+From 797a60975f0ff4dcf615fca6f8b51ce62e5e91a6 Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefanor@debian.org>
+Date: Thu, 8 Oct 2015 13:19:51 -0700
+Subject: 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.
+Forwarded: not-needed
+Last-Update: 2014-11-18
+
+Patch-Name: 05_avoid-embedded-ssl-match-hostname.patch
+---
+ urllib3/packages/__init__.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/urllib3/packages/__init__.py b/urllib3/packages/__init__.py
+index 37e8351..10a3aa8 100644
+--- 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
diff --git a/debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch b/debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch
new file mode 100644
index 0000000..435b6bb
--- /dev/null
+++ b/debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch
@@ -0,0 +1,22 @@
+From 7db0aa9b18e70f43ef0bfcdec7f223e5b681aaf0 Mon Sep 17 00:00:00 2001
+From: SVN-Git Migration <python-modules-team@lists.alioth.debian.org>
+Date: Thu, 8 Oct 2015 13:19:52 -0700
+Subject: Rely on six to import httplib or http.client.
+
+Origin: https://github.com/shazow/urllib3/commit/f4eb94bc36277d5d584683a03fc9eb3950429a15
+
+Patch-Name: 06_rely-on-six-to-import-httplib-or-http.client.patch
+---
+ urllib3/util/response.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/urllib3/util/response.py b/urllib3/util/response.py
+index 2c1de15..6695809 100644
+--- a/urllib3/util/response.py
++++ b/urllib3/util/response.py
+@@ -1,4 +1,4 @@
+-from ..packages.six.moves import http_client as httplib
++from six.moves import http_client as httplib
+
+ from ..exceptions import HeaderParsingError
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b91b93d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,6 @@
+01_do-not-use-embedded-python-six.patch
+02_require-cert-verification.patch
+03_force_setuptools.patch
+04_relax_nosetests_options.patch
+05_avoid-embedded-ssl-match-hostname.patch
+06_rely-on-six-to-import-httplib-or-http.client.patch
diff --git a/debian/python-urllib3-whl.install b/debian/python-urllib3-whl.install
new file mode 100644
index 0000000..fd3f06f
--- /dev/null
+++ b/debian/python-urllib3-whl.install
@@ -0,0 +1 @@
+usr/share/python-wheels
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..e94c934
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+
+export PYBUILD_NAME=urllib3
+export PYTHONWARNINGS=d
+
+%:
+ dh $@ --with python2,python3 --buildsystem=pybuild
+
+override_dh_auto_configure:
+ rm -f urllib3/packages/six.py
+
+override_dh_auto_install:
+ dh_auto_install
+ python3 setup.py bdist_wheel \
+ --universal \
+ -d $(CURDIR)/debian/tmp/usr/share/python-wheels
+
+override_dh_auto_test:
+ # Exclude dummyserver tests since they are also failing upstream.
+ PYBUILD_SYSTEM=custom \
+ PYBUILD_TEST_ARGS="cd {build_dir}; {interpreter} -m nose {dir}/test --with-coverage -e with_dummyserver" dh_auto_test
+ # Clean here .coverage because it is created by nose using the coverage
+ # plugin
+ find . -name .coverage -delete
+
+override_dh_installchangelogs:
+ dh_installchangelogs CHANGES.rst
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d58f4c1
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+http://pypi.debian.net/urllib3/urllib3-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))