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