Accepting request 486170 from devel:languages:python:singlespec

- merge python3 modifications
- update for multipython build
- update to 1.20:
  * Added support for waiting for I/O using selectors other than select, improving urllib3’s behaviour with large numbers of concurrent connections. (Pull #1001)
  * Updated the date for the system clock check. (Issue #1005)
  * ConnectionPools now correctly consider hostnames to be case-insensitive. (Issue #1032)
  * Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Pull #1063)
  * Outdated versions of cryptography now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Issue #1044)
  * Automatically attempt to rewind a file-like body object when a request is retried or redirected. (Pull #1039)
  * Fix some bugs that occur when modules incautiously patch the queue module. (Pull #1061)
  * Prevent retries from occuring on read timeouts for which the request method was not in the method whitelist. (Issue #1059)
  * Changed the PyOpenSSL contrib module to lazily load idna to avoid unnecessarily bloating the memory of programs that don’t need it. (Pull #1076)
  * Add support for IPv6 literals with zone identifiers. (Pull #1013)
  * Added support for socks5h:// and socks4a:// schemes when working with SOCKS proxies, and controlled remote DNS appropriately. (Issue #1035)

OBS-URL: https://build.opensuse.org/request/show/486170
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=25
This commit is contained in:
Jan Matejek 2017-04-06 15:11:12 +00:00 committed by Git OBS Bridge
parent bf31fee757
commit 3f19e47238
5 changed files with 56 additions and 47 deletions

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Tue Mar 14 14:34:45 UTC 2017 - jmatejek@suse.com
- merge python3 modifications
- update for multipython build
- update to 1.20:
* Added support for waiting for I/O using selectors other than select, improving urllib3s behaviour with large numbers of concurrent connections. (Pull #1001)
* Updated the date for the system clock check. (Issue #1005)
* ConnectionPools now correctly consider hostnames to be case-insensitive. (Issue #1032)
* Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Pull #1063)
* Outdated versions of cryptography now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Issue #1044)
* Automatically attempt to rewind a file-like body object when a request is retried or redirected. (Pull #1039)
* Fix some bugs that occur when modules incautiously patch the queue module. (Pull #1061)
* Prevent retries from occuring on read timeouts for which the request method was not in the method whitelist. (Issue #1059)
* Changed the PyOpenSSL contrib module to lazily load idna to avoid unnecessarily bloating the memory of programs that dont need it. (Pull #1076)
* Add support for IPv6 literals with zone identifiers. (Pull #1013)
* Added support for socks5h:// and socks4a:// schemes when working with SOCKS proxies, and controlled remote DNS appropriately. (Issue #1035)
-------------------------------------------------------------------
Wed Dec 28 08:08:14 UTC 2016 - tbechtold@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-urllib3
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,37 +16,39 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-urllib3
Version: 1.19.1
Version: 1.20
Release: 0
Summary: HTTP library with thread-safe connection pooling, file post, and more
License: MIT
Group: Development/Languages/Python
Url: http://urllib3.readthedocs.org/
Source: https://pypi.io/packages/source/u/urllib3/urllib3-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
# PATCH-FIX-OPENSUSE speilicke@suse.com -- We need no coverage report
Patch1: urllib3-test-no-coverage.patch
# PATCH-FEATURE-UPSTREAM -- use set_default_verify_paths() if no certificate path is supplied
# should be removed in the future, see SR#437853
Patch2: urllib3-ssl-default-context.patch
# PATCH-FIX-OPENSUSE -- do not use unsupported SSLv3 in tests
Patch3: urllib3-test-ssl-drop-sslv3.patch
BuildRequires: python-PySocks
BuildRequires: python-rpm-macros
#!BuildIgnore: python-requests
BuildRequires: python-devel
BuildRequires: python-mock >= 1.3.0
BuildRequires: python-nose >= 1.3.7
BuildRequires: python-nose-exclude >= 0.4.1
BuildRequires: python-tornado >= 4.2.1
BuildRequires: %{python_module PySocks}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module mock >= 1.3.0}
BuildRequires: %{python_module nose >= 1.3.7}
BuildRequires: %{python_module nose-exclude >= 0.4.1}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module tornado >= 4.2.1}
Recommends: python-pyOpenSSL
Recommends: python-pyasn1
Recommends: python-cryptography
Recommends: python-idna
Recommends: python-ndg-httpsclient
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
Recommends: ca-certificates-mozilla
BuildArch: noarch
%endif
%python_subpackages
%description
Highlights
@ -73,14 +75,16 @@ Highlights
%endif
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%check
rm -rf build
PYTHONPATH="%{buildroot}%{python_sitelib}" nosetests \
# pretend to be TRAVIS (this triggers timing tolerance)
export TRAVIS=1
%{python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" $python -m nose \
--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 \
%if 0%{?suse_version} && 0%{?suse_version} <= 1320
@ -91,16 +95,10 @@ PYTHONPATH="%{buildroot}%{python_sitelib}" nosetests \
--exclude-test=test.with_dummyserver.test_poolmanager.TestPoolManager.test_headers \
--exclude-test=test.with_dummyserver.test_https.TestHTTPS_IPv6Addr \
--exclude-test=test.with_dummyserver.test_proxy_poolmanager.TestIPv6HTTPProxyManager \
--exclude-test=test.with_dummyserver.test_https.TestHTTPS_IPSAN
--exclude-test=test.with_dummyserver.test_https.TestHTTPS_IPSAN
}
#%pre
# previous versions of the package installed .egg-info as a directory,
# the new update now installs it as a file. Clean out the directory, should it exist.
#if [ -d %{python_sitelib}/urllib3-%{version}-py*.egg-info ]; then
# rm -rf %{python_sitelib}/urllib3-%{version}-py*.egg-info
#fi
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
%{python_sitelib}/urllib3

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53bc34c8ee268c3bd83ecf5e9c80fa783f3148484579bd4e20f4a7c1bb2dd6a0
size 187416

3
urllib3-1.20.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97ef2b6e2878d84c0126b9f4e608e37a951ca7848e4855a7f7f4437d5c34a72f
size 201873

View File

@ -1,21 +1,13 @@
Index: urllib3-1.19.1/urllib3/util/ssl_.py
Index: b/urllib3/util/ssl_.py
===================================================================
--- urllib3-1.19.1.orig/urllib3/util/ssl_.py
+++ urllib3-1.19.1/urllib3/util/ssl_.py
@@ -314,9 +314,13 @@ def ssl_wrap_socket(sock, keyfile=None,
if e.errno == errno.ENOENT:
raise SSLError(e)
raise
- elif getattr(context, 'load_default_certs', None) is not None:
- # try to load OS default certs; works well on Windows (require Python3.4+)
- context.load_default_certs()
+ else:
+ if cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'):
+ context.set_default_verify_paths()
+
+ if getattr(context, 'load_default_certs', None) is not None:
+ # try to load OS default certs; works well on Windows (require Python3.4+)
+ context.load_default_certs()
--- a/urllib3/util/ssl_.py
+++ b/urllib3/util/ssl_.py
@@ -317,6 +317,8 @@ def ssl_wrap_socket(sock, keyfile=None,
elif getattr(context, 'load_default_certs', None) is not None:
# try to load OS default certs; works well on Windows (require Python3.4+)
context.load_default_certs()
+ elif cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'):
+ context.set_default_verify_paths()
if certfile:
context.load_cert_chain(certfile, keyfile)