Accepting request 345090 from home:matejcik:urllib3tmp

- re-enable tests, re-add relevant dependencies
  in python 2.7.9 and up
- drop %pre section because apparently "egg-info as file" is no longer
  true and this breaks builds

OBS-URL: https://build.opensuse.org/request/show/345090
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=13
This commit is contained in:
Jan Matejek 2015-11-18 17:46:02 +00:00 committed by Git OBS Bridge
parent 5aad292d93
commit d12858beaa
3 changed files with 13 additions and 10 deletions

View File

@ -4,15 +4,18 @@ Wed Oct 27 16:33:44 UTC 2015 - jmatejek@suse.com
- removed python-certifi dependency, we don't want to use it
- drop 0001-Don-t-pin-dependency-to-exact-version.patch because it's
not needed anymore
- re-enable tests, re-add dependencies
- re-enable tests, re-add relevant dependencies
* don't exclude test_util.py
* exclude proxy timeout tests that fail for spurious reasons
- urllib3-ssl-default-context.patch - use set_default_verify_paths()
if no certificate path specified and verification not explicitly
disabled
- urllib3-test-ssl-drop-sslv3.patch - don't use "SSLv3" constants
as they are not supported in openssl (and conversely python) anymore
in python 2.7.9 and up
- ready-event.patch - fix race conditions in timeout tests
- drop %pre section because apparently "egg-info as file" is no longer
true and this breaks builds
-------------------------------------------------------------------
Wed Oct 14 09:35:30 UTC 2015 - toddrme2178@gmail.com

View File

@ -32,14 +32,12 @@ Patch2: urllib3-ssl-default-context.patch
Patch3: urllib3-test-ssl-drop-sslv3.patch
# PATCH-FIX-UPSTREAM -- fix race conditions with ready_event state variable in timeout tests
Patch4: ready-event.patch
#!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-tox >= 2.1.1
BuildRequires: python-twine >= 1.5.0
BuildRequires: python-wheel >= 0.24.0
Requires: python-pyOpenSSL
Requires: python-pyasn1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -69,7 +67,9 @@ Highlights
%setup -q -n urllib3-%{version}
%patch1 -p1
%patch2 -p1
%if %(python -c "import ssl; print(hasattr(ssl,'PROTOCOL_TLSv1_2'))") == "True"
%patch3 -p1
%endif
%patch4 -p1
%build
@ -84,12 +84,12 @@ 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_pool_timeout
%pre
#%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
#if [ -d %{python_sitelib}/urllib3-%{version}-py*.egg-info ]; then
# rm -rf %{python_sitelib}/urllib3-%{version}-py*.egg-info
#fi
%files
%defattr(-,root,root,-)

View File

@ -6,7 +6,7 @@ Index: urllib3-1.12/urllib3/util/ssl_.py
if e.errno == errno.ENOENT:
raise SSLError(e)
raise
+ elif cert_reqs != ssl.CERT_NONE:
+ elif cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'):
+ context.set_default_verify_paths()
if certfile: