forked from pool/python-requests
Accepting request 121921 from devel:languages:python
- Use a slightly different approach for bnc#761500, try to use /etc/ssl/certs but use /etc/ssl/ca-bundle.pem as a fallback. The previous fix didn't work for me as (my) Python ssl module doesn't support cert directories... - No need to check SUSE versions for python-certifi, it only is/was part of openSUSE:Factory for a brief period of time - Load directory-based cert store in openSUSE >= 12.2 - Update to 0.12.1 * New Response.json property * Ability to add string file uploads * Fix out-of-range issue with iter_lines * Fix iter_content default size * Fix POST redirects containing files - 0.12.0 (2012-05-02) * EXPERIMENTAL OAUTH SUPPORT! * Proper CookieJar-backed cookies interface with awesome dict-like interface. * Speed fix for non-iterated content chunks. * Move pre_request to a more usable place. * New pre_send hook. * Lazily encode data, params, files * Load system Certificate Bundle if certify isn't available. * Cleanups, fixes. - Add python-chardet and python-oauthlib requirements - Run test suite (added python-distribute build requirement to enable) OBS-URL: https://build.opensuse.org/request/show/121921 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=3
This commit is contained in:
@@ -1,3 +1,38 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 23 12:09:35 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Use a slightly different approach for bnc#761500, try to use /etc/ssl/certs
|
||||||
|
but use /etc/ssl/ca-bundle.pem as a fallback. The previous fix didn't work
|
||||||
|
for me as (my) Python ssl module doesn't support cert directories...
|
||||||
|
- No need to check SUSE versions for python-certifi, it only is/was
|
||||||
|
part of openSUSE:Factory for a brief period of time
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun May 20 17:44:57 UTC 2012 - jfunk@funktronics.ca
|
||||||
|
|
||||||
|
- Load directory-based cert store in openSUSE >= 12.2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 18 00:41:52 UTC 2012 - jfunk@funktronics.ca
|
||||||
|
|
||||||
|
- Update to 0.12.1
|
||||||
|
* New Response.json property
|
||||||
|
* Ability to add string file uploads
|
||||||
|
* Fix out-of-range issue with iter_lines
|
||||||
|
* Fix iter_content default size
|
||||||
|
* Fix POST redirects containing files
|
||||||
|
- 0.12.0 (2012-05-02)
|
||||||
|
* EXPERIMENTAL OAUTH SUPPORT!
|
||||||
|
* Proper CookieJar-backed cookies interface with awesome dict-like interface.
|
||||||
|
* Speed fix for non-iterated content chunks.
|
||||||
|
* Move pre_request to a more usable place.
|
||||||
|
* New pre_send hook.
|
||||||
|
* Lazily encode data, params, files
|
||||||
|
* Load system Certificate Bundle if certify isn't available.
|
||||||
|
* Cleanups, fixes.
|
||||||
|
- Add python-chardet and python-oauthlib requirements
|
||||||
|
- Run test suite (added python-distribute build requirement to enable)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 27 22:57:43 UTC 2012 - jfunk@funktronics.ca
|
Fri Apr 27 22:57:43 UTC 2012 - jfunk@funktronics.ca
|
||||||
|
|
||||||
|
@@ -16,20 +16,25 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: python-requests
|
Name: python-requests
|
||||||
Version: 0.11.2
|
Version: 0.12.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://python-requests.org
|
Url: http://python-requests.org
|
||||||
Summary: Awesome Python HTTP Library That's Actually Usable
|
Summary: Awesome Python HTTP Library That's Actually Usable
|
||||||
License: ISC
|
License: ISC
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSREAM requests-suse_cert_paths.patch [bnc#761501] -- Load directory-based cert store in /etc/ssl/certs. Depends on Python patched to allow it, fall back to /etc/ssl/ca-bundle.pem otherwise
|
||||||
|
Patch0: requests-suse_cert_paths.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
|
BuildRequires: python-chardet
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: python-distribute
|
||||||
|
BuildRequires: python-oauthlib
|
||||||
Requires: python
|
Requires: python
|
||||||
Requires: python-certifi
|
Requires: python-chardet
|
||||||
|
Requires: python-oauthlib
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%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()")}
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
%else
|
%else
|
||||||
@@ -62,10 +67,14 @@ Features:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n requests-%{version}
|
%setup -q -n requests-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
|
||||||
|
%check
|
||||||
|
python setup.py test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:547bf78a774a6018271d6e5c40613ec554642ba4d6cdf45813e7894145293c57
|
|
||||||
size 71080
|
|
3
requests-0.12.1.tar.gz
Normal file
3
requests-0.12.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9ce56b87180c06728d96ca734055675abf8f5cc3136e0d7712a6260430685589
|
||||||
|
size 78245
|
54
requests-suse_cert_paths.patch
Normal file
54
requests-suse_cert_paths.patch
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
diff -ru a/requests/utils.py b/requests/utils.py
|
||||||
|
--- a/requests/utils.py 2012-05-08 06:56:28.000000000 +0200
|
||||||
|
+++ b/requests/utils.py 2012-05-23 14:06:43.728477504 +0200
|
||||||
|
@@ -14,6 +14,9 @@
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
import re
|
||||||
|
+import socket
|
||||||
|
+import ssl
|
||||||
|
+import _ssl
|
||||||
|
import zlib
|
||||||
|
from netrc import netrc, NetrcParseError
|
||||||
|
|
||||||
|
@@ -42,13 +45,26 @@
|
||||||
|
'/etc/ssl/certs/ca-certificates.crt',
|
||||||
|
# FreeBSD (provided by the ca_root_nss package):
|
||||||
|
'/usr/local/share/certs/ca-root-nss.crt',
|
||||||
|
+ # openSUSE (provided by the ca-certificates package), the 'certs' directory is the
|
||||||
|
+ # preferred way but may not be supported by the SSL module, thus it has 'ca-bundle.pem'
|
||||||
|
+ # as a fallback (which is generated from pem files in the 'certs' directory):
|
||||||
|
+ '/etc/ssl/certs',
|
||||||
|
+ '/etc/ssl/ca-bundle.pem',
|
||||||
|
]
|
||||||
|
|
||||||
|
def get_os_ca_bundle_path():
|
||||||
|
"""Try to pick an available CA certificate bundle provided by the OS."""
|
||||||
|
for path in POSSIBLE_CA_BUNDLE_PATHS:
|
||||||
|
if os.path.exists(path):
|
||||||
|
- return path
|
||||||
|
+ if os.path.isdir(path):
|
||||||
|
+ try:
|
||||||
|
+ # Current candidate is a directory, check if SSL module supports that
|
||||||
|
+ _ssl.sslwrap(socket.socket()._sock, False, None, None, ssl.CERT_REQUIRED, ssl.PROTOCOL_SSLv23, path, None)
|
||||||
|
+ return path
|
||||||
|
+ except:
|
||||||
|
+ pass # No support, let's check the next candidate
|
||||||
|
+ else:
|
||||||
|
+ return path
|
||||||
|
return None
|
||||||
|
|
||||||
|
# if certifi is installed, use its CA bundle;
|
||||||
|
Only in b/requests: .utils.py.swp
|
||||||
|
diff -ru a/setup.py b/setup.py
|
||||||
|
--- a/setup.py 2012-05-08 06:56:28.000000000 +0200
|
||||||
|
+++ b/setup.py 2012-05-23 14:07:30.303478614 +0200
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
# On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can
|
||||||
|
# use the system CA bundle instead; see `requests.utils` for details.
|
||||||
|
# If your platform is supported, set `requires` to [] instead:
|
||||||
|
-requires = ['certifi>=0.0.7']
|
||||||
|
+requires = []
|
||||||
|
|
||||||
|
# chardet is used to optimally guess the encodings of pages that don't declare one.
|
||||||
|
# At this time, chardet is not a required dependency. However, it's sufficiently
|
Reference in New Issue
Block a user