aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog54
-rw-r--r--debian/compat1
-rw-r--r--debian/control64
-rw-r--r--debian/copyright90
-rw-r--r--debian/patches/01_do-not-use-embedded-python-six.patch73
-rw-r--r--debian/patches/02_require-cert-verification.patch19
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules52
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch2
10 files changed, 358 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..8d90785
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,54 @@
+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/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..87cd849
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,64 @@
+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 (>= 7.0.50~),
+ python-all (>= 2.6.6-3),
+ python-coverage (>= 3.4),
+ python-nose (>=1.1.2),
+ python-setuptools (>= 0.6b3),
+ python-six,
+ python-tornado,
+ python3-all
+Standards-Version: 3.9.4
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.0
+Homepage: http://urllib3.readthedocs.org
+Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-urllib3/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/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.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b3fda2c
--- /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-2012, Andrey Petrov
+License: Expat
+
+Files: urllib3/packages/six.py
+Copyright: 2010-2011, Benjamin Peterson
+License: Expat
+
+Files: urllib3/packages/mimetools_choose_boundary/__init__.py
+Copyright: 2010, Python Software Foundation
+License: PSF-2
+
+Files: urllib3/packages/ssl_match_hostname/__init__.py
+Copyright: 2011, Python Software Foundation
+License: PSF-2
+
+Files: debian/*
+Copyright: 2012, 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..111513d
--- /dev/null
+++ b/debian/patches/01_do-not-use-embedded-python-six.patch
@@ -0,0 +1,73 @@
+Description: Do not use embedded copy of python-six.
+Author: Daniele Tricoli <eriol@mornie.org>
+Forwarded: not-needed
+Last-Update: 2012-11-09
+
+--- 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
+@@ -52,7 +52,7 @@
+ )
+
+ from .packages.ssl_match_hostname import match_hostname, CertificateError
+-from .packages import six
++import six
+
+
+ xrange = six.moves.xrange
+--- 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
+
+ writer = codecs.lookup('utf-8')[3]
+
+--- a/urllib3/response.py
++++ b/urllib3/response.py
+@@ -11,7 +11,7 @@
+ from io import BytesIO
+
+ from .exceptions import DecodeError
+-from .packages.six import string_types as basestring
++from six import string_types as basestring
+
+
+ log = logging.getLogger(__name__)
+--- a/urllib3/util.py
++++ b/urllib3/util.py
+@@ -18,7 +18,7 @@
+ except ImportError: # `select` doesn't exist on AppEngine.
+ select = False
+
+-from .packages import six
++import six
+ from .exceptions import LocationParseError
+
+
+--- a/test/test_filepost.py
++++ b/test/test_filepost.py
+@@ -1,7 +1,7 @@
+ import unittest
+
+ from urllib3.filepost import encode_multipart_formdata, iter_fields
+-from urllib3.packages.six import b, u
++from six import b, u
+
+
+ BOUNDARY = '!! test boundary !!'
diff --git a/debian/patches/02_require-cert-verification.patch b/debian/patches/02_require-cert-verification.patch
new file mode 100644
index 0000000..b4decd9
--- /dev/null
+++ b/debian/patches/02_require-cert-verification.patch
@@ -0,0 +1,19 @@
+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
+
+Index: python-urllib3-1.3/urllib3/connectionpool.py
+===================================================================
+--- python-urllib3-1.3.orig/urllib3/connectionpool.py 2012-09-06 16:03:50.000000000 -0500
++++ python-urllib3-1.3/urllib3/connectionpool.py 2012-09-06 16:08:59.000000000 -0500
+@@ -463,7 +463,7 @@
+ strict=False, timeout=None, maxsize=1,
+ block=False, headers=None,
+ key_file=None, cert_file=None,
+- cert_reqs='CERT_NONE', ca_certs=None):
++ cert_reqs='CERT_REQUIRED', ca_certs='/etc/ssl/certs/ca-certificates.crt'):
+
+ super(HTTPSConnectionPool, self).__init__(host, port,
+ strict, timeout, maxsize,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cb492ff
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01_do-not-use-embedded-python-six.patch
+02_require-cert-verification.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..e2ed423
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+
+export PYTHONWARNINGS=d
+
+PYVERS := $(shell pyversions -r)
+PY3VERS := $(shell py3versions -r)
+
+%:
+ dh $@ --with python2,python3 --buildsystem=python_distutils
+
+override_dh_auto_configure:
+ rm -f urllib3/packages/six.py
+
+override_dh_auto_build:
+ set -ex; \
+ for python in $(PYVERS) $(PY3VERS); do \
+ $$python setup.py build; \
+ done
+
+override_dh_auto_clean:
+ rm -rf build
+ rm -f .coverage
+ rm -rf *.egg-info
+ dh_auto_clean
+
+override_dh_auto_install:
+ set -ex; \
+ for python in $(PYVERS); do \
+ $$python setup.py install --skip-build --root debian/python-urllib3 \
+ --install-layout deb; \
+ done
+
+ set -ex; \
+ for python in $(PY3VERS); do \
+ $$python setup.py install --skip-build --root debian/python3-urllib3 \
+ --install-layout deb; \
+ done
+
+ # 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
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..fdd301c
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/u/urllib3/urllib3-(.*)\.tar\.gz