From 5883e35a8fa8bce1627fd88b97e5b2332e37b322 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Tue, 19 Aug 2014 02:29:19 +0200 Subject: [PATCH] python-urllib3: update to 1.9; update unbundling patch. --- srcpkgs/python-urllib3/patches/unbundle.patch | 159 ++++++++++-------- srcpkgs/python-urllib3/template | 11 +- 2 files changed, 93 insertions(+), 77 deletions(-) diff --git a/srcpkgs/python-urllib3/patches/unbundle.patch b/srcpkgs/python-urllib3/patches/unbundle.patch index d2cc501b1b..a3973455e9 100644 --- a/srcpkgs/python-urllib3/patches/unbundle.patch +++ b/srcpkgs/python-urllib3/patches/unbundle.patch @@ -1,7 +1,16 @@ +diff -Nur dev-requirements.txt dev-requirements.txt +--- dev-requirements.txt 2014-07-07 22:56:01.000000000 +0200 ++++ dev-requirements.txt 2014-08-19 02:10:38.507546859 +0200 +@@ -3,3 +3,5 @@ + tornado==3.2.2 + coverage==3.7.1 + tox==1.7.1 ++six ++backports.ssl_match_hostname diff -Nur dummyserver/handlers.py dummyserver/handlers.py ---- dummyserver/handlers.py 2014-04-18 07:35:23.000000000 +0200 -+++ dummyserver/handlers.py 2014-07-04 12:18:35.064230194 +0200 -@@ -190,7 +190,7 @@ +--- dummyserver/handlers.py 2014-07-07 22:56:01.000000000 +0200 ++++ dummyserver/handlers.py 2014-08-19 02:03:31.933539957 +0200 +@@ -211,7 +211,7 @@ """ import tornado.httputil import email.utils @@ -11,19 +20,19 @@ diff -Nur dummyserver/handlers.py dummyserver/handlers.py line = line.encode('utf-8') parts = tornado.httputil._parseparam(';' + line) diff -Nur setup.py setup.py ---- setup.py 2014-06-24 20:19:21.000000000 +0200 -+++ setup.py 2014-07-04 12:18:55.856229523 +0200 -@@ -45,7 +45,6 @@ +--- setup.py 2014-07-07 22:56:01.000000000 +0200 ++++ setup.py 2014-08-19 01:51:36.502528381 +0200 +@@ -42,7 +42,6 @@ url='http://urllib3.readthedocs.org/', license='MIT', packages=['urllib3', - 'urllib3.packages', 'urllib3.packages.ssl_match_hostname', 'urllib3.contrib', 'urllib3.util', ], - requires=requirements, + requires=[], diff -Nur test/test_collections.py test/test_collections.py --- test/test_collections.py 2014-03-15 01:05:07.000000000 +0100 -+++ test/test_collections.py 2014-07-04 12:25:52.942216059 +0200 ++++ test/test_collections.py 2014-08-19 01:52:16.527529028 +0200 @@ -4,7 +4,7 @@ HTTPHeaderDict, RecentlyUsedContainer as Container @@ -34,25 +43,23 @@ diff -Nur test/test_collections.py test/test_collections.py diff -Nur test/test_connectionpool.py test/test_connectionpool.py ---- test/test_connectionpool.py 2014-03-04 20:08:03.000000000 +0100 -+++ test/test_connectionpool.py 2014-07-06 19:49:59.995827758 +0200 -@@ -6,7 +6,12 @@ +--- test/test_connectionpool.py 2014-07-07 22:56:01.000000000 +0200 ++++ test/test_connectionpool.py 2014-08-19 01:54:30.020531188 +0200 +@@ -6,7 +6,10 @@ HTTPConnectionPool, ) - from urllib3.util import Timeout + from urllib3.util.timeout import Timeout -from urllib3.packages.ssl_match_hostname import CertificateError +try: -+ # python3.2+ + from ssl import CertificateError +except ImportError: -+ # Older python where the backport from pypi is installed + from backports.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, diff -Nur test/test_fields.py test/test_fields.py --- test/test_fields.py 2014-03-04 20:08:03.000000000 +0100 -+++ test/test_fields.py 2014-07-04 12:27:03.632213778 +0200 ++++ test/test_fields.py 2014-08-19 01:54:57.941531640 +0200 @@ -1,7 +1,7 @@ import unittest @@ -64,7 +71,7 @@ diff -Nur test/test_fields.py test/test_fields.py class TestRequestField(unittest.TestCase): diff -Nur test/test_filepost.py test/test_filepost.py --- test/test_filepost.py 2014-03-15 01:05:07.000000000 +0100 -+++ test/test_filepost.py 2014-07-04 12:27:22.673213163 +0200 ++++ test/test_filepost.py 2014-08-19 01:55:14.829531913 +0200 @@ -2,7 +2,7 @@ from urllib3.filepost import encode_multipart_formdata, iter_fields @@ -74,19 +81,21 @@ diff -Nur test/test_filepost.py test/test_filepost.py BOUNDARY = '!! test boundary !!' -diff -Nur test-requirements.txt test-requirements.txt ---- test-requirements.txt 2014-06-24 20:19:21.000000000 +0200 -+++ test-requirements.txt 2014-07-06 19:48:14.791831154 +0200 -@@ -2,3 +2,5 @@ - mock==1.0.1 - tornado==3.1.1 - coverage==3.6 -+six -+backports.ssl_match_hostname +diff -Nur test/test_retry.py test/test_retry.py +--- test/test_retry.py 2014-07-07 22:56:01.000000000 +0200 ++++ test/test_retry.py 2014-08-19 01:56:07.295532762 +0200 +@@ -1,6 +1,6 @@ + import unittest + +-from urllib3.packages.six.moves import xrange ++from six.moves import xrange + from urllib3.util.retry import Retry + from urllib3.exceptions import ( + ConnectTimeoutError, diff -Nur urllib3/_collections.py urllib3/_collections.py ---- urllib3/_collections.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/_collections.py 2014-07-04 12:51:43.761166000 +0200 -@@ -16,11 +16,8 @@ +--- urllib3/_collections.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/_collections.py 2014-08-19 02:07:34.678543884 +0200 +@@ -10,11 +10,8 @@ pass @@ -100,48 +109,44 @@ diff -Nur urllib3/_collections.py urllib3/_collections.py __all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict'] +diff -Nur urllib3/connectionpool.py urllib3/connectionpool.py +--- urllib3/connectionpool.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/connectionpool.py 2014-08-19 01:57:57.899534552 +0200 +@@ -26,8 +26,11 @@ + TimeoutError, + InsecureRequestWarning, + ) +-from .packages.ssl_match_hostname import CertificateError +-from .packages import six ++try: ++ from ssl import CertificateError ++except ImportError: ++ from backports.ssl_match_hostname import CertificateError ++import six + from .connection import ( + port_by_scheme, + DummyConnection, diff -Nur urllib3/connection.py urllib3/connection.py ---- urllib3/connection.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/connection.py 2014-07-06 19:52:27.263823004 +0200 -@@ -33,8 +33,13 @@ +--- urllib3/connection.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/connection.py 2014-08-19 01:59:00.332535562 +0200 +@@ -27,8 +27,11 @@ from .exceptions import ( ConnectTimeoutError, ) -from .packages.ssl_match_hostname import match_hostname -from .packages import six +try: -+ # python3.2+ -+ from ssl import match_hostname, CertificateError ++ from ssl import match_hostname +except ImportError: -+ # Older python where the backport from pypi is installed -+ from backports.ssl_match_hostname import match_hostname, CertificateError ++ from backports.ssl_match_hostname import match_hostname +import six - from .util import ( - assert_fingerprint, + + from .util.ssl_ import ( resolve_cert_reqs, -diff -Nur urllib3/connectionpool.py urllib3/connectionpool.py ---- urllib3/connectionpool.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/connectionpool.py 2014-07-06 19:51:36.446824644 +0200 -@@ -30,8 +30,13 @@ - ReadTimeoutError, - ProxyError, - ) --from .packages.ssl_match_hostname import CertificateError --from .packages import six -+try: -+ # python3.2+ -+ from ssl import match_hostname, CertificateError -+except ImportError: -+ # Older python where the backport from pypi is installed -+ from backports.ssl_match_hostname import match_hostname, CertificateError -+import six - from .connection import ( - port_by_scheme, - DummyConnection, diff -Nur urllib3/fields.py urllib3/fields.py ---- urllib3/fields.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/fields.py 2014-07-04 12:31:13.137205724 +0200 -@@ -7,7 +7,7 @@ +--- urllib3/fields.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/fields.py 2014-08-19 01:59:25.757535973 +0200 +@@ -1,7 +1,7 @@ import email.utils import mimetypes @@ -151,9 +156,9 @@ diff -Nur urllib3/fields.py urllib3/fields.py def guess_content_type(filename, default='application/octet-stream'): diff -Nur urllib3/filepost.py urllib3/filepost.py ---- urllib3/filepost.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/filepost.py 2014-07-04 12:31:58.762204251 +0200 -@@ -9,8 +9,8 @@ +--- urllib3/filepost.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/filepost.py 2014-08-19 02:00:05.271536613 +0200 +@@ -3,8 +3,8 @@ from uuid import uuid4 from io import BytesIO @@ -165,25 +170,37 @@ diff -Nur urllib3/filepost.py urllib3/filepost.py writer = codecs.lookup('utf-8')[3] diff -Nur urllib3/response.py urllib3/response.py ---- urllib3/response.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/response.py 2014-07-04 12:32:18.507203614 +0200 -@@ -11,7 +11,7 @@ +--- urllib3/response.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/response.py 2014-08-19 02:00:38.448537150 +0200 +@@ -4,7 +4,7 @@ from ._collections import HTTPHeaderDict - from .exceptions import DecodeError, ReadTimeoutError + 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 .util import is_fp_closed - + from .connection import HTTPException, BaseSSLError + from .util.response import is_fp_closed diff -Nur urllib3/util/request.py urllib3/util/request.py ---- urllib3/util/request.py 2014-06-24 01:44:37.000000000 +0200 -+++ urllib3/util/request.py 2014-07-04 12:29:20.645209355 +0200 +--- urllib3/util/request.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/util/request.py 2014-08-19 02:00:57.616537460 +0200 @@ -1,6 +1,6 @@ from base64 import b64encode +-from ..packages.six import b ++from six import b + + ACCEPT_ENCODING = 'gzip,deflate' + +diff -Nur urllib3/util/retry.py urllib3/util/retry.py +--- urllib3/util/retry.py 2014-07-07 22:56:01.000000000 +0200 ++++ urllib3/util/retry.py 2014-08-19 02:01:18.385537796 +0200 +@@ -7,7 +7,7 @@ + ReadTimeoutError, + MaxRetryError, + ) -from ..packages import six +import six - ACCEPT_ENCODING = 'gzip,deflate' + log = logging.getLogger(__name__) diff --git a/srcpkgs/python-urllib3/template b/srcpkgs/python-urllib3/template index ec2f69c92d..13035b055f 100644 --- a/srcpkgs/python-urllib3/template +++ b/srcpkgs/python-urllib3/template @@ -1,22 +1,21 @@ # Template file for 'python-urllib3' pkgname=python-urllib3 -version=1.8.3 +version=1.9 revision=1 noarch=yes wrksrc="${pkgname#*-}-${version}" build_style="python-module" python_versions="2.7 3.4" -hostmakedepends="python-devel python3.4-devel" -makedepends="${hostmakedepends} python-backports-ssl-match-hostname - python-six python3.4-six" +hostmakedepends="python-setuptools python3.4-setuptools" +makedepends="python-backports-ssl-match-hostname python-six python3.4-six" depends="python python-backports-ssl-match-hostname python-six ca-certificates" pycompile_module="urllib3" short_desc="HTTP library with thread-safe connection pooling (Python2)" maintainer="Alessio Sergi " homepage="https://github.com/shazow/urllib3" license="MIT" -distfiles="https://pypi.python.org/packages/source/u/${pkgname#*-}/${pkgname#*-}-${version}.tar.gz" -checksum=4b162cffb6c7dde47b47ecee741f8a00953512541241e61d0f8292107a865426 +distfiles="https://pypi.python.org/packages/source/u/urllib3/urllib3-${version}.tar.gz" +checksum=4e400b2e2f53652dd0d8062ca5ecc425b6af6e96989b8d31f5dd875186aa247b python3.4-urllib3_package() { noarch=yes