From e10b18927e67b9d3f2235d4d392bbdc9bba0357142b92680a92393803701a92c Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Thu, 24 Sep 2015 21:23:14 +0000
Subject: [PATCH 1/8] Accepting request 333526 from
home:posophe:branches:devel:languages:python
fix
OBS-URL: https://build.opensuse.org/request/show/333526
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=66
---
python-requests.changes | 5 +++++
python-requests.spec | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/python-requests.changes b/python-requests.changes
index b921cb5..70b20b0 100644
--- a/python-requests.changes
+++ b/python-requests.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Sep 24 21:22:11 UTC 2015 - p.drouand@gmail.com
+
+- Unbundle python-chardet and python-urllib3 (boo#947357)
+
-------------------------------------------------------------------
Mon Sep 14 07:48:30 UTC 2015 - tbechtold@suse.com
diff --git a/python-requests.spec b/python-requests.spec
index 018db5c..0164bb1 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -35,7 +35,9 @@ BuildRequires: python-devel
BuildRequires: python-py
BuildRequires: python-setuptools
Requires: python
+Requires: python-chardet
Requires: python-py
+Requires: python-urllib3
%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
@@ -76,6 +78,8 @@ sed -i '/^#!/d' ./requests/certs.py
%patch1 -p1
%endif
rm ./requests/cacert.pem
+# Unbundle python-chardet and python-urllib3
+sed -i 's|.packages.||g' requests/*.py
%build
python setup.py build
@@ -88,6 +92,7 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+rm -rf %{buildroot}%{python_sitelib}/requests/packages
%files
%defattr(-,root,root)
From df777e1a6f0ad702be4042ac3cbfb8c4010d096590d43f073d9518187a8bb434 Mon Sep 17 00:00:00 2001
From: Todd R
Date: Sat, 26 Sep 2015 09:05:47 +0000
Subject: [PATCH 2/8] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=67
---
python-requests.changes | 5 -----
1 file changed, 5 deletions(-)
diff --git a/python-requests.changes b/python-requests.changes
index 70b20b0..b921cb5 100644
--- a/python-requests.changes
+++ b/python-requests.changes
@@ -1,8 +1,3 @@
--------------------------------------------------------------------
-Thu Sep 24 21:22:11 UTC 2015 - p.drouand@gmail.com
-
-- Unbundle python-chardet and python-urllib3 (boo#947357)
-
-------------------------------------------------------------------
Mon Sep 14 07:48:30 UTC 2015 - tbechtold@suse.com
From 50bec8800e91843274df8b11c8505c094ce246129098aa7bea487cb76c4d7a88 Mon Sep 17 00:00:00 2001
From: Todd R
Date: Sat, 26 Sep 2015 09:06:08 +0000
Subject: [PATCH 3/8] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=69
---
python-requests.spec | 5 -----
1 file changed, 5 deletions(-)
diff --git a/python-requests.spec b/python-requests.spec
index 0164bb1..018db5c 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -35,9 +35,7 @@ BuildRequires: python-devel
BuildRequires: python-py
BuildRequires: python-setuptools
Requires: python
-Requires: python-chardet
Requires: python-py
-Requires: python-urllib3
%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
@@ -78,8 +76,6 @@ sed -i '/^#!/d' ./requests/certs.py
%patch1 -p1
%endif
rm ./requests/cacert.pem
-# Unbundle python-chardet and python-urllib3
-sed -i 's|.packages.||g' requests/*.py
%build
python setup.py build
@@ -92,7 +88,6 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-rm -rf %{buildroot}%{python_sitelib}/requests/packages
%files
%defattr(-,root,root)
From 53b6e2968818ddee97d9ce0de792c716d814d75dc59dca56fe2aac951cdbb435 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Mon, 5 Oct 2015 17:19:10 +0000
Subject: [PATCH 4/8] Accepting request 336575 from
home:posophe:branches:devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/336575
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=71
---
python-requests.changes | 6 ++
python-requests.spec | 6 ++
requests-do-not-use-bundle.patch | 99 ++++++++++++++++++++++++++++++++
3 files changed, 111 insertions(+)
create mode 100644 requests-do-not-use-bundle.patch
diff --git a/python-requests.changes b/python-requests.changes
index b921cb5..30be87e 100644
--- a/python-requests.changes
+++ b/python-requests.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+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
diff --git a/python-requests.spec b/python-requests.spec
index 018db5c..06779b8 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -29,13 +29,17 @@ Source: http://pypi.python.org/packages/source/r/requests/requests-%{ver
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
+# PATCH-FIX-OPENSUSE requests-do-not-use-bundle.patch --use system libraries instead of bundled ones
+Patch2: requests-do-not-use-bundle.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-py
BuildRequires: python-setuptools
Requires: python
+Requires: python-chardet
Requires: python-py
+Requires: python-urllib3
%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
@@ -75,6 +79,7 @@ sed -i '/^#!/d' ./requests/certs.py
%else
%patch1 -p1
%endif
+%patch2 -p1
rm ./requests/cacert.pem
%build
@@ -88,6 +93,7 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+rm -rf requests/packages
%files
%defattr(-,root,root)
diff --git a/requests-do-not-use-bundle.patch b/requests-do-not-use-bundle.patch
new file mode 100644
index 0000000..f2f2c92
--- /dev/null
+++ b/requests-do-not-use-bundle.patch
@@ -0,0 +1,99 @@
+--- a/requests/adapters.py 2015-03-14 09:23:40.000000000 +0100
++++ b/requests/adapters.py 2015-09-28 14:45:56.745440792 +0200
+@@ -11,22 +11,22 @@
+ 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)
+ from .structures import CaseInsensitiveDict
+-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 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 2015-02-24 08:46:40.000000000 +0100
++++ b/requests/compat.py 2015-09-28 14:46:38.358682814 +0200
+@@ -4,8 +4,7 @@
+ pythoncompat
+ """
+
+-from .packages import chardet
+-
++import chardet
+ import sys
+
+ # -------
+--- a/requests/exceptions.py 2015-02-24 08:46:40.000000000 +0100
++++ b/requests/exceptions.py 2015-09-28 14:47:59.699270143 +0200
+@@ -7,7 +7,7 @@
+ 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 2015-05-03 17:00:37.000000000 +0200
++++ b/requests/__init__.py 2015-09-28 14:48:55.561942516 +0200
+@@ -50,7 +50,7 @@
+
+ # 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 2015-04-23 08:22:47.000000000 +0200
++++ b/requests/models.py 2015-09-28 14:49:35.242296252 +0200
+@@ -16,10 +16,10 @@
+
+ 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 2015-04-23 08:22:47.000000000 +0200
++++ b/requests/sessions.py 2015-09-28 14:50:19.381471320 +0200
+@@ -21,7 +21,7 @@
+ 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
From 3139769f54a1665ee2f86ee0932de1c59e26668a22d11d1e42a903f06a6b5ad6 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Mon, 5 Oct 2015 17:22:34 +0000
Subject: [PATCH 5/8] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=72
---
python-requests.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python-requests.spec b/python-requests.spec
index 06779b8..2f98919 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -93,7 +93,7 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-rm -rf requests/packages
+rm -rf %{buildroot}%{python_sitelib}/requests/packages
%files
%defattr(-,root,root)
From c2c322bad8669adbfd02cd6167a9dc45d2c4d9240370eba0f27f762d22cb0719 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 6 Oct 2015 18:34:43 +0000
Subject: [PATCH 6/8] Accepting request 336832 from
home:alois:branches:devel:languages:python
Fixes the no-bundle patch in regard to urllib3.
OBS-URL: https://build.opensuse.org/request/show/336832
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=73
---
python-requests.changes | 5 +++
requests-do-not-use-bundle.patch | 55 ++++++++++++++++++++++----------
2 files changed, 43 insertions(+), 17 deletions(-)
diff --git a/python-requests.changes b/python-requests.changes
index 30be87e..788579e 100644
--- a/python-requests.changes
+++ b/python-requests.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+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
diff --git a/requests-do-not-use-bundle.patch b/requests-do-not-use-bundle.patch
index f2f2c92..f5db3f9 100644
--- a/requests-do-not-use-bundle.patch
+++ b/requests-do-not-use-bundle.patch
@@ -1,6 +1,8 @@
---- a/requests/adapters.py 2015-03-14 09:23:40.000000000 +0100
-+++ b/requests/adapters.py 2015-09-28 14:45:56.745440792 +0200
-@@ -11,22 +11,22 @@
+Index: requests-2.7.0/requests/adapters.py
+===================================================================
+--- requests-2.7.0.orig/requests/adapters.py
++++ requests-2.7.0/requests/adapters.py
+@@ -11,22 +11,22 @@ and maintain connections.
import socket
from .models import Response
@@ -35,8 +37,10 @@
from .cookies import extract_cookies_to_jar
from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
ProxyError, RetryError)
---- a/requests/compat.py 2015-02-24 08:46:40.000000000 +0100
-+++ b/requests/compat.py 2015-09-28 14:46:38.358682814 +0200
+Index: requests-2.7.0/requests/compat.py
+===================================================================
+--- requests-2.7.0.orig/requests/compat.py
++++ requests-2.7.0/requests/compat.py
@@ -4,8 +4,7 @@
pythoncompat
"""
@@ -47,9 +51,20 @@
import sys
# -------
---- a/requests/exceptions.py 2015-02-24 08:46:40.000000000 +0100
-+++ b/requests/exceptions.py 2015-09-28 14:47:59.699270143 +0200
-@@ -7,7 +7,7 @@
+@@ -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
+Index: requests-2.7.0/requests/exceptions.py
+===================================================================
+--- requests-2.7.0.orig/requests/exceptions.py
++++ requests-2.7.0/requests/exceptions.py
+@@ -7,7 +7,7 @@ requests.exceptions
This module contains the set of Requests' exceptions.
"""
@@ -58,9 +73,11 @@
class RequestException(IOError):
---- a/requests/__init__.py 2015-05-03 17:00:37.000000000 +0200
-+++ b/requests/__init__.py 2015-09-28 14:48:55.561942516 +0200
-@@ -50,7 +50,7 @@
+Index: requests-2.7.0/requests/__init__.py
+===================================================================
+--- requests-2.7.0.orig/requests/__init__.py
++++ requests-2.7.0/requests/__init__.py
+@@ -50,7 +50,7 @@ __copyright__ = 'Copyright 2015 Kenneth
# Attempt to enable urllib3's SNI support, if possible
try:
@@ -69,9 +86,11 @@
pyopenssl.inject_into_urllib3()
except ImportError:
pass
---- a/requests/models.py 2015-04-23 08:22:47.000000000 +0200
-+++ b/requests/models.py 2015-09-28 14:49:35.242296252 +0200
-@@ -16,10 +16,10 @@
+Index: requests-2.7.0/requests/models.py
+===================================================================
+--- requests-2.7.0.orig/requests/models.py
++++ requests-2.7.0/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
@@ -86,9 +105,11 @@
DecodeError, ReadTimeoutError, ProtocolError, LocationParseError)
from .exceptions import (
HTTPError, MissingSchema, InvalidURL, ChunkedEncodingError,
---- a/requests/sessions.py 2015-04-23 08:22:47.000000000 +0200
-+++ b/requests/sessions.py 2015-09-28 14:50:19.381471320 +0200
-@@ -21,7 +21,7 @@
+Index: requests-2.7.0/requests/sessions.py
+===================================================================
+--- requests-2.7.0.orig/requests/sessions.py
++++ requests-2.7.0/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 e41975ba9d6e245440c815372f8ae4c145bf5db8838190328ed9be463311d660 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Fri, 9 Oct 2015 23:04:58 +0000
Subject: [PATCH 7/8] Accepting request 337534 from home:XRevan86
- Update to 2.8.0.
OBS-URL: https://build.opensuse.org/request/show/337534
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=74
---
no-default-cacert.patch | 37 ++++++----------
python-requests.changes | 34 +++++++++++++++
python-requests.spec | 73 +++++++++++++++-----------------
requests-2.7.0.tar.gz | 3 --
requests-2.8.0.tar.gz | 3 ++
requests-do-not-use-bundle.patch | 43 ++++++++-----------
6 files changed, 103 insertions(+), 90 deletions(-)
delete mode 100644 requests-2.7.0.tar.gz
create mode 100644 requests-2.8.0.tar.gz
diff --git a/no-default-cacert.patch b/no-default-cacert.patch
index 7651e91..f0a4219 100644
--- a/no-default-cacert.patch
+++ b/no-default-cacert.patch
@@ -1,8 +1,11 @@
-Index: requests-2.6.0/requests/adapters.py
-===================================================================
---- requests-2.6.0.orig/requests/adapters.py
-+++ requests-2.6.0/requests/adapters.py
-@@ -177,9 +177,6 @@ class HTTPAdapter(BaseAdapter):
+--- a/MANIFEST.in
++++ b/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
+--- a/requests/adapters.py
++++ b/requests/adapters.py
+@@ -180,9 +180,6 @@ class HTTPAdapter(BaseAdapter):
if not cert_loc:
cert_loc = DEFAULT_CA_BUNDLE_PATH
@@ -12,10 +15,8 @@ Index: requests-2.6.0/requests/adapters.py
conn.cert_reqs = 'CERT_REQUIRED'
conn.ca_certs = cert_loc
else:
-Index: requests-2.6.0/requests/certs.py
-===================================================================
---- requests-2.6.0.orig/requests/certs.py
-+++ requests-2.6.0/requests/certs.py
+--- a/requests/certs.py
++++ b/requests/certs.py
@@ -18,8 +18,9 @@ try:
except ImportError:
def where():
@@ -28,24 +29,14 @@ Index: requests-2.6.0/requests/certs.py
if __name__ == '__main__':
print(where())
-Index: requests-2.6.0/MANIFEST.in
-===================================================================
---- requests-2.6.0.orig/MANIFEST.in
-+++ 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,
+--- a/requests/packages/urllib3/util/ssl_.py
++++ b/requests/packages/urllib3/util/ssl_.py
+@@ -278,6 +278,8 @@ def ssl_wrap_socket(sock, keyfile=None,
if e.errno == errno.ENOENT:
raise SSLError(e)
raise
+ elif cert_reqs != CERT_NONE:
+ context.set_default_verify_paths()
-+
+
if certfile:
context.load_cert_chain(certfile, keyfile)
- if HAS_SNI: # Platform-specific: OpenSSL with enabled SNI
diff --git a/python-requests.changes b/python-requests.changes
index 788579e..d17c1ad 100644
--- a/python-requests.changes
+++ b/python-requests.changes
@@ -1,3 +1,37 @@
+-------------------------------------------------------------------
+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 {'://':
+ ''}. 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
diff --git a/python-requests.spec b/python-requests.spec
index 2f98919..0cfbf20 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -17,21 +17,19 @@
Name: python-requests
-Version: 2.7.0
+Version: 2.8.0
Release: 0
-Url: http://python-requests.org
Summary: Awesome Python HTTP Library That's Actually Usable
License: Apache-2.0
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
# 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)
+# PATCH-FIX-SLE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
Patch1: no-default-cacert-sles.patch
# PATCH-FIX-OPENSUSE requests-do-not-use-bundle.patch --use system libraries instead of bundled ones
Patch2: requests-do-not-use-bundle.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-py
@@ -40,44 +38,44 @@ Requires: python
Requires: python-chardet
Requires: python-py
Requires: python-urllib3
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
+%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
BuildArch: noarch
%endif
%description
-Requests is an ISC Licensed HTTP library, written in Python, for human
-beings.
+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.
+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
+ - 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 0%{?suse_version} > 1110 || 0%{?rhel} > 6
-%patch0 -p1
-%else
+%if 0%{?suse_version} == 1110 || (0%{?suse_version} == 1315 && !0%{?is_opensuse})
%patch1 -p1
+%else
+%patch0 -p1
%endif
%patch2 -p1
rm ./requests/cacert.pem
@@ -85,19 +83,18 @@ rm ./requests/cacert.pem
%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
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-rm -rf %{buildroot}%{python_sitelib}/requests/packages
+python setup.py install \
+ --root=%{buildroot} --prefix=%{_prefix}
+rm -rf %{buildroot}%{python_sitelib}/requests/packages/
+
+%check
+python setup.py test
%files
%defattr(-,root,root)
-%doc README.rst HISTORY.rst LICENSE NOTICE
-%{python_sitelib}/*
+%doc HISTORY.rst LICENSE NOTICE README.rst
+%{python_sitelib}/requests/
+%{python_sitelib}/requests-*
%changelog
diff --git a/requests-2.7.0.tar.gz b/requests-2.7.0.tar.gz
deleted file mode 100644
index ce3f497..0000000
--- a/requests-2.7.0.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:398a3db6d61899d25fd4a06c6ca12051b0ce171d705decd7ed5511517b4bb93d
-size 451723
diff --git a/requests-2.8.0.tar.gz b/requests-2.8.0.tar.gz
new file mode 100644
index 0000000..7269afa
--- /dev/null
+++ b/requests-2.8.0.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b2f003589b60924909c0acde472590c5ea83906986a7a25b6f7929eb20923b7b
+size 457879
diff --git a/requests-do-not-use-bundle.patch b/requests-do-not-use-bundle.patch
index f5db3f9..fb5c5ed 100644
--- a/requests-do-not-use-bundle.patch
+++ b/requests-do-not-use-bundle.patch
@@ -1,8 +1,6 @@
-Index: requests-2.7.0/requests/adapters.py
-===================================================================
---- requests-2.7.0.orig/requests/adapters.py
-+++ requests-2.7.0/requests/adapters.py
-@@ -11,22 +11,22 @@ and maintain connections.
+--- a/requests/adapters.py
++++ b/requests/adapters.py
+@@ -11,24 +11,24 @@ and maintain connections.
import socket
from .models import Response
@@ -16,8 +14,10 @@ Index: requests-2.7.0/requests/adapters.py
+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)
+ 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
@@ -26,6 +26,7 @@ Index: requests-2.7.0/requests/adapters.py
-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
@@ -37,10 +38,8 @@ Index: requests-2.7.0/requests/adapters.py
from .cookies import extract_cookies_to_jar
from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
ProxyError, RetryError)
-Index: requests-2.7.0/requests/compat.py
-===================================================================
---- requests-2.7.0.orig/requests/compat.py
-+++ requests-2.7.0/requests/compat.py
+--- a/requests/compat.py
++++ b/requests/compat.py
@@ -4,8 +4,7 @@
pythoncompat
"""
@@ -60,10 +59,8 @@ Index: requests-2.7.0/requests/compat.py
builtin_str = str
bytes = str
-Index: requests-2.7.0/requests/exceptions.py
-===================================================================
---- requests-2.7.0.orig/requests/exceptions.py
-+++ requests-2.7.0/requests/exceptions.py
+--- a/requests/exceptions.py
++++ b/requests/exceptions.py
@@ -7,7 +7,7 @@ requests.exceptions
This module contains the set of Requests' exceptions.
@@ -73,10 +70,8 @@ Index: requests-2.7.0/requests/exceptions.py
class RequestException(IOError):
-Index: requests-2.7.0/requests/__init__.py
-===================================================================
---- requests-2.7.0.orig/requests/__init__.py
-+++ requests-2.7.0/requests/__init__.py
+--- 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
@@ -86,10 +81,8 @@ Index: requests-2.7.0/requests/__init__.py
pyopenssl.inject_into_urllib3()
except ImportError:
pass
-Index: requests-2.7.0/requests/models.py
-===================================================================
---- requests-2.7.0.orig/requests/models.py
-+++ requests-2.7.0/requests/models.py
+--- a/requests/models.py
++++ b/requests/models.py
@@ -16,10 +16,10 @@ from .structures import CaseInsensitiveD
from .auth import HTTPBasicAuth
@@ -105,10 +98,8 @@ Index: requests-2.7.0/requests/models.py
DecodeError, ReadTimeoutError, ProtocolError, LocationParseError)
from .exceptions import (
HTTPError, MissingSchema, InvalidURL, ChunkedEncodingError,
-Index: requests-2.7.0/requests/sessions.py
-===================================================================
---- requests-2.7.0.orig/requests/sessions.py
-+++ requests-2.7.0/requests/sessions.py
+--- 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 (
From ce9d5664e0444dd995470c94b6d51b1da1765277639ab113cdb34f88579340c2 Mon Sep 17 00:00:00 2001
From: Todd R
Date: Thu, 15 Oct 2015 12:02:24 +0000
Subject: [PATCH 8/8] Accepting request 339102 from home:XRevan86
OBS-URL: https://build.opensuse.org/request/show/339102
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=75
---
no-default-cacert-sles.patch | 34 ----------------------------------
python-requests.changes | 7 +++++++
python-requests.spec | 10 ++--------
3 files changed, 9 insertions(+), 42 deletions(-)
delete mode 100644 no-default-cacert-sles.patch
diff --git a/no-default-cacert-sles.patch b/no-default-cacert-sles.patch
deleted file mode 100644
index a4ddceb..0000000
--- a/no-default-cacert-sles.patch
+++ /dev/null
@@ -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())
diff --git a/python-requests.changes b/python-requests.changes
index d17c1ad..3a3c8d8 100644
--- a/python-requests.changes
+++ b/python-requests.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+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
diff --git a/python-requests.spec b/python-requests.spec
index 0cfbf20..3bf3208 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -26,10 +26,8 @@ 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
Patch0: no-default-cacert.patch
-# PATCH-FIX-SLE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
-Patch1: no-default-cacert-sles.patch
# PATCH-FIX-OPENSUSE requests-do-not-use-bundle.patch --use system libraries instead of bundled ones
-Patch2: requests-do-not-use-bundle.patch
+Patch1: requests-do-not-use-bundle.patch
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-py
@@ -72,12 +70,8 @@ Features:
%setup -q -n requests-%{version}
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./requests/certs.py
-%if 0%{?suse_version} == 1110 || (0%{?suse_version} == 1315 && !0%{?is_opensuse})
-%patch1 -p1
-%else
%patch0 -p1
-%endif
-%patch2 -p1
+%patch1 -p1
rm ./requests/cacert.pem
%build