Accepting request 339109 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/339109 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=28
This commit is contained in:
commit
80bc92e681
@ -1,34 +0,0 @@
|
|||||||
Index: requests-1.1.0/MANIFEST.in
|
|
||||||
===================================================================
|
|
||||||
--- requests-1.1.0.orig/MANIFEST.in
|
|
||||||
+++ requests-1.1.0/MANIFEST.in
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
|
|
||||||
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
|
|
||||||
Index: requests-1.1.0/requests/adapters.py
|
|
||||||
===================================================================
|
|
||||||
--- requests-1.1.0.orig/requests/adapters.py
|
|
||||||
+++ requests-1.1.0/requests/adapters.py
|
|
||||||
@@ -132,9 +132,6 @@ class HTTPAdapter(BaseAdapter):
|
|
||||||
if not cert_loc:
|
|
||||||
cert_loc = DEFAULT_CA_BUNDLE_PATH
|
|
||||||
|
|
||||||
- if not cert_loc:
|
|
||||||
- raise Exception("Could not find a suitable SSL CA certificate bundle.")
|
|
||||||
-
|
|
||||||
conn.cert_reqs = 'CERT_REQUIRED'
|
|
||||||
conn.ca_certs = cert_loc
|
|
||||||
else:
|
|
||||||
Index: requests-1.1.0/requests/certs.py
|
|
||||||
===================================================================
|
|
||||||
--- requests-1.1.0.orig/requests/certs.py
|
|
||||||
+++ requests-1.1.0/requests/certs.py
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
def where():
|
|
||||||
"""Return the preferred certificate bundle."""
|
|
||||||
# vendored bundle inside Requests
|
|
||||||
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
|
|
||||||
+ return None
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
print(where())
|
|
@ -1,8 +1,11 @@
|
|||||||
Index: requests-2.6.0/requests/adapters.py
|
--- a/MANIFEST.in
|
||||||
===================================================================
|
+++ b/MANIFEST.in
|
||||||
--- requests-2.6.0.orig/requests/adapters.py
|
@@ -1 +1 @@
|
||||||
+++ requests-2.6.0/requests/adapters.py
|
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
|
||||||
@@ -177,9 +177,6 @@ class HTTPAdapter(BaseAdapter):
|
+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):
|
||||||
if not cert_loc:
|
if not cert_loc:
|
||||||
cert_loc = DEFAULT_CA_BUNDLE_PATH
|
cert_loc = DEFAULT_CA_BUNDLE_PATH
|
||||||
|
|
||||||
@ -12,10 +15,8 @@ Index: requests-2.6.0/requests/adapters.py
|
|||||||
conn.cert_reqs = 'CERT_REQUIRED'
|
conn.cert_reqs = 'CERT_REQUIRED'
|
||||||
conn.ca_certs = cert_loc
|
conn.ca_certs = cert_loc
|
||||||
else:
|
else:
|
||||||
Index: requests-2.6.0/requests/certs.py
|
--- a/requests/certs.py
|
||||||
===================================================================
|
+++ b/requests/certs.py
|
||||||
--- requests-2.6.0.orig/requests/certs.py
|
|
||||||
+++ requests-2.6.0/requests/certs.py
|
|
||||||
@@ -18,8 +18,9 @@ try:
|
@@ -18,8 +18,9 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
def where():
|
def where():
|
||||||
@ -28,24 +29,14 @@ Index: requests-2.6.0/requests/certs.py
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(where())
|
print(where())
|
||||||
Index: requests-2.6.0/MANIFEST.in
|
--- a/requests/packages/urllib3/util/ssl_.py
|
||||||
===================================================================
|
+++ b/requests/packages/urllib3/util/ssl_.py
|
||||||
--- requests-2.6.0.orig/MANIFEST.in
|
@@ -278,6 +278,8 @@ def ssl_wrap_socket(sock, keyfile=None,
|
||||||
+++ requests-2.6.0/MANIFEST.in
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
|
|
||||||
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
|
|
||||||
Index: requests-2.6.0/requests/packages/urllib3/util/ssl_.py
|
|
||||||
===================================================================
|
|
||||||
--- requests-2.6.0.orig/requests/packages/urllib3/util/ssl_.py
|
|
||||||
+++ requests-2.6.0/requests/packages/urllib3/util/ssl_.py
|
|
||||||
@@ -259,6 +259,9 @@ def ssl_wrap_socket(sock, keyfile=None,
|
|
||||||
if e.errno == errno.ENOENT:
|
if e.errno == errno.ENOENT:
|
||||||
raise SSLError(e)
|
raise SSLError(e)
|
||||||
raise
|
raise
|
||||||
+ elif cert_reqs != CERT_NONE:
|
+ elif cert_reqs != CERT_NONE:
|
||||||
+ context.set_default_verify_paths()
|
+ context.set_default_verify_paths()
|
||||||
+
|
|
||||||
if certfile:
|
if certfile:
|
||||||
context.load_cert_chain(certfile, keyfile)
|
context.load_cert_chain(certfile, keyfile)
|
||||||
if HAS_SNI: # Platform-specific: OpenSSL with enabled SNI
|
|
||||||
|
@ -1,3 +1,55 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 14 19:24:43 UTC 2015 - sor.alexei@meowr.ru
|
||||||
|
|
||||||
|
- Add python3-chardet to build requirements for tests.
|
||||||
|
- Remove no-default-cacert-sles.patch as no-default-cacert.patch
|
||||||
|
does basically the same.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 9 19:11:09 UTC 2015 - sor.alexei@meowr.ru
|
||||||
|
|
||||||
|
- Update to 2.8.0:
|
||||||
|
* Requests now supports per-host proxies. This allows the proxies
|
||||||
|
dictionary to have entries of the form {'<scheme>://<hostname>':
|
||||||
|
'<proxy>'}. Host-specific proxies will be used in preference to
|
||||||
|
the previously-supported scheme-specific ones, but the previous
|
||||||
|
syntax will continue to work.
|
||||||
|
* Response.raise_for_status now prints the URL that failed as
|
||||||
|
part of the exception message.
|
||||||
|
* requests.utils.get_netrc_auth now takes an raise_errors kwarg,
|
||||||
|
defaulting to False. When True, errors parsing .netrc files
|
||||||
|
cause exceptions to be thrown.
|
||||||
|
* Change to bundled projects import logic to make it easier to
|
||||||
|
unbundle requests downstream.
|
||||||
|
* Change the default User-Agent string to avoid leaking data on
|
||||||
|
Linux: now contains only the requests version.
|
||||||
|
* The json parameter to post() and friends will now only be used
|
||||||
|
if neither data nor files are present, consistent with the
|
||||||
|
documentation.
|
||||||
|
* We now ignore empty fields in the NO_PROXY enviroment variable.
|
||||||
|
* Fix problem where httplib.BadStatusLine would get raised if
|
||||||
|
combining stream=True with contextlib.closing.
|
||||||
|
* Prevent bugs where we would attempt to return the same connection
|
||||||
|
back to the connection pool twice when sending a Chunked body.
|
||||||
|
* Miscellaneous minor internal changes.
|
||||||
|
* Digest Auth support is now thread safe.
|
||||||
|
- Apply no-default-cacert-sles.patch on SLE 12.
|
||||||
|
- Apply Arun Persaud's changes to requests-do-not-use-bundle.patch
|
||||||
|
(update to 2.8.0).
|
||||||
|
- Enable tests.
|
||||||
|
- Small spec cleanup.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 6 17:48:20 UTC 2015 - aloisio@gmx.com
|
||||||
|
|
||||||
|
- Fixed requests-do-not-use-bundle.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 5 17:18:43 UTC 2015 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Unbundle python-chardet and python-urllib3 (boo#947357)
|
||||||
|
requests-do-not-use-bundle.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 14 07:48:30 UTC 2015 - tbechtold@suse.com
|
Mon Sep 14 07:48:30 UTC 2015 - tbechtold@suse.com
|
||||||
|
|
||||||
|
@ -17,81 +17,78 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-requests
|
Name: python-requests
|
||||||
Version: 2.7.0
|
Version: 2.8.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://python-requests.org
|
|
||||||
Summary: Awesome Python HTTP Library That's Actually Usable
|
Summary: Awesome Python HTTP Library That's Actually Usable
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
#TODO/FIXME: Maybe split out charade and urllib3 into sub-packages to simplify:
|
Url: http://python-requests.org
|
||||||
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-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
|
Patch0: no-default-cacert.patch
|
||||||
# PATCH-FIX-OPENSUSE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
|
# PATCH-FIX-OPENSUSE requests-do-not-use-bundle.patch --use system libraries instead of bundled ones
|
||||||
Patch1: no-default-cacert-sles.patch
|
Patch1: requests-do-not-use-bundle.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-py
|
BuildRequires: python-py
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
Requires: python
|
Requires: python
|
||||||
|
Requires: python-chardet
|
||||||
Requires: python-py
|
Requires: python-py
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
Requires: python-urllib3
|
||||||
|
%if 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()")}
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%else
|
%else
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Requests is an ISC Licensed HTTP library, written in Python, for human
|
Requests is an ISC Licensed HTTP library, written in Python, for
|
||||||
beings.
|
human beings.
|
||||||
|
|
||||||
Most existing Python modules for sending HTTP requests are extremely
|
Most existing Python modules for sending HTTP requests are
|
||||||
verbose and cumbersome. Python's builtin urllib2 module provides most of
|
extremely verbose and cumbersome. Python's builtin urllib2 module
|
||||||
the HTTP capabilities you should need, but the api is thoroughly broken.
|
provides most of the HTTP capabilities you should need, but the api
|
||||||
It requires an enormous amount of work (even method overrides) to
|
is thoroughly broken. It requires an enormous amount of work (even
|
||||||
perform the simplest of tasks.
|
method overrides) to perform the simplest of tasks.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
- Extremely simple GET, HEAD, POST, PUT, DELETE Requests:
|
||||||
- Extremely simple GET, HEAD, POST, PUT, DELETE Requests
|
+ Simple HTTP Header Request Attachment.
|
||||||
+ Simple HTTP Header Request Attachment
|
+ Simple Data/Params Request Attachment.
|
||||||
+ Simple Data/Params Request Attachment
|
+ Simple Multipart File Uploads.
|
||||||
+ Simple Multipart File Uploads
|
+ CookieJar Support.
|
||||||
+ CookieJar Support
|
+ Redirection History.
|
||||||
+ Redirection History
|
+ Redirection Recursion Urllib Fix.
|
||||||
+ Redirection Recursion Urllib Fix
|
+ Auto Decompression of GZipped Content.
|
||||||
+ Auto Decompression of GZipped Content
|
+ Unicode URL Support.
|
||||||
+ Unicode URL Support
|
- Simple Authentication:
|
||||||
- Simple Authentication
|
+ Simple URL + HTTP Auth Registry.
|
||||||
+ Simple URL + HTTP Auth Registry
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n requests-%{version}
|
%setup -q -n requests-%{version}
|
||||||
# For rpmlint warning: remove shebang from python library:
|
# For rpmlint warning: remove shebang from python library:
|
||||||
sed -i '/^#!/d' ./requests/certs.py
|
sed -i '/^#!/d' ./requests/certs.py
|
||||||
%if 0%{?suse_version} > 1110 || 0%{?rhel} > 6
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%else
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%endif
|
|
||||||
rm ./requests/cacert.pem
|
rm ./requests/cacert.pem
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
|
||||||
# NOTE(toabctl): The test suite currently requires external network access, so
|
|
||||||
# we can't enable it.
|
|
||||||
# See # https://github.com/kennethreitz/requests/issues/2184
|
|
||||||
##check
|
|
||||||
##python setup.py test
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install \
|
||||||
|
--root=%{buildroot} --prefix=%{_prefix}
|
||||||
|
rm -rf %{buildroot}%{python_sitelib}/requests/packages/
|
||||||
|
|
||||||
|
%check
|
||||||
|
python setup.py test
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.rst HISTORY.rst LICENSE NOTICE
|
%doc HISTORY.rst LICENSE NOTICE README.rst
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/requests/
|
||||||
|
%{python_sitelib}/requests-*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:398a3db6d61899d25fd4a06c6ca12051b0ce171d705decd7ed5511517b4bb93d
|
|
||||||
size 451723
|
|
3
requests-2.8.0.tar.gz
Normal file
3
requests-2.8.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b2f003589b60924909c0acde472590c5ea83906986a7a25b6f7929eb20923b7b
|
||||||
|
size 457879
|
111
requests-do-not-use-bundle.patch
Normal file
111
requests-do-not-use-bundle.patch
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
--- a/requests/adapters.py
|
||||||
|
+++ b/requests/adapters.py
|
||||||
|
@@ -11,24 +11,24 @@ and maintain connections.
|
||||||
|
import socket
|
||||||
|
|
||||||
|
from .models import Response
|
||||||
|
-from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
|
||||||
|
-from .packages.urllib3.response import HTTPResponse
|
||||||
|
-from .packages.urllib3.util import Timeout as TimeoutSauce
|
||||||
|
-from .packages.urllib3.util.retry import Retry
|
||||||
|
+from urllib3.poolmanager import PoolManager, proxy_from_url
|
||||||
|
+from urllib3.response import HTTPResponse
|
||||||
|
+from urllib3.util import Timeout as TimeoutSauce
|
||||||
|
+from urllib3.util.retry import Retry
|
||||||
|
from .compat import urlparse, basestring
|
||||||
|
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
|
||||||
|
prepend_scheme_if_needed, get_auth_from_url, urldefragauth,
|
||||||
|
select_proxy)
|
||||||
|
from .structures import CaseInsensitiveDict
|
||||||
|
-from .packages.urllib3.exceptions import ClosedPoolError
|
||||||
|
-from .packages.urllib3.exceptions import ConnectTimeoutError
|
||||||
|
-from .packages.urllib3.exceptions import HTTPError as _HTTPError
|
||||||
|
-from .packages.urllib3.exceptions import MaxRetryError
|
||||||
|
-from .packages.urllib3.exceptions import ProxyError as _ProxyError
|
||||||
|
-from .packages.urllib3.exceptions import ProtocolError
|
||||||
|
-from .packages.urllib3.exceptions import ReadTimeoutError
|
||||||
|
-from .packages.urllib3.exceptions import SSLError as _SSLError
|
||||||
|
-from .packages.urllib3.exceptions import ResponseError
|
||||||
|
+from urllib3.exceptions import ClosedPoolError
|
||||||
|
+from urllib3.exceptions import ConnectTimeoutError
|
||||||
|
+from urllib3.exceptions import HTTPError as _HTTPError
|
||||||
|
+from urllib3.exceptions import MaxRetryError
|
||||||
|
+from urllib3.exceptions import ProxyError as _ProxyError
|
||||||
|
+from urllib3.exceptions import ProtocolError
|
||||||
|
+from urllib3.exceptions import ReadTimeoutError
|
||||||
|
+from urllib3.exceptions import SSLError as _SSLError
|
||||||
|
+from urllib3.exceptions import ResponseError
|
||||||
|
from .cookies import extract_cookies_to_jar
|
||||||
|
from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
|
||||||
|
ProxyError, RetryError)
|
||||||
|
--- a/requests/compat.py
|
||||||
|
+++ b/requests/compat.py
|
||||||
|
@@ -4,8 +4,7 @@
|
||||||
|
pythoncompat
|
||||||
|
"""
|
||||||
|
|
||||||
|
-from .packages import chardet
|
||||||
|
-
|
||||||
|
+import chardet
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# -------
|
||||||
|
@@ -39,7 +38,7 @@ if is_py2:
|
||||||
|
import cookielib
|
||||||
|
from Cookie import Morsel
|
||||||
|
from StringIO import StringIO
|
||||||
|
- from .packages.urllib3.packages.ordered_dict import OrderedDict
|
||||||
|
+ from urllib3.packages.ordered_dict import OrderedDict
|
||||||
|
|
||||||
|
builtin_str = str
|
||||||
|
bytes = str
|
||||||
|
--- a/requests/exceptions.py
|
||||||
|
+++ b/requests/exceptions.py
|
||||||
|
@@ -7,7 +7,7 @@ requests.exceptions
|
||||||
|
This module contains the set of Requests' exceptions.
|
||||||
|
|
||||||
|
"""
|
||||||
|
-from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
|
||||||
|
+from urllib3.exceptions import HTTPError as BaseHTTPError
|
||||||
|
|
||||||
|
|
||||||
|
class RequestException(IOError):
|
||||||
|
--- a/requests/__init__.py
|
||||||
|
+++ b/requests/__init__.py
|
||||||
|
@@ -50,7 +50,7 @@ __copyright__ = 'Copyright 2015 Kenneth
|
||||||
|
|
||||||
|
# Attempt to enable urllib3's SNI support, if possible
|
||||||
|
try:
|
||||||
|
- from .packages.urllib3.contrib import pyopenssl
|
||||||
|
+ from urllib3.contrib import pyopenssl
|
||||||
|
pyopenssl.inject_into_urllib3()
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
--- a/requests/models.py
|
||||||
|
+++ b/requests/models.py
|
||||||
|
@@ -16,10 +16,10 @@ from .structures import CaseInsensitiveD
|
||||||
|
|
||||||
|
from .auth import HTTPBasicAuth
|
||||||
|
from .cookies import cookiejar_from_dict, get_cookie_header, _copy_cookie_jar
|
||||||
|
-from .packages.urllib3.fields import RequestField
|
||||||
|
-from .packages.urllib3.filepost import encode_multipart_formdata
|
||||||
|
-from .packages.urllib3.util import parse_url
|
||||||
|
-from .packages.urllib3.exceptions import (
|
||||||
|
+from urllib3.fields import RequestField
|
||||||
|
+from urllib3.filepost import encode_multipart_formdata
|
||||||
|
+from urllib3.util import parse_url
|
||||||
|
+from urllib3.exceptions import (
|
||||||
|
DecodeError, ReadTimeoutError, ProtocolError, LocationParseError)
|
||||||
|
from .exceptions import (
|
||||||
|
HTTPError, MissingSchema, InvalidURL, ChunkedEncodingError,
|
||||||
|
--- a/requests/sessions.py
|
||||||
|
+++ b/requests/sessions.py
|
||||||
|
@@ -21,7 +21,7 @@ from .hooks import default_hooks, dispat
|
||||||
|
from .utils import to_key_val_list, default_headers, to_native_string
|
||||||
|
from .exceptions import (
|
||||||
|
TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)
|
||||||
|
-from .packages.urllib3._collections import RecentlyUsedContainer
|
||||||
|
+from urllib3._collections import RecentlyUsedContainer
|
||||||
|
from .structures import CaseInsensitiveDict
|
||||||
|
|
||||||
|
from .adapters import HTTPAdapter
|
Loading…
Reference in New Issue
Block a user