|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
# RHEL8: Tests disabled due to missing dependencies
|
|
|
|
|
# Disable tests on RHEL9 as to not pull in the test dependencies
|
|
|
|
|
# Specify --with tests to run the tests e.g. on EPEL
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-requests
|
|
|
|
|
Version: 2.25.0
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: 2.25.1
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Summary: HTTP library, written in Python, for human beings
|
|
|
|
|
|
|
|
|
|
License: ASL 2.0
|
|
|
|
@ -23,17 +25,27 @@ Patch2: Remove-tests-that-use-the-tarpit.patch
|
|
|
|
|
# a pretty odd one so this is a niche requirement.
|
|
|
|
|
Patch3: requests-2.12.4-tests_nonet.patch
|
|
|
|
|
|
|
|
|
|
# The [security] extra as present in upstream 2.25.1 is not possible,
|
|
|
|
|
# because the PyOpenSSL package is not part of RHEL 9.
|
|
|
|
|
# We backport a pre-2.26.0 commit that makes request[security] a no-op:
|
|
|
|
|
# https://github.com/psf/requests/pull/5867
|
|
|
|
|
# """
|
|
|
|
|
# We initially removed default support for PyOpenSSL in Requests 2.24.0
|
|
|
|
|
# as it is now considered less secure. Deprecation of the extras_require was
|
|
|
|
|
# announced in Requests 2.25.0 and we're officially removing the extras_require
|
|
|
|
|
# functionality in Requests 2.26.0.
|
|
|
|
|
# Projects currently using requests[security] after this change will continue
|
|
|
|
|
# to operate as if performing a standard requests installation (secure by default).
|
|
|
|
|
# """
|
|
|
|
|
Patch4: Empty-security-extras.patch
|
|
|
|
|
|
|
|
|
|
# Security fix for CVE-2023-32681
|
|
|
|
|
# Unintended leak of Proxy-Authorization header
|
|
|
|
|
# Resolved upstream: https://github.com/psf/requests/commit/74ea7cf7a6a27a4eeb2ae24e162bcc942a6706d5
|
|
|
|
|
# Tracking bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2209469
|
|
|
|
|
Patch4: CVE-2023-32681.patch
|
|
|
|
|
Patch5: CVE-2023-32681.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
|
|
|
|
# x86_64 compose of CRB, but we don't want to ship it at all.
|
|
|
|
|
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
|
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Most existing Python modules for sending HTTP requests are extremely verbose and
|
|
|
|
@ -47,23 +59,14 @@ Summary: HTTP library, written in Python, for human beings
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-requests}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-chardet
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-urllib3
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-idna
|
|
|
|
|
# RHEL8: pygments is used for syntax highlighting in the docs - disabled due to missing deps
|
|
|
|
|
# BuildRequires: python%{python3_pkgversion}-pygments
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-httpbin
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-mock
|
|
|
|
|
BuildRequires: python3dist(pytest)
|
|
|
|
|
BuildRequires: python3dist(pytest-httpbin)
|
|
|
|
|
BuildRequires: python3dist(pytest-mock)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Requires: python%{python3_pkgversion}-chardet
|
|
|
|
|
Requires: python%{python3_pkgversion}-urllib3
|
|
|
|
|
Requires: python%{python3_pkgversion}-idna
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-requests
|
|
|
|
|
Most existing Python modules for sending HTTP requests are extremely verbose and
|
|
|
|
@ -71,6 +74,16 @@ cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
|
|
|
|
capabilities you should need, but the API is thoroughly broken. This library is
|
|
|
|
|
designed to make HTTP requests easy for developers.
|
|
|
|
|
|
|
|
|
|
%pyproject_extras_subpkg -n python%{python3_pkgversion}-requests security socks
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%pyproject_buildrequires -r
|
|
|
|
|
%else
|
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n requests-%{version}
|
|
|
|
|
|
|
|
|
@ -85,37 +98,55 @@ sed -i '/#!\/usr\/.*python/d' requests/certs.py
|
|
|
|
|
# change the docs. Thus, we set pytest not to run doctests at all.
|
|
|
|
|
sed -i 's/ --doctest-modules//' pytest.ini
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files requests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
# test_https_warnings: https://github.com/psf/requests/issues/5530
|
|
|
|
|
%pytest -v -k "not test_https_warnings"
|
|
|
|
|
%endif # tests
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-requests
|
|
|
|
|
%files -n python%{python3_pkgversion}-requests -f %{pyproject_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.md HISTORY.md
|
|
|
|
|
%{python3_sitelib}/*.egg-info/
|
|
|
|
|
%{python3_sitelib}/requests/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Jun 21 2023 Lumír Balhar <lbalhar@redhat.com> - 2.25.0-3
|
|
|
|
|
* Fri Jun 16 2023 Charalampos Stratakis <cstratak@redhat.com> - 2.25.1-7
|
|
|
|
|
- Security fix for CVE-2023-32681
|
|
|
|
|
Resolves: rhbz#2209469
|
|
|
|
|
|
|
|
|
|
* Mon Jan 18 2021 Tomas Orsava <torsava@redhat.com> - 2.25.0-2
|
|
|
|
|
- Convert from Fedora to the python39 module in RHEL8
|
|
|
|
|
- Resolves: rhbz#1877430
|
|
|
|
|
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.25.1-6
|
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.25.1-5
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Thu Jul 15 2021 Miro Hrončok <mhroncok@redhat.com> - 2.25.1-4
|
|
|
|
|
- Make requests[security] extras a no-op (backported from future 2.26.0)
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.25.1-3
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Mon Mar 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.25.1-2
|
|
|
|
|
- Disable tests on RHEL9 to avoid pulling in the test dependencies
|
|
|
|
|
|
|
|
|
|
* Tue Feb 02 2021 Kevin Fenzi <kevin@scrye.com> - 2.25.1-1
|
|
|
|
|
- Update 2.25.1. Fix is rhbz#1908487
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.25.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Nov 25 2020 Petr Viktorin <pviktori@redhat.com> - 2.25.0-1
|
|
|
|
|
- Update to 2.25.0
|
|
|
|
@ -123,6 +154,9 @@ Resolves: rhbz#2209469
|
|
|
|
|
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 2.24.0-5
|
|
|
|
|
- Don't BR pytest-cov
|
|
|
|
|
|
|
|
|
|
* Fri Sep 18 2020 Petr Viktorin <pviktori@redhat.com> - 2.24.0-4
|
|
|
|
|
- Port to pyproject macros
|
|
|
|
|
|
|
|
|
|
* Fri Sep 18 2020 Miro Hrončok <mhroncok@redhat.com> - 2.24.0-3
|
|
|
|
|
- Build with pytest 6, older version is no longer required
|
|
|
|
|
|
|
|
|
|