2019-09-30 11:15:38 -04:00
|
|
|
%global srcname urllib3
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
2022-07-18 14:51:50 +08:00
|
|
|
Version: 1.26.8
|
2022-08-09 15:49:14 +08:00
|
|
|
Release: 2
|
2019-09-30 11:15:38 -04:00
|
|
|
Summary: Sanity-friendly HTTP client for Python
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://urllib3.readthedocs.io
|
2020-07-28 17:58:04 +08:00
|
|
|
Source0: https://github.com/urllib3/urllib3/archive/%{version}/%{version}.tar.gz
|
2019-09-30 11:15:38 -04:00
|
|
|
Source1: ssl_match_hostname_py3.py
|
|
|
|
|
|
2021-02-02 20:53:11 +08:00
|
|
|
Patch0001: remove_mock.patch
|
2021-06-01 12:22:35 +08:00
|
|
|
Patch6000: backport-CVE-2021-28363.patch
|
2021-02-02 20:53:11 +08:00
|
|
|
|
2019-09-30 11:15:38 -04:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
2020-07-28 17:58:04 +08:00
|
|
|
%description
|
|
|
|
|
HTTP library with thread-safe connection pooling, file post support, sanity friendly, and more.
|
2019-09-30 11:15:38 -04:00
|
|
|
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: Python3 HTTP library with thread-safe connection pooling and file post
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
2020-07-28 17:58:04 +08:00
|
|
|
BuildRequires: python3-setuptools
|
2019-09-30 11:15:38 -04:00
|
|
|
|
|
|
|
|
%if %{with tests}
|
2022-01-19 14:20:17 +08:00
|
|
|
BuildRequires: python3-cryptography python3-mock python3-six python-idna python-dateutil
|
2020-07-29 09:16:57 +08:00
|
|
|
BuildRequires: python3-pysocks python3-pytest python3-tornado python-trustme
|
2019-09-30 11:15:38 -04:00
|
|
|
%endif
|
|
|
|
|
|
2020-07-28 17:58:04 +08:00
|
|
|
Requires: ca-certificates python3-idna python3-six python3-pysocks
|
2019-09-30 11:15:38 -04:00
|
|
|
|
|
|
|
|
%description -n python3-urllib3
|
2020-07-28 17:58:04 +08:00
|
|
|
Python3 HTTP module with connection pooling and file POST abilities.
|
2019-09-30 11:15:38 -04:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{srcname}-%{version} -p1
|
2022-08-09 15:49:14 +08:00
|
|
|
|
|
|
|
|
recent_date=$(date --date "7 month ago" +"%Y, %_m, %_d")
|
|
|
|
|
sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_date)/" src/urllib3/connection.py
|
|
|
|
|
|
2019-09-30 11:15:38 -04:00
|
|
|
#Failure use case circumvention
|
|
|
|
|
rm -rf test/with_dummyserver/
|
|
|
|
|
rm -rf test/appengine/
|
|
|
|
|
rm -rf test/contrib/
|
|
|
|
|
rm -rf test/test_no_ssl.py
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
|
2022-01-19 14:20:17 +08:00
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/urllib3/packages/six.py
|
|
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/urllib3/packages/__pycache__/six.*
|
2019-09-30 11:15:38 -04:00
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
|
|
|
|
|
|
|
|
|
|
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}/__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__/
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
2021-02-02 20:53:11 +08:00
|
|
|
# skip some failing tests
|
|
|
|
|
skiplist+="test_retry_deprecated or test_retry"
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v -k "not (${skiplist})"
|
2019-09-30 11:15:38 -04:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-urllib3
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%license LICENSE.txt
|
2022-01-19 14:20:17 +08:00
|
|
|
%doc CHANGES.rst README.rst
|
2019-09-30 11:15:38 -04:00
|
|
|
%{python3_sitelib}/urllib3/
|
|
|
|
|
%{python3_sitelib}/urllib3-*.egg-info
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-08-09 15:49:14 +08:00
|
|
|
* Tue Aug 09 2022 chenhaixing <chenhaixing@huawei.com> - 1.26.8-2
|
|
|
|
|
- delete patch Bump-RECENT_DATE.patch and modify RECENT_DATE in python-urllib3.spec to adapt time change
|
|
|
|
|
|
2022-07-18 14:51:50 +08:00
|
|
|
* Mon Jul 18 2022 OpenStack_SIG <openstack@openeuler.org> - 1.26.8-1
|
|
|
|
|
- Upgrade package to version 1.26.8
|
|
|
|
|
|
2022-07-06 20:49:34 +08:00
|
|
|
* Wed Jul 06 2022 chenhaixing <chenhaixing@huawei.com> - 1.26.7-2
|
|
|
|
|
- add patch Bump RECENT_DATE and solve test case test_recent_date failed
|
|
|
|
|
|
2022-01-19 14:20:17 +08:00
|
|
|
* Wed Jan 19 2022 wangkerong <wangkerong@huawei.com> - 1.26.7-1
|
|
|
|
|
- update to 1.26.7 and remove python-nose dependency
|
|
|
|
|
|
2021-07-05 11:32:53 +08:00
|
|
|
* Mon Jul 5 2021 zhanzhimin <zhanzhimin@huawei.com> - 1.26.3-3
|
|
|
|
|
- fix CVE-2021-33503
|
|
|
|
|
|
2021-06-01 12:22:35 +08:00
|
|
|
* Tue Jun 1 2021 hanhui <hanhui15@huawei.com> - 1.26.3-2
|
|
|
|
|
- fix CVE-2021-28363
|
|
|
|
|
|
2021-02-02 20:53:11 +08:00
|
|
|
* Wed Feb 3 2021 chengguipeng <chengguipeng@huawei.com> - 1.26.3-1
|
|
|
|
|
- upgrade to 1.26.3
|
|
|
|
|
|
2020-07-28 17:58:04 +08:00
|
|
|
* Tue Jul 28 2020 chengguipeng<chengguipeng@huawei.com> - 1.25.9-1
|
|
|
|
|
- upgrade to 1.25.9
|
|
|
|
|
|
2019-11-06 19:50:44 +08:00
|
|
|
* Sat Oct 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.24.3-2
|
|
|
|
|
- optimize spec file.
|
|
|
|
|
|
2019-09-30 11:15:38 -04:00
|
|
|
* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.24.3-1
|
|
|
|
|
- Package init
|