Compare commits
9 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f439ffedeb | ||
|
|
a7d0b58154 | ||
|
|
f684f5a71a | ||
|
|
ca30774832 | ||
|
|
f92479a2cb | ||
|
|
0cc278987b | ||
|
|
0679bcec72 | ||
|
|
0fcec8febc | ||
|
|
6f267cd54c |
4 changed files with 190 additions and 0 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -0,0 +1,6 @@
|
|||
/requests-0.5.1.tar.gz
|
||||
/requests-0.6.0.tar.gz
|
||||
/requests-0.6.1.tar.gz
|
||||
/requests-0.6.6.tar.gz
|
||||
/requests-0.10.8.tar.gz
|
||||
/requests-0.13.1.tar.gz
|
||||
32
python-requests-cookie-handling.patch
Normal file
32
python-requests-cookie-handling.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
From 2cecc4bc828fc1754cc26f279ec3ff5cd65cb8f7 Mon Sep 17 00:00:00 2001
|
||||
From: Ralph Bean <rbean@redhat.com>
|
||||
Date: Thu, 31 Jan 2013 21:38:58 -0500
|
||||
Subject: [PATCH] cookie handling
|
||||
|
||||
---
|
||||
requests/models.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: requests-0.13.1/requests/models.py
|
||||
===================================================================
|
||||
--- requests-0.13.1.orig/requests/models.py
|
||||
+++ requests-0.13.1/requests/models.py
|
||||
@@ -16,7 +16,7 @@ from .structures import CaseInsensitiveD
|
||||
from .status_codes import codes
|
||||
|
||||
from .auth import HTTPBasicAuth, HTTPProxyAuth
|
||||
-from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header
|
||||
+from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header, RequestsCookieJar
|
||||
from .packages.urllib3.exceptions import MaxRetryError, LocationParseError
|
||||
from .packages.urllib3.exceptions import SSLError as _SSLError
|
||||
from .packages.urllib3.exceptions import HTTPError as _HTTPError
|
||||
@@ -201,7 +201,8 @@ class Request(object):
|
||||
extract_cookies_to_jar(self.cookies, self, resp)
|
||||
|
||||
# Save cookies in Response.
|
||||
- response.cookies = self.cookies
|
||||
+ response.cookies = RequestsCookieJar()
|
||||
+ extract_cookies_to_jar(response.cookies, self, resp)
|
||||
|
||||
# Save cookies in Session.
|
||||
for cookie in self.cookies:
|
||||
151
python-requests.spec
Normal file
151
python-requests.spec
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
%if 0%{?fedora}
|
||||
%global _with_python3 1
|
||||
%else
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||
%endif
|
||||
|
||||
Name: python-requests
|
||||
Version: 0.13.1
|
||||
Release: 2%{?dist}
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
|
||||
License: ISC and MIT
|
||||
URL: http://pypi.python.org/pypi/requests
|
||||
Source0: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
||||
# Separate response cookies from request cookies discussed here:
|
||||
# https://github.com/fedora-infra/python-fedora/pull/6
|
||||
Patch0: python-requests-cookie-handling.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
|
||||
Requires: ca-certificates
|
||||
|
||||
%description
|
||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||
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.
|
||||
|
||||
%if 0%{?_with_python3}
|
||||
%package -n python3-requests
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
BuildRequires: python3-devel
|
||||
Requires: python3-chardet
|
||||
%description -n python3-requests
|
||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||
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.
|
||||
%else
|
||||
Requires: python-chardet
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n requests-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
### TODO: Need to unbundle libraries in the packages directory.
|
||||
### https://bugzilla.redhat.com/show_bug.cgi?id=904623
|
||||
### Priority urllib3 since it's still bundled in requests-1.0.x
|
||||
### And it's a security issue:
|
||||
### https://bugzilla.redhat.com/show_bug.cgi?id=855322
|
||||
### https://bugzilla.redhat.com/show_bug.cgi?id=855323
|
||||
### Review request for urllib3:
|
||||
### https://bugzilla.redhat.com/show_bug.cgi?id=907688
|
||||
|
||||
%if 0%{?_with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%build
|
||||
%if 0%{?_with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python} setup.py build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%if 0%{?_with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc NOTICE LICENSE README.rst HISTORY.rst
|
||||
%{python_sitelib}/*.egg-info
|
||||
%dir %{python_sitelib}/requests
|
||||
%{python_sitelib}/requests/*
|
||||
|
||||
%if 0%{?_with_python3}
|
||||
%files -n python3-requests
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{python3_sitelib}/requests/
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 8 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.13.1-2
|
||||
- Fix a problem with cookie handling
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=906924
|
||||
|
||||
* Sun Jun 10 2012 Arun S A G <sagarun@gmail.com> 0.13.1-1
|
||||
- Updated to latest upstream release 0.13.1
|
||||
- Use system provided ca-certificates
|
||||
- No more async requests use grrequests https://github.com/kennethreitz/grequests
|
||||
- Remove gevent as it is no longer required by requests
|
||||
|
||||
* Sun Apr 01 2012 Arun S A G <sagarun@gmail.com> 0.11.1-1
|
||||
- Updated to upstream release 0.11.1
|
||||
|
||||
* Thu Mar 29 2012 Arun S A G <sagarun@gmail.com> 0.10.6-3
|
||||
- Support building package for EL6
|
||||
|
||||
* Tue Mar 27 2012 Rex Dieter <rdieter@fedoraproject.org> 0.10.6-2
|
||||
- +python3-requests pkg
|
||||
|
||||
* Sat Mar 3 2012 Arun SAG <sagarun@gmail.com> - 0.10.6-1
|
||||
- Updated to new upstream version
|
||||
|
||||
* Sat Jan 21 2012 Arun SAG <sagarun@gmail.com> - 0.9.3-1
|
||||
- Updated to new upstream version 0.9.3
|
||||
- Include python-gevent as a dependency for requests.async
|
||||
- Clean up shebangs in requests/setup.py,test_requests.py and test_requests_ext.py
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Sun Nov 27 2011 Arun SAG <sagarun@gmail.com> - 0.8.2-1
|
||||
- New upstream version
|
||||
- keep alive support
|
||||
- complete removal of cookiejar and urllib2
|
||||
|
||||
* Thu Nov 10 2011 Arun SAG <sagarun@gmail.com> - 0.7.6-1
|
||||
- Updated to new upstream release 0.7.6
|
||||
|
||||
* Thu Oct 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.6-1
|
||||
- Updated to version 0.6.6
|
||||
|
||||
* Fri Aug 26 2011 Arun SAG <sagarun@gmail.com> - 0.6.1-1
|
||||
- Updated to version 0.6.1
|
||||
|
||||
* Sat Aug 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.0-1
|
||||
- Updated to latest version 0.6.0
|
||||
|
||||
* Mon Aug 15 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-2
|
||||
- Remove OPT_FLAGS from build section since it is a noarch package
|
||||
- Fix use of mixed tabs and space
|
||||
- Remove extra space around the word cumbersome in description
|
||||
|
||||
* Sun Aug 14 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-1
|
||||
- Initial package
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
31a08091feeefe60817e45122d933219 requests-0.13.1.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue