Jan Matejek 2016-02-23 15:37:33 +00:00 committed by Git OBS Bridge
parent 60197780b7
commit ee0d6bcb47
5 changed files with 70 additions and 23 deletions

View File

@ -5,7 +5,7 @@
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
--- a/requests/adapters.py
+++ b/requests/adapters.py
@@ -180,9 +180,6 @@ class HTTPAdapter(BaseAdapter):
@@ -182,9 +182,6 @@ class HTTPAdapter(BaseAdapter):
if not cert_loc:
cert_loc = DEFAULT_CA_BUNDLE_PATH
@ -13,8 +13,8 @@
- raise Exception("Could not find a suitable SSL CA certificate bundle.")
-
conn.cert_reqs = 'CERT_REQUIRED'
conn.ca_certs = cert_loc
else:
if not os.path.isdir(cert_loc):
--- a/requests/certs.py
+++ b/requests/certs.py
@@ -18,8 +18,9 @@ try:
@ -23,9 +23,9 @@
"""Return the preferred certificate bundle."""
- # vendored bundle inside Requests
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+ # in openSUSE we rely on openssl's default instead of
+ # hardcoding stuff elsewhere
+ return None
+ # in openSUSE we rely on ca-certificates instead of
+ # having an another bundle
+ return '/etc/ssl/ca-bundle.pem'
if __name__ == '__main__':
print(where())

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Wed Feb 17 14:47:12 UTC 2016 - sor.alexei@meowr.ru
- Update to 2.9.1 (changes since 2.8.1):
* The verify keyword argument now supports being passed a path to
a directory of CA certificates, not just a single-file bundle.
* Warnings are now emitted when sending files opened in text mode.
* Added the 511 Network Authentication Required status code to the
status code registry.
* For file-like objects that are not seeked to the very beginning,
we now send the content length for the number of bytes we will
actually read, rather than the total size of the file, allowing
partial file uploads.
* When uploading file-like objects, if they are empty or have no
obvious content length we set Transfer-Encoding: chunked rather
than Content-Length: 0.
* We correctly receive the response in buffered mode when
uploading chunked bodies.
* We now handle being passed a query string as a bytestring on
Python 3, by decoding it as UTF-8.
* Sessions are now closed in all cases (exceptional and not) when
using the functional API rather than leaking and waiting for
the garbage collector to clean them up.
* Correctly handle digest auth headers with a malformed qop
directive that contains no token, by treating it the same as if
no qop directive was provided at all.
* Minor performance improvements when removing specific cookies
by name.
* Fix errors when calculating cookie expiration dates in certain
locales.
* Update bundled urllib3 to 1.13.1.
- Rebase no-default-cacert.patch.
- Modify no-default-cacert.patch: output /etc/ssl/ca-bundle.pem
instead of neither NULL nor /etc/ssl/certs/ as a path to cacerts
bundle (boo#967128).
- Don't apply no-default-cacert.patch on SLE.
- Require ca-certificates package (but not on SLE).
- Tests are being improperly started and actual ones require
network connection, so fix and comment out.
-------------------------------------------------------------------
Thu Dec 17 13:45:59 UTC 2015 - rjschwei@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-requests
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,30 +16,36 @@
#
%if 0%{?suse_version} < 1120
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
Name: python-requests
Version: 2.8.1
Version: 2.9.1
Release: 0
Summary: Awesome Python HTTP Library That's Actually Usable
License: Apache-2.0
Group: Development/Languages/Python
Url: http://python-requests.org
Url: http://python-requests.org/
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
# PATCH-FIX-OPENSUSE no-default-cacert.patch -- Completely ignore the internal CA bundle.
Patch0: no-default-cacert.patch
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-py
BuildRequires: python-setuptools
Requires: python
# really needed?
# Really needed?
#Requires: python-ndg-httpsclient
Requires: python-pyOpenSSL
Requires: python-pyasn1
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%else
%if 0%{?suse_version} >= 1120 && !(0%{?suse_version} == 1315 && !0%{?is_opensuse})
BuildRequires: ca-certificates
Requires: ca-certificates
%endif
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%else
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
%description
@ -67,10 +73,10 @@ Features:
%prep
%setup -q -n requests-%{version}
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./requests/certs.py
%if 0%{?suse_version} >= 1120 && !(0%{?suse_version} == 1315 && !0%{?is_opensuse})
%patch0 -p1
rm ./requests/cacert.pem
rm -f requests/cacert.pem
%endif
%build
python setup.py build
@ -79,8 +85,9 @@ python setup.py build
python setup.py install \
--root=%{buildroot} --prefix=%{_prefix}
%check
python setup.py test
# Tests require network access.
# %check
# python test_requests.py
%files
%defattr(-,root,root)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:84fe8d5bf4dcdcc49002446c47a146d17ac10facf00d9086659064ac43b6c25b
size 480803

3
requests-2.9.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f
size 484252