diff options
-rw-r--r-- | debian/changelog | 275 | ||||
-rw-r--r-- | debian/clean | 1 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 101 | ||||
-rw-r--r-- | debian/copyright | 90 | ||||
-rw-r--r-- | debian/patches/01_do-not-use-embedded-python-six.patch | 169 | ||||
-rw-r--r-- | debian/patches/02_require-cert-verification.patch | 29 | ||||
-rw-r--r-- | debian/patches/03_force_setuptools.patch | 15 | ||||
-rw-r--r-- | debian/patches/04_relax_nosetests_options.patch | 20 | ||||
-rw-r--r-- | debian/patches/05_avoid-embedded-ssl-match-hostname.patch | 22 | ||||
-rw-r--r-- | debian/patches/series | 5 | ||||
-rw-r--r-- | debian/python-urllib3-whl.install | 1 | ||||
-rwxr-xr-x | debian/rules | 27 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/watch | 2 |
15 files changed, 759 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..06d041a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,275 @@ +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..922a4f5 --- /dev/null +++ b/debian/control @@ -0,0 +1,101 @@ +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, + python3-all, + python3-coverage (>= 3.6), + python3-mock, + python3-nose (>=1.3.3), + python3-setuptools, + python3-six, + python3-wheel, +Standards-Version: 3.9.6 +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.0 +Homepage: http://urllib3.readthedocs.org +Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-urllib3/trunk/ +Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-urllib3/trunk/ + +Package: python-urllib3 +Architecture: all +Depends: + ${misc:Depends}, + ${python:Depends}, + python-six +Recommends: + ca-certificates, + python-ndg-httpsclient, + python-openssl, + python-pyasn1 +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..62a5a51 --- /dev/null +++ b/debian/patches/01_do-not-use-embedded-python-six.patch @@ -0,0 +1,169 @@ +Description: Do not use embedded copy of python-six. +Author: Daniele Tricoli <eriol@mornie.org> +Forwarded: not-needed +Last-Update: 2014-12-31 + +--- a/test/test_collections.py ++++ b/test/test_collections.py +@@ -4,7 +4,7 @@ + HTTPHeaderDict, + RecentlyUsedContainer as Container + ) +-from urllib3.packages import six ++import six + xrange = six.moves.xrange + + +--- a/urllib3/connectionpool.py ++++ b/urllib3/connectionpool.py +@@ -27,7 +27,7 @@ + InsecureRequestWarning, + ) + from .packages.ssl_match_hostname import CertificateError +-from .packages import six ++import six + from .connection import ( + port_by_scheme, + DummyConnection, +--- a/urllib3/filepost.py ++++ b/urllib3/filepost.py +@@ -3,8 +3,8 @@ + 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] +--- a/urllib3/response.py ++++ b/urllib3/response.py +@@ -4,7 +4,7 @@ + + from ._collections import HTTPHeaderDict + from .exceptions import ProtocolError, DecodeError, ReadTimeoutError +-from .packages.six import string_types as basestring, binary_type ++from six import string_types as basestring, binary_type + from .connection import HTTPException, BaseSSLError + from .util.response import is_fp_closed + +--- a/test/test_filepost.py ++++ b/test/test_filepost.py +@@ -2,7 +2,7 @@ + + 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 !!' +--- a/dummyserver/handlers.py ++++ b/dummyserver/handlers.py +@@ -211,7 +211,7 @@ + """ + 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) +--- 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'): +--- 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): +--- a/urllib3/_collections.py ++++ b/urllib3/_collections.py +@@ -14,7 +14,7 @@ + from collections import OrderedDict + except ImportError: + from .packages.ordered_dict import OrderedDict +-from .packages.six import iterkeys, itervalues ++from six import iterkeys, itervalues + + + __all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict'] +--- a/urllib3/connection.py ++++ b/urllib3/connection.py +@@ -3,7 +3,7 @@ + import socket + from socket import timeout as SocketTimeout + import warnings +-from .packages import six ++import six + + try: # Python 3 + from http.client import HTTPConnection as _HTTPConnection, HTTPException +--- 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' + +--- a/urllib3/util/retry.py ++++ b/urllib3/util/retry.py +@@ -8,7 +8,7 @@ + ReadTimeoutError, + ResponseError, + ) +-from ..packages import six ++import six + + + log = logging.getLogger(__name__) +--- 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, +--- a/test/__init__.py ++++ b/test/__init__.py +@@ -7,7 +7,7 @@ + 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 +--- 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/debian/patches/02_require-cert-verification.patch b/debian/patches/02_require-cert-verification.patch new file mode 100644 index 0000000..1b5992c --- /dev/null +++ b/debian/patches/02_require-cert-verification.patch @@ -0,0 +1,29 @@ +Author: Jamie Strandboge <jamie@canonical.com> +Description: 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 + +--- a/urllib3/connectionpool.py ++++ b/urllib3/connectionpool.py +@@ -628,6 +628,8 @@ + ``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' +@@ -637,8 +639,8 @@ + 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, + **conn_kw): + diff --git a/debian/patches/03_force_setuptools.patch b/debian/patches/03_force_setuptools.patch new file mode 100644 index 0000000..e829b50 --- /dev/null +++ b/debian/patches/03_force_setuptools.patch @@ -0,0 +1,15 @@ +Author: Barry Warsaw <barry@debian.org> +Description: Use setuptools.setup() so that the bdist_wheel + command will work. +Last-Update: 2014-05-15 + +--- 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..2f7f8ff --- /dev/null +++ b/debian/patches/04_relax_nosetests_options.patch @@ -0,0 +1,20 @@ +Description: 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. +Author: Daniele Tricoli <eriol@mornie.org> +Forwarded: not-needed +Last-Update: 2014-7-7 + +--- 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..36d65e0 --- /dev/null +++ b/debian/patches/05_avoid-embedded-ssl-match-hostname.patch @@ -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@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 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..b77d657 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,5 @@ +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 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..c404fa4 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://pypi.python.org/packages/source/u/urllib3/urllib3-(.*)\.tar\.gz |