debian/0000755000000000000000000000000012302376523007171 5ustar debian/copyright0000644000000000000000000000774512230054553011135 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: urllib3 Upstream-Contact: Andrey Petrov 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-2013, Daniele Tricoli 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. debian/changelog0000644000000000000000000001104512302376523011044 0ustar python-urllib3 (1.7.1-1build1) trusty; urgency=medium * Rebuild to drop files installed into /usr/share/pyshared. -- Matthias Klose Sun, 23 Feb 2014 13:53:23 +0000 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 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 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 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 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 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 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 Thu, 29 Mar 2012 02:09:04 +0200 python-urllib3 (1.2.2-1) unstable; urgency=low * Initial release (Closes: #648783) -- Daniele Tricoli Fri, 10 Feb 2012 04:41:11 +0100 debian/clean0000644000000000000000000000003512230054553010170 0ustar urllib3.egg-info/* .coverage debian/compat0000644000000000000000000000000212230054553010363 0ustar 9 debian/patches/0000755000000000000000000000000012230054553010614 5ustar debian/patches/01_do-not-use-embedded-python-six.patch0000644000000000000000000000474412230054553020007 0ustar Description: Do not use embedded copy of python-six. Author: Daniele Tricoli Forwarded: not-needed Last-Update: 2013-10-16 --- a/test/test_collections.py +++ b/test/test_collections.py @@ -1,7 +1,7 @@ import unittest from urllib3._collections import RecentlyUsedContainer as Container -from urllib3.packages import six +import six xrange = six.moves.xrange --- a/urllib3/connectionpool.py +++ b/urllib3/connectionpool.py @@ -55,7 +55,7 @@ ProxyError, ) from .packages.ssl_match_hostname import CertificateError, match_hostname -from .packages import six +import six from .request import RequestMethods from .response import HTTPResponse from .util import ( --- a/urllib3/filepost.py +++ b/urllib3/filepost.py @@ -10,8 +10,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 @@ -10,7 +10,7 @@ import io from .exceptions import DecodeError -from .packages.six import string_types as basestring, binary_type +from six import string_types as basestring, binary_type from .util import is_fp_closed --- a/urllib3/util.py +++ b/urllib3/util.py @@ -32,7 +32,7 @@ except ImportError: pass -from .packages import six +import six from .exceptions import LocationParseError, SSLError, TimeoutStateError --- 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 @@ -186,7 +186,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 @@ -7,7 +7,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 b, u +from six import b, u class TestRequestField(unittest.TestCase): debian/patches/04_relax_nosetests_options.patch0000644000000000000000000000106612230054553017140 0ustar 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 Forwarded: not-needed Last-Update: 2013-10-16 --- 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 [egg_info] debian/patches/series0000644000000000000000000000020312230054553012024 0ustar 01_do-not-use-embedded-python-six.patch 02_require-cert-verification.patch 03_no-setuptools.patch 04_relax_nosetests_options.patch debian/patches/03_no-setuptools.patch0000644000000000000000000000105712143226301014770 0ustar Description: Do not use setuptools. Author: Daniele Tricoli Forwarded: not-needed Last-Update: 2013-05-10 --- a/setup.py +++ b/setup.py @@ -5,11 +5,6 @@ import os import re -try: - import setuptools -except ImportError: - pass # No 'develop' command, oh well. - base_path = os.path.dirname(__file__) # Get the version (borrowed from SQLAlchemy) @@ -49,6 +44,4 @@ 'urllib3.contrib', ], requires=requirements, - tests_require=tests_requirements, - test_suite='test', ) debian/patches/02_require-cert-verification.patch0000644000000000000000000000310012230054553017217 0ustar Author: Jamie Strandboge 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: 2013-10-16 --- a/urllib3/connectionpool.py +++ b/urllib3/connectionpool.py @@ -87,12 +87,13 @@ Based on httplib.HTTPSConnection but wraps the socket with SSL certification. """ - cert_reqs = None - ca_certs = None + # On Debian, SSL certificate validation is required by default + cert_reqs = 'CERT_REQUIRED' + ca_certs = '/etc/ssl/certs/ca-certificates.crt' ssl_version = None def set_cert(self, key_file=None, cert_file=None, - cert_reqs=None, ca_certs=None, + cert_reqs='CERT_REQUIRED', ca_certs='/etc/ssl/certs/ca-certificates.crt', assert_hostname=None, assert_fingerprint=None): self.key_file = key_file @@ -644,8 +645,8 @@ strict=False, timeout=None, maxsize=1, block=False, headers=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): HTTPConnectionPool.__init__(self, host, port, strict, timeout, maxsize, debian/control0000644000000000000000000000415212230054553010572 0ustar Source: python-urllib3 Maintainer: Debian Python Modules Team Uploaders: Daniele Tricoli Section: python Priority: optional Build-Depends: debhelper (>= 9), dh-python, python-all (>= 2.6.6-3), python-coverage (>= 3.4), python-mock, python-nose (>=1.1.2), python-six, python-tornado, python3-all, python3-six, Standards-Version: 3.9.4 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 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 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. debian/rules0000755000000000000000000000144612230054553010252 0ustar #!/usr/bin/make -f export PYBUILD_DESTDIR_python2=debian/python-urllib3/ export PYBUILD_DESTDIR_python3=debian/python3-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 # Remove dummyserver/ tests to not pollute namespace. rm -rf debian/python*-urllib3/usr/lib/python*/dist-packages/dummyserver override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # Python3 testing is not possible at the moment because missing # dependencies: python3-coverage. # Upstream is using a python2.7 features: assertRaises() as a context # manager set -ex; python2.7 /usr/bin/nosetests endif override_dh_installchangelogs: dh_installchangelogs CHANGES.rst debian/source/0000755000000000000000000000000011770437345010501 5ustar debian/source/format0000644000000000000000000000001411713602633011676 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000012212230054553010211 0ustar version=3 https://pypi.python.org/packages/source/u/urllib3/urllib3-(.*)\.tar\.gz