85331f
%if 0%{?_module_build}
85331f
# Don't run tests on module-build for now
85331f
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1450608
85331f
%bcond_with tests
85331f
%else
85331f
# When bootstrapping Python, we cannot test this yet
85331f
%bcond_without tests
85331f
%endif
85331f
85331f
85331f
Name:           python-requests
85331f
Version:        2.20.0
85331f
Release:        1%{?dist}
85331f
Summary:        HTTP library, written in Python, for human beings
85331f
85331f
License:        ASL 2.0
85331f
URL:            https://pypi.io/project/requests
85331f
Source0:        https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz
85331f
# Explicitly use the system certificates in ca-certificates.
85331f
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
85331f
Patch0:         patch-requests-certs.py-to-use-the-system-CA-bundle.patch
85331f
85331f
# https://bugzilla.redhat.com/show_bug.cgi?id=1450608
85331f
Patch2:         Remove-tests-that-use-the-tarpit.patch
85331f
85331f
# Use 127.0.0.1 not localhost for socket.bind() in the Server test
85331f
# class, to fix tests in Koji's no-network environment
85331f
# This probably isn't really upstreamable, because I guess localhost
85331f
# could technically be IPv6 or something, and our no-network env is
85331f
# a pretty odd one so this is a niche requirement.
85331f
Patch3:         requests-2.12.4-tests_nonet.patch
85331f
85331f
# https://bugzilla.redhat.com/show_bug.cgi?id=1567862
85331f
Patch4:         Don-t-inject-pyopenssl-into-urllib3.patch
85331f
85331f
# Skip all tests needing httpbin
85331f
#   httpbin has too many dependencies to be shipped in RHEL just for
85331f
#   build-time package tests
85331f
Patch5:         Skip-all-tests-needing-httpbin.patch
85331f
85331f
BuildArch:      noarch
85331f
85331f
%description
85331f
Most existing Python modules for sending HTTP requests are extremely verbose and
85331f
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
85331f
capabilities you should need, but the API is thoroughly broken. This library is
85331f
designed to make HTTP requests easy for developers.
85331f
85331f
%package -n python%{python3_pkgversion}-requests
85331f
Summary: HTTP library, written in Python, for human beings
85331f
85331f
%{?python_provide:%python_provide python%{python3_pkgversion}-requests}
85331f
85331f
BuildRequires:  python%{python3_pkgversion}-devel
85331f
BuildRequires:  python%{python3_pkgversion}-chardet
85331f
BuildRequires:  python%{python3_pkgversion}-urllib3
85331f
BuildRequires:  python%{python3_pkgversion}-idna
85331f
%if %{with tests}
85331f
BuildRequires:  python%{python3_pkgversion}-pytest
85331f
BuildRequires:  python%{python3_pkgversion}-pytest-mock
85331f
%endif
85331f
85331f
Requires:       python%{python3_pkgversion}-chardet
85331f
Requires:       python%{python3_pkgversion}-urllib3
85331f
Requires:       python%{python3_pkgversion}-idna
85331f
85331f
%description -n python%{python3_pkgversion}-requests
85331f
Most existing Python modules for sending HTTP requests are extremely verbose and
85331f
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
85331f
capabilities you should need, but the API is thoroughly broken. This library is
85331f
designed to make HTTP requests easy for developers.
85331f
85331f
%prep
85331f
%autosetup -p1 -n requests-%{version}
85331f
85331f
# Unbundle the certificate bundle from mozilla.
85331f
rm -rf requests/cacert.pem
85331f
85331f
# env shebang in nonexecutable file
85331f
sed -i '/#!\/usr\/.*python/d' requests/certs.py
85331f
85331f
%build
85331f
%py3_build
85331f
85331f
85331f
%install
85331f
%py3_install
85331f
85331f
85331f
%if %{with tests}
85331f
%check
85331f
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
85331f
%endif # tests
85331f
85331f
%files -n python%{python3_pkgversion}-requests
85331f
%license LICENSE
85331f
%doc README.md HISTORY.md
85331f
%{python3_sitelib}/*.egg-info
85331f
%{python3_sitelib}/requests/
85331f
85331f
85331f
%changelog
85331f
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 2.20.0-1
85331f
- Update to v2.20.0 for CVE-2018-18074.
85331f
85331f
* Wed Jul 11 2018 Petr Viktorin <pviktori@redhat.com> - 2.19.1-4
85331f
- Remove the Python 2 subpackage
85331f
  https://bugzilla.redhat.com/show_bug.cgi?id=1590396
85331f
85331f
* Thu Jun 21 2018 Lumír Balhar <lbalhar@redhat.com> - 2.19.1-3
85331f
- Allow build with Python 2
85331f
85331f
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.19.1-2
85331f
- Remove the python-pytest-cov dependency
85331f
85331f
* Tue Jun 19 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.1-1
85331f
- Update to v2.19.1 (rhbz 1591531)
85331f
85331f
* Tue Jun 19 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.0-1
85331f
- Update to v2.19.0 (rhbz 1590508)
85331f
85331f
* Wed Jun 13 2018 Tomas Orsava <torsava@redhat.com> - 2.18.4-6
85331f
- Skip all tests needing httpbin: httpbin has too many dependencies to be
85331f
  shipped in RHEL just for build-time package tests
85331f
85331f
* Tue Jun 12 2018 Tomas Orsava <torsava@redhat.com> - 2.18.4-5
85331f
- BR idna, or the tests fail to start
85331f
85331f
* Mon Apr 16 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-4
85331f
- Stop injecting PyOpenSSL (rhbz 1567862)
85331f
85331f
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.4-3
85331f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
85331f
85331f
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.18.4-2
85331f
- Fix ambiguous Python 2 dependency declarations
85331f
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
85331f
85331f
* Fri Aug 18 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.4-1
85331f
- Update to 2.18.4
85331f
85331f
* Wed Jul 26 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.18.2-1
85331f
- Update to 2.18.2
85331f
85331f
* Tue Jun 20 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.1-2
85331f
- Drop the dependency on certifi in setup.py
85331f
85331f
* Mon Jun 19 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.1-1
85331f
- Update to 2.18.1 (#1449432)
85331f
- Remove tests that require non-local network (#1450608)
85331f
85331f
* Wed May 17 2017 Jeremy Cline <jeremy@jcline.org> - 2.14.2-1
85331f
- Update to 2.14.2 (#1449432)
85331f
- Switch to autosetup to apply patches
85331f
85331f
* Sun May 14 2017 Stephen Gallagher <sgallagh@redhat.com> - 2.13.0-2
85331f
- Don't run tests when building as a module
85331f
85331f
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 2.13.0-1
85331f
- Update to 2.13.0 (#1418138)
85331f
85331f
* Fri Dec 30 2016 Adam Williamson <awilliam@redhat.com> - 2.12.4-3
85331f
- Include and enable tests (now python-pytest-httpbin is packaged)
85331f
85331f
* Wed Dec 21 2016 Kevin Fenzi <kevin@scrye.com> - 2.12.4-2
85331f
- Rebuild for Python 3.6 again.
85331f
85331f
* Tue Dec 20 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.4-1
85331f
- Update to 2.12.4. Fixes #1404680
85331f
85331f
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 2.12.3-2
85331f
- Rebuild for Python 3.6
85331f
85331f
* Thu Dec 01 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.3-1
85331f
- Update to 2.12.3. Fixes #1400601
85331f
85331f
* Wed Nov 30 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.2-1
85331f
- Update to 2.12.2
85331f
85331f
* Wed Nov 23 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-2
85331f
- Backport #3713. Fixes #1397149
85331f
85331f
* Thu Nov 17 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-1
85331f
- Update to 2.12.1. Fixes #1395469
85331f
- Unbundle idna, a new upstream dependency
85331f
85331f
* Sat Aug 27 2016 Kevin Fenzi <kevin@scrye.com> - 2.11.1-1
85331f
- Update to 2.11.1. Fixes #1370814
85331f
85331f
* Wed Aug 10 2016 Kevin Fenzi <kevin@scrye.com> - 2.11.0-1
85331f
- Update to 2.11.0. Fixes #1365332
85331f
85331f
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10.0-4
85331f
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
85331f
85331f
* Fri Jul 15 2016 Ralph Bean <rbean@redhat.com> - 2.10.0-3
85331f
- Update python2 packaging.
85331f
85331f
* Thu Jun 02 2016 Ralph Bean <rbean@redhat.com> - 2.10.0-2
85331f
- Fix python2 subpackage to comply with guidelines.
85331f
85331f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
85331f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
85331f
85331f
* Mon Dec 21 2015 Ralph Bean <rbean@redhat.com> - 2.9.1-1
85331f
- new version
85331f
85331f
* Fri Dec 18 2015 Ralph Bean <rbean@redhat.com> - 2.9.0-1
85331f
- new version
85331f
85331f
* Mon Dec 14 2015 Ralph Bean <rbean@redhat.com> - 2.8.1-1
85331f
- Latest upstream.
85331f
- Bump hard dep on urllib3 to 1.12.
85331f
85331f
* Mon Nov 02 2015 Robert Kuska <rkuska@redhat.com> - 2.7.0-8
85331f
- Rebuilt for Python3.5 rebuild
85331f
85331f
* Sat Oct 10 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-7
85331f
- Tell setuptools about what version of urllib3 we're unbundling
85331f
  for https://github.com/kennethreitz/requests/issues/2816
85331f
85331f
* Thu Sep 17 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-6
85331f
- Replace the provides macro with a plain provides field for now until we can
85331f
  re-organize this package into two different subpackages.
85331f
85331f
* Thu Sep 17 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-5
85331f
- Remove 'provides: python2-requests' from the python3 subpackage, obviously.
85331f
85331f
* Tue Sep 15 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-4
85331f
- Employ %%python_provides macro to provide python2-requests.
85331f
85331f
* Fri Sep 04 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-3
85331f
- Lock down the python-urllib3 version to the specific version we unbundled.
85331f
  https://bugzilla.redhat.com/show_bug.cgi?id=1253823
85331f
85331f
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-2
85331f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
85331f
85331f
* Mon May 04 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-1
85331f
- new version
85331f
85331f
* Wed Apr 29 2015 Ralph Bean <rbean@redhat.com> - 2.6.2-1
85331f
- new version
85331f
85331f
* Thu Apr 23 2015 Ralph Bean <rbean@redhat.com> - 2.6.1-1
85331f
- new version
85331f
85331f
* Wed Apr 22 2015 Ralph Bean <rbean@redhat.com> - 2.6.0-1
85331f
- new version
85331f
- Remove patch for CVE-2015-2296, now included in the upstream release.
85331f
85331f
* Mon Mar 16 2015 Ralph Bean <rbean@redhat.com> - 2.5.3-2
85331f
- Backport fix for CVE-2015-2296.
85331f
85331f
* Thu Feb 26 2015 Ralph Bean <rbean@redhat.com> - 2.5.3-1
85331f
- new version
85331f
85331f
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 2.5.1-1
85331f
- new version
85331f
85331f
* Tue Dec 16 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-3
85331f
- Pin python-urllib3 requirement at 1.10.
85331f
- Fix requirement pinning syntax.
85331f
85331f
* Thu Dec 11 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-2
85331f
- Do the most basic of tests in the check section.
85331f
85331f
* Thu Dec 11 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-1
85331f
- Latest upstream, 2.5.0 for #1171068
85331f
85331f
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.4.3-1
85331f
- Latest upstream, 2.4.3 for #1136283
85331f
85331f
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.3.0-4
85331f
- Re-do unbundling by symlinking system libs into the requests/packages/ dir.
85331f
85331f
* Sun Aug  3 2014 Tom Callaway <spot@fedoraproject.org> - 2.3.0-3
85331f
- fix license handling
85331f
85331f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
85331f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
85331f
85331f
* Thu May 29 2014 Arun S A G <sagarun@gmail.com> - 2.3.0-1
85331f
- Latest upstream
85331f
85331f
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0-2
85331f
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
85331f
85331f
* Wed Sep 25 2013 Ralph Bean <rbean@redhat.com> - 2.0.0-1
85331f
- Latest upstream.
85331f
- Add doc macro to the python3 files section.
85331f
- Require python-urllib3 greater than or at 1.7.1.
85331f
85331f
* Mon Aug 26 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.3-5
85331f
- fix versioned dep on python-urllib3
85331f
85331f
* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-4
85331f
- Explicitly versioned the requirements on python-urllib3.
85331f
85331f
* Thu Aug 22 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-3
85331f
- Release bump for a coupled update with python-urllib3.
85331f
85331f
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
85331f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
85331f
85331f
* Mon Jul 01 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-1
85331f
- Latest upstream.
85331f
- Fixed bogus date in changelog.
85331f
85331f
* Tue Jun 11 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-4
85331f
- Correct a rhel conditional on python-ordereddict
85331f
85331f
* Thu Feb 28 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-3
85331f
- Unbundled python-urllib3.  Using system python-urllib3 now.
85331f
- Conditionally include python-ordereddict for el6.
85331f
85331f
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-2
85331f
- Unbundled python-charade/chardet.  Using system python-chardet now.
85331f
- Removed deprecated comments and actions against oauthlib unbundling.
85331f
  Those are no longer necessary in 1.1.0.
85331f
- Added links to bz tickets over Patch declarations.
85331f
85331f
* Tue Feb 26 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-1
85331f
- Latest upstream.
85331f
- Relicense to ASL 2.0 with upstream.
85331f
- Removed cookie handling patch (fixed in upstream tarball).
85331f
- Updated cert unbundling patch to match upstream.
85331f
- Added check section, but left it commented out for koji.
85331f
85331f
* Fri Feb  8 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.14.1-4
85331f
- Let brp_python_bytecompile run again, take care of the non-python{2,3} modules
85331f
  by removing them from the python{,3}-requests package that they did not belong
85331f
  in.
85331f
- Use the certificates in the ca-certificates package instead of the bundled one
85331f
  + https://bugzilla.redhat.com/show_bug.cgi?id=904614
85331f
- Fix a problem with cookie handling
85331f
  + https://bugzilla.redhat.com/show_bug.cgi?id=906924
85331f
85331f
* Mon Oct 22 2012 Arun S A G <sagarun@gmail.com>  0.14.1-1
85331f
- Updated to latest upstream release
85331f
85331f
* Sun Jun 10 2012 Arun S A G <sagarun@gmail.com> 0.13.1-1
85331f
- Updated to latest upstream release 0.13.1
85331f
- Use system provided ca-certificates
85331f
- No more async requests use grrequests https://github.com/kennethreitz/grequests
85331f
- Remove gevent as it is no longer required by requests
85331f
85331f
* Sun Apr 01 2012 Arun S A G <sagarun@gmail.com> 0.11.1-1
85331f
- Updated to upstream release 0.11.1
85331f
85331f
* Thu Mar 29 2012 Arun S A G <sagarun@gmail.com> 0.10.6-3
85331f
- Support building package for EL6
85331f
85331f
* Tue Mar 27 2012 Rex Dieter <rdieter@fedoraproject.org> 0.10.6-2
85331f
- +python3-requests pkg
85331f
85331f
* Sat Mar 3 2012 Arun SAG <sagarun@gmail.com> - 0.10.6-1
85331f
- Updated to new upstream version
85331f
85331f
* Sat Jan 21 2012 Arun SAG <sagarun@gmail.com> - 0.9.3-1
85331f
- Updated to new upstream version 0.9.3
85331f
- Include python-gevent as a dependency for requests.async
85331f
- Clean up shebangs in requests/setup.py,test_requests.py and test_requests_ext.py
85331f
85331f
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-2
85331f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
85331f
85331f
* Sun Nov 27 2011 Arun SAG <sagarun@gmail.com> - 0.8.2-1
85331f
- New upstream version
85331f
- keep alive support
85331f
- complete removal of cookiejar and urllib2
85331f
85331f
* Thu Nov 10 2011 Arun SAG <sagarun@gmail.com> - 0.7.6-1
85331f
- Updated to new upstream release 0.7.6
85331f
85331f
* Thu Oct 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.6-1
85331f
- Updated to version 0.6.6
85331f
85331f
* Fri Aug 26 2011 Arun SAG <sagarun@gmail.com> - 0.6.1-1
85331f
- Updated to version 0.6.1
85331f
85331f
* Sat Aug 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.0-1
85331f
- Updated to latest version 0.6.0
85331f
85331f
* Mon Aug 15 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-2
85331f
- Remove OPT_FLAGS from build section since it is a noarch package
85331f
- Fix use of mixed tabs and space
85331f
- Remove extra space around the word cumbersome in description
85331f
85331f
* Sun Aug 14 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-1
85331f
- Initial package