diff --git a/.gitignore b/.gitignore index 61a4314..630c966 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ /urllib3-1.20.tar.gz /urllib3-1.21.1.tar.gz /urllib3-1.22.tar.gz +/urllib3-1.23.tar.gz +/urllib3-1.24.tar.gz +/urllib3-1.24.1.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 051bcb4..1cb5df1 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -1,14 +1,14 @@ %global srcname urllib3 Name: python-%{srcname} -Version: 1.22 +Version: 1.24.1 Release: 2%{?dist} Summary: Python HTTP library with thread-safe connection pooling and file post License: MIT -URL: https://github.com/shazow/urllib3 +URL: https://github.com/urllib3/urllib3 Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz -# Used with Python 3.5+ +# Unbundle ssl_match_hostname since we depend on it Source1: ssl_match_hostname_py3.py BuildArch: noarch @@ -26,7 +26,6 @@ Requires: python-six Requires: python-backports-ssl_match_hostname # Secure extra requirements -Requires: python2-pyOpenSSL Requires: python-cryptography Requires: python-idna Requires: python-ipaddress @@ -34,6 +33,7 @@ Requires: python-pysocks BuildRequires: python2-devel # For unittests +BuildRequires: python-backports-ssl_match_hostname BuildRequires: python-nose BuildRequires: python-nose-exclude BuildRequires: python-coverage @@ -64,7 +64,6 @@ BuildRequires: python3-tornado Requires: ca-certificates Requires: python3-six Requires: python3-pysocks -Requires: python3-pyOpenSSL Requires: python3-cryptography Requires: python3-idna Requires: python3-pysocks @@ -74,7 +73,7 @@ Python3 HTTP module with connection pooling and file POST abilities. %prep -%setup -q -n %{srcname}-%{version} +%autosetup -p1 -n %{srcname}-%{version} # Drop the dummyserver tests in koji. They fail there in real builds, but not # in scratch builds (weird). rm -rf test/with_dummyserver/ @@ -84,6 +83,10 @@ rm -rf test/appengine/ # to do with Fedora in particular. They don't fail in upstream build infrastructure rm -rf test/contrib/ +# Tests for Python built without SSL, but Fedora builds with SSL. These tests +# fail when combined with the unbundling of backports-ssl_match_hostname +rm -f test/test_no_ssl.py + %build %py2_build %py3_build @@ -98,37 +101,31 @@ rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py* rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/ mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/ -ln -s ../../six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py -ln -s ../../six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc -ln -s ../../six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo - -ln -s ../../backports/ssl_match_hostname %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname +ln -s %{python2_sitelib}/six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py +ln -s %{python2_sitelib}/six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc +ln -s %{python2_sitelib}/six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo +ln -s %{python2_sitelib}/backports/ssl_match_hostname \ + %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname # Unbundle the Python 3 build rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py* +rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six* rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/ mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/ -ln -s ../../six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py -# urllib3 requires Python 3.5 to use the standard library's match_hostname, -# which we ship in Fedora 26, so we can safely replace the bundled version with -# this stub which imports the necessary objects. -cp %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py - -# Copy in six.py just for the test suite. -cp %{python2_sitelib}/six.* %{buildroot}/%{python2_sitelib}/. -cp %{python3_sitelib}/six.* %{buildroot}/%{python3_sitelib}/. +cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py +ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py +ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \ + %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ +ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \ + %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ %check -py.test -py.test-3 - -# And after its done, remove our copied in bits -rm -rf %{buildroot}/%{python2_sitelib}/six* -rm -rf %{buildroot}/%{python2_sitelib}/backports* -rm -rf %{buildroot}/%{python3_sitelib}/six* -rm -rf %{buildroot}/%{python3_sitelib}/__pycache__* +pushd test +PYTHONPATH=%{buildroot}%{python2_sitelib}:%{python2_sitelib} %{__python2} -m pytest -v +PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v +popd %files -n python2-%{srcname} @@ -146,6 +143,25 @@ rm -rf %{buildroot}/%{python3_sitelib}/__pycache__* %changelog +* Tue Nov 13 2018 Jeremy Cline - 1.24.1-2 +- Adjust unbundling of ssl_match_hostname + +* Mon Oct 29 2018 Jeremy Cline - 1.24.1-1 +- Update to v1.24.1 + +* Thu May 03 2018 Lukas Slebodnik - 1.22-6 +- Do not lowercase hostnames with custom-protocol (rhbz 1567862) +- upstream: https://github.com/urllib3/urllib3/issues/1267 + +* Mon Apr 16 2018 Jeremy Cline - 1.22-5 +- Drop the dependency on PyOpenSSL, it's not needed (rhbz 1567862) + +* Thu Jan 25 2018 Tomas Hoger - 1.22-4 +- Fix FTBFS - Move RECENT_DATE to 2017-06-30 + +* Fri Dec 01 2017 Jeremy Cline - 1.22-3 +- Symlink the Python 3 bytecode for six (rbhz 1519147) + * Thu Jul 27 2017 Fedora Release Engineering - 1.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild diff --git a/sources b/sources index 8488c8b..d1287f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (urllib3-1.22.tar.gz) = 1b45a4a64e71847a4fc62b9263235d5b05b62076698fa324454efeb7ad065abd702cc9eadb2d396d9270b07e91e9bad94c52a4b9b115aadccb27f81955e6feab +SHA512 (urllib3-1.24.1.tar.gz) = 2f5453cf0ec1b65de9a9fca0fdb45664f7481507c875b7115c063cb177628b4b611377e588508ab8433e0797fc78b60fd3ea5cc5ac0a3f105d36bfff9a56f1f4