68d9543aaf
- Update tarball to the one upstream is publishing. - Update to version 2.3.0 + New ``Response`` property ``is_redirect``, which is true when the library could have processed this response as a redirection (whether or not it actually did). + The ``timeout`` parameter now affects requests with both ``stream=True`` and ``stream=False`` equally. + The change in v2.0.0 to mandate explicit proxy schemes has been reverted. Proxy schemes now default to ``http://``. + The ``CaseInsensitiveDict`` used for HTTP headers now behaves like a normal dictionary when references as string or viewd in the interpreter. + No longer expose Authorization or Proxy-Authorization headers on redirect. Fix CVE-2014-1829 and CVE-2014-1830 respectively. + Authorization is re-evaluated each redirect. + On redirect, pass url as native strings. + Fall-back to autodetected encoding for JSON when Unicode detection fails. + Headers set to ``None`` on the ``Session`` are now correctly not sent. + Correctly honor ``decode_unicode`` even if it wasn't used earlier in the same response. + Stop advertising ``compress`` as a supported Content-Encoding. + The ``Response.history`` parameter is now always a list. + Many, many ``urllib3`` bugfixes.- Fixes incorrect parsing of proxy credentials that contain a literal or encoded '#' character. + Assorted urllib3 fixes. + New exception: ``ContentDecodingError``. Raised instead of ``urllib3`` ``DecodeError`` exceptions. + Avoid many many exceptions from the buggy implementation of ``proxy_bypass`` on OS X in Python 2.6. + Avoid crashing when attempting to get authentication credentials OBS-URL: https://build.opensuse.org/request/show/237323 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=18
93 lines
3.1 KiB
RPMSpec
93 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-requests
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-requests
|
|
Version: 2.3.0
|
|
Release: 0
|
|
Url: http://python-requests.org
|
|
Summary: Awesome Python HTTP Library That's Actually Usable
|
|
License: Apache-2.0 and LGPL-2.1+ and MIT
|
|
Group: Development/Languages/Python
|
|
#TODO/FIXME: Maybe split out charade and urllib3 into sub-packages to simplify:
|
|
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
|
# PATCH-FIX-OPENSUSE no-default-cacert.patch -- completely ignore the internal CA bundle
|
|
Patch0: no-default-cacert.patch
|
|
# PATCH-FIX-OPENSUSE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
|
|
Patch1: no-default-cacert-sles.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: python
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-setuptools
|
|
Requires: python
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
%else
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description
|
|
Requests is an ISC Licensed HTTP library, written in Python, for human
|
|
beings.
|
|
|
|
Most existing Python modules for sending HTTP requests are extremely
|
|
verbose and cumbersome. Python's builtin urllib2 module provides most of
|
|
the HTTP capabilities you should need, but the api is thoroughly broken.
|
|
It requires an enormous amount of work (even method overrides) to
|
|
perform the simplest of tasks.
|
|
|
|
Features:
|
|
|
|
- Extremely simple GET, HEAD, POST, PUT, DELETE Requests
|
|
+ Simple HTTP Header Request Attachment
|
|
+ Simple Data/Params Request Attachment
|
|
+ Simple Multipart File Uploads
|
|
+ CookieJar Support
|
|
+ Redirection History
|
|
+ Redirection Recursion Urllib Fix
|
|
+ Auto Decompression of GZipped Content
|
|
+ Unicode URL Support
|
|
- Simple Authentication
|
|
+ Simple URL + HTTP Auth Registry
|
|
|
|
%prep
|
|
%setup -q -n requests-%{version}
|
|
# For rpmlint warning: remove shebang from python library:
|
|
sed -i '/^#!/d' ./requests/certs.py
|
|
%if %suse_version > 1110
|
|
%patch0 -p1
|
|
%else
|
|
%patch1 -p1
|
|
%endif
|
|
rm ./requests/cacert.pem
|
|
|
|
%build
|
|
python setup.py build
|
|
|
|
%check
|
|
python setup.py test
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README.rst HISTORY.rst LICENSE NOTICE
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|