Update to 1.26.4

- switch to %pytest
- don't ship our own ssl_match_hostname wrapper, use the one from upstream

Resolves: rhbz#1935737
This commit is contained in:
Miro Hrončok 2021-05-18 19:59:57 +02:00 committed by Charalampos Stratakis
parent 6845391bb2
commit c423116066
4 changed files with 16 additions and 13 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@
/urllib3-1.25.7.tar.gz /urllib3-1.25.7.tar.gz
/urllib3-1.25.8.tar.gz /urllib3-1.25.8.tar.gz
/urllib3-1.25.10.tar.gz /urllib3-1.25.10.tar.gz
/urllib3-1.26.4.tar.gz

View File

@ -5,15 +5,13 @@
%bcond_with tests %bcond_with tests
Name: python-%{srcname} Name: python-%{srcname}
Version: 1.25.10 Version: 1.26.4
Release: 6%{?dist} Release: 1%{?dist}
Summary: Python HTTP library with thread-safe connection pooling and file post Summary: Python HTTP library with thread-safe connection pooling and file post
License: MIT License: MIT
URL: https://github.com/urllib3/urllib3 URL: https://github.com/urllib3/urllib3
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
# Unbundle ssl_match_hostname since we depend on it
Source1: ssl_match_hostname_py3.py
BuildArch: noarch BuildArch: noarch
%description %description
@ -25,9 +23,12 @@ Summary: Python3 HTTP library with thread-safe connection pooling and fil
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
%if %{with tests} %if %{with tests}
BuildRequires: python3-dateutil
BuildRequires: python3-six BuildRequires: python3-six
BuildRequires: python3-pysocks BuildRequires: python3-pysocks
BuildRequires: python3-pytest BuildRequires: python3-pytest
BuildRequires: python3-pytest-freezegun
BuildRequires: python3-pytest-timeout
BuildRequires: python3-tornado BuildRequires: python3-tornado
BuildRequires: python3-trustme BuildRequires: python3-trustme
BuildRequires: python3-idna BuildRequires: python3-idna
@ -88,12 +89,12 @@ sed -i -e 's/^import mock/from unittest import mock/' \
%py3_install %py3_install
# Unbundle the Python 3 build # Unbundle the Python 3 build
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py* 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/__pycache__/six.*
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/ rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/_implementation.py
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.*
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/ mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
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}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
@ -103,9 +104,7 @@ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
%if %{with tests} %if %{with tests}
%check %check
pushd test %pytest -v
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v
popd
%endif %endif
@ -117,6 +116,10 @@ popd
%changelog %changelog
* Tue May 18 2021 Miro Hrončok <mhroncok@redhat.com> - 1.26.4-1
- Update to 1.26.4
Resolves: rhbz#1935737
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.25.10-6 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.25.10-6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937

View File

@ -1 +1 @@
SHA512 (urllib3-1.25.10.tar.gz) = 7927e58de8ef24474179297e6ef7700bb3026a13d578e5bb01e32c6c4b6b5e70cc35980a815e3bcd976678e344250222d38fb86abe0f956e5023deb0f80bc1a1 SHA512 (urllib3-1.26.4.tar.gz) = c770ae93e024af2bd79145d90426ad56f89184a4a02a55551bf54680a1ba369e683080e1899f00d57efcb085145e29a189f502ae6b41e572de111909297fb4e6

View File

@ -1 +0,0 @@
from ssl import match_hostname, CertificateError