Accepting request 352078 from home:frispete:python
- Update to Version 1.14 (2015-12-29) * contrib: SOCKS proxy support! (Issue #762) * Fixed AppEngine handling of transfer-encoding header and bug in Timeout defaults checking. (Issue #763) - Update to Version 1.13.1 (2015-12-18) * Fixed regression in IPv6 + SSL for match_hostname. (Issue #761) - Update to Version 1.13 (2015-12-14) * Fixed pip install urllib3[secure] on modern pip. (Issue #706) * pyopenssl: Fixed SSL3_WRITE_PENDING error. (Issue #717) * pyopenssl: Support for TLSv1.1 and TLSv1.2. (Issue #696) * Close connections more defensively on exception. (Issue #734) * Adjusted read_chunked to handle gzipped, chunk-encoded bodies without repeatedly flushing the decoder, to function better on Jython. (Issue #743) * Accept ca_cert_dir for SSL-related PoolManager configuration. (Issue #758) - removed ready-event.patch: applied upstream - disabled more dysfunctional tests - restored ability to build with openSUSE <= 13.2 OBS-URL: https://build.opensuse.org/request/show/352078 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=15
This commit is contained in:
parent
d12858beaa
commit
ccce9a3ccb
@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 5 14:40:22 UTC 2016 - hpj@urpla.net
|
||||||
|
|
||||||
|
- Update to Version 1.14 (2015-12-29)
|
||||||
|
* contrib: SOCKS proxy support! (Issue #762)
|
||||||
|
* Fixed AppEngine handling of transfer-encoding header and bug in
|
||||||
|
Timeout defaults checking. (Issue #763)
|
||||||
|
- Update to Version 1.13.1 (2015-12-18)
|
||||||
|
* Fixed regression in IPv6 + SSL for match_hostname. (Issue #761)
|
||||||
|
- Update to Version 1.13 (2015-12-14)
|
||||||
|
* Fixed pip install urllib3[secure] on modern pip. (Issue #706)
|
||||||
|
* pyopenssl: Fixed SSL3_WRITE_PENDING error. (Issue #717)
|
||||||
|
* pyopenssl: Support for TLSv1.1 and TLSv1.2. (Issue #696)
|
||||||
|
* Close connections more defensively on exception. (Issue #734)
|
||||||
|
* Adjusted read_chunked to handle gzipped, chunk-encoded bodies
|
||||||
|
without repeatedly flushing the decoder, to function better on
|
||||||
|
Jython. (Issue #743)
|
||||||
|
* Accept ca_cert_dir for SSL-related PoolManager configuration.
|
||||||
|
(Issue #758)
|
||||||
|
|
||||||
|
- removed ready-event.patch: applied upstream
|
||||||
|
- disabled more dysfunctional tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 16 17:31:38 UTC 2015 - hpj@urpla.net
|
||||||
|
|
||||||
|
- restored ability to build with openSUSE <= 13.2
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 27 16:33:44 UTC 2015 - jmatejek@suse.com
|
Wed Oct 27 16:33:44 UTC 2015 - jmatejek@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-urllib3
|
# spec file for package python-urllib3
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-urllib3
|
Name: python-urllib3
|
||||||
Version: 1.12
|
Version: 1.14
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: HTTP library with thread-safe connection pooling, file post, and more
|
Summary: HTTP library with thread-safe connection pooling, file post, and more
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -30,8 +30,7 @@ Patch1: urllib3-test-no-coverage.patch
|
|||||||
Patch2: urllib3-ssl-default-context.patch
|
Patch2: urllib3-ssl-default-context.patch
|
||||||
# PATCH-FIX-OPENSUSE -- do not use unsupported SSLv3 in tests
|
# PATCH-FIX-OPENSUSE -- do not use unsupported SSLv3 in tests
|
||||||
Patch3: urllib3-test-ssl-drop-sslv3.patch
|
Patch3: urllib3-test-ssl-drop-sslv3.patch
|
||||||
# PATCH-FIX-UPSTREAM -- fix race conditions with ready_event state variable in timeout tests
|
BuildRequires: python-PySocks
|
||||||
Patch4: ready-event.patch
|
|
||||||
#!BuildIgnore: python-requests
|
#!BuildIgnore: python-requests
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-mock >= 1.3.0
|
BuildRequires: python-mock >= 1.3.0
|
||||||
@ -70,7 +69,6 @@ Highlights
|
|||||||
%if %(python -c "import ssl; print(hasattr(ssl,'PROTOCOL_TLSv1_2'))") == "True"
|
%if %(python -c "import ssl; print(hasattr(ssl,'PROTOCOL_TLSv1_2'))") == "True"
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch4 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
@ -82,7 +80,14 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|||||||
rm -rf build
|
rm -rf build
|
||||||
PYTHONPATH="%{buildroot}%{python_sitelib}" nosetests \
|
PYTHONPATH="%{buildroot}%{python_sitelib}" nosetests \
|
||||||
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestHTTPProxyManager.test_https_proxy_timeout \
|
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestHTTPProxyManager.test_https_proxy_timeout \
|
||||||
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestHTTPProxyManager.test_https_proxy_pool_timeout
|
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestHTTPProxyManager.test_https_proxy_pool_timeout \
|
||||||
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1320
|
||||||
|
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestIPv6HTTPProxyManager.test_basic_ipv6_proxy \
|
||||||
|
%endif
|
||||||
|
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestHTTPProxyManager.test_headerdict \
|
||||||
|
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestHTTPProxyManager.test_headers \
|
||||||
|
--exclude-test=test.with_dummyserver.test_poolmanager.TestPoolManager.test_headers \
|
||||||
|
--exclude-test=test.with_dummyserver.test_https.TestHTTPS_IPv6Addr
|
||||||
|
|
||||||
#%pre
|
#%pre
|
||||||
# previous versions of the package installed .egg-info as a directory,
|
# previous versions of the package installed .egg-info as a directory,
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
Index: urllib3-1.12/dummyserver/testcase.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.12.orig/dummyserver/testcase.py
|
|
||||||
+++ urllib3-1.12/dummyserver/testcase.py
|
|
||||||
@@ -45,7 +45,7 @@ class SocketDummyServerTestCase(unittest
|
|
||||||
def socket_handler(listener):
|
|
||||||
for _ in range(num):
|
|
||||||
ready_event.set()
|
|
||||||
- ready_event.clear()
|
|
||||||
+ #ready_event.clear()
|
|
||||||
|
|
||||||
sock = listener.accept()[0]
|
|
||||||
consume_socket(sock)
|
|
||||||
@@ -59,6 +59,11 @@ class SocketDummyServerTestCase(unittest
|
|
||||||
return ready_event
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
+ def wait_for_socket(cls, ready_event):
|
|
||||||
+ ready_event.wait()
|
|
||||||
+ ready_event.clear()
|
|
||||||
+
|
|
||||||
+ @classmethod
|
|
||||||
def start_basic_handler(cls, **kw):
|
|
||||||
return cls.start_response_handler(
|
|
||||||
b'HTTP/1.1 200 OK\r\n'
|
|
||||||
Index: urllib3-1.12/test/with_dummyserver/test_connectionpool.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.12.orig/test/with_dummyserver/test_connectionpool.py
|
|
||||||
+++ urllib3-1.12/test/with_dummyserver/test_connectionpool.py
|
|
||||||
@@ -57,11 +57,12 @@ class TestConnectionPoolTimeouts(SocketD
|
|
||||||
|
|
||||||
# Pool-global timeout
|
|
||||||
pool = HTTPConnectionPool(self.host, self.port, timeout=SHORT_TIMEOUT, retries=False)
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
self.assertRaises(ReadTimeoutError, pool.request, 'GET', '/')
|
|
||||||
block_event.set() # Release block
|
|
||||||
|
|
||||||
# Shouldn't raise this time
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
block_event.set() # Pre-release block
|
|
||||||
pool.request('GET', '/')
|
|
||||||
|
|
||||||
@@ -92,12 +93,13 @@ class TestConnectionPoolTimeouts(SocketD
|
|
||||||
timeout = Timeout(read=SHORT_TIMEOUT)
|
|
||||||
pool = HTTPConnectionPool(self.host, self.port, timeout=timeout, retries=False)
|
|
||||||
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
conn = pool._get_conn()
|
|
||||||
self.assertRaises(ReadTimeoutError, pool._make_request, conn, 'GET', '/')
|
|
||||||
pool._put_conn(conn)
|
|
||||||
block_event.set() # Release request
|
|
||||||
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
block_event.clear()
|
|
||||||
self.assertRaises(ReadTimeoutError, pool.request, 'GET', '/')
|
|
||||||
block_event.set() # Release request
|
|
||||||
@@ -106,7 +108,7 @@ class TestConnectionPoolTimeouts(SocketD
|
|
||||||
pool = HTTPConnectionPool(self.host, self.port, timeout=LONG_TIMEOUT, retries=False)
|
|
||||||
|
|
||||||
conn = pool._get_conn()
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
now = time.time()
|
|
||||||
self.assertRaises(ReadTimeoutError, pool._make_request, conn, 'GET', '/', timeout=timeout)
|
|
||||||
delta = time.time() - now
|
|
||||||
@@ -115,7 +117,7 @@ class TestConnectionPoolTimeouts(SocketD
|
|
||||||
self.assertTrue(delta < LONG_TIMEOUT, "timeout was pool-level LONG_TIMEOUT rather than request-level SHORT_TIMEOUT")
|
|
||||||
pool._put_conn(conn)
|
|
||||||
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
now = time.time()
|
|
||||||
self.assertRaises(ReadTimeoutError, pool.request, 'GET', '/', timeout=timeout)
|
|
||||||
delta = time.time() - now
|
|
||||||
@@ -125,11 +127,11 @@ class TestConnectionPoolTimeouts(SocketD
|
|
||||||
|
|
||||||
# Timeout int/float passed directly to request and _make_request should
|
|
||||||
# raise a request timeout
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
self.assertRaises(ReadTimeoutError, pool.request, 'GET', '/', timeout=SHORT_TIMEOUT)
|
|
||||||
block_event.set() # Release request
|
|
||||||
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
conn = pool._new_conn()
|
|
||||||
# FIXME: This assert flakes sometimes. Not sure why.
|
|
||||||
self.assertRaises(ReadTimeoutError, pool._make_request, conn, 'GET', '/', timeout=SHORT_TIMEOUT)
|
|
||||||
@@ -183,13 +185,14 @@ class TestConnectionPoolTimeouts(SocketD
|
|
||||||
block_event = Event()
|
|
||||||
ready_event = self.start_basic_handler(block_send=block_event, num=2)
|
|
||||||
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
# This will get the socket to raise an EAGAIN on the read
|
|
||||||
timeout = Timeout(connect=3, read=SHORT_TIMEOUT)
|
|
||||||
pool = HTTPConnectionPool(self.host, self.port, timeout=timeout, retries=False)
|
|
||||||
self.assertRaises(ReadTimeoutError, pool.request, 'GET', '/')
|
|
||||||
|
|
||||||
block_event.set()
|
|
||||||
- ready_event.wait()
|
|
||||||
+ self.wait_for_socket(ready_event)
|
|
||||||
block_event.clear()
|
|
||||||
|
|
||||||
# The connect should succeed and this should hit the read timeout
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0ea512776971fe4e76192600fe41e4e7ee96b4b9a5b15aefc1ac31d2a63872c6
|
|
||||||
size 151072
|
|
3
urllib3-1.14.tar.gz
Normal file
3
urllib3-1.14.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f5e3d05f4e970a80347c219a321d91bdfa5ba06472431f908121e69f6b0508e5
|
||||||
|
size 147913
|
@ -1,8 +1,8 @@
|
|||||||
Index: urllib3-1.12/urllib3/util/ssl_.py
|
Index: b/urllib3/util/ssl_.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- urllib3-1.12.orig/urllib3/util/ssl_.py
|
--- a/urllib3/util/ssl_.py
|
||||||
+++ urllib3-1.12/urllib3/util/ssl_.py
|
+++ b/urllib3/util/ssl_.py
|
||||||
@@ -278,6 +278,8 @@ def ssl_wrap_socket(sock, keyfile=None,
|
@@ -299,6 +299,8 @@ def ssl_wrap_socket(sock, keyfile=None,
|
||||||
if e.errno == errno.ENOENT:
|
if e.errno == errno.ENOENT:
|
||||||
raise SSLError(e)
|
raise SSLError(e)
|
||||||
raise
|
raise
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
diff -ruN a/setup.cfg b/setup.cfg
|
Index: b/setup.cfg
|
||||||
--- a/setup.cfg 2014-03-06 01:26:02.000000000 +0100
|
===================================================================
|
||||||
+++ b/setup.cfg 2014-03-20 15:31:36.249495224 +0100
|
--- a/setup.cfg
|
||||||
@@ -1,9 +1,5 @@
|
+++ b/setup.cfg
|
||||||
|
@@ -1,10 +1,5 @@
|
||||||
[nosetests]
|
[nosetests]
|
||||||
logging-clear-handlers = true
|
logging-clear-handlers=true
|
||||||
-with-coverage = true
|
-with-coverage=true
|
||||||
-cover-package = urllib3
|
-cover-package=urllib3
|
||||||
-cover-min-percentage = 100
|
-# no rounding problems here
|
||||||
-cover-erase = true
|
-cover-min-percentage=100
|
||||||
|
-cover-erase=true
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 99
|
exclude=./docs/conf.py,./test/*,./urllib3/packages/*
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: urllib3-1.12/test/with_dummyserver/test_https.py
|
Index: b/test/with_dummyserver/test_https.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- urllib3-1.12.orig/test/with_dummyserver/test_https.py
|
--- a/test/with_dummyserver/test_https.py
|
||||||
+++ urllib3-1.12/test/with_dummyserver/test_https.py
|
+++ b/test/with_dummyserver/test_https.py
|
||||||
@@ -416,21 +416,21 @@ class TestHTTPS(HTTPSDummyServerTestCase
|
@@ -425,21 +425,21 @@ class TestHTTPS(HTTPSDummyServerTestCase
|
||||||
|
|
||||||
class TestHTTPS_TLSv1(HTTPSDummyServerTestCase):
|
class TestHTTPS_TLSv1(HTTPSDummyServerTestCase):
|
||||||
certs = DEFAULT_CERTS.copy()
|
certs = DEFAULT_CERTS.copy()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user