From 2bad45023e133f736dad5892e7b06371b3da7e4a Mon Sep 17 00:00:00 2001 From: Daniele Tricoli Date: Sat, 19 Jan 2013 07:36:09 +0000 Subject: Use the system python-chardet and python-urllib3 instead of the embedded copies --- debian/changelog | 5 +- .../02_use-system-chardet-and-urllib3.patch | 77 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 debian/patches/02_use-system-chardet-and-urllib3.patch diff --git a/debian/changelog b/debian/changelog index 77ddced..008495d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,11 @@ requests (1.1.0-1) UNRELEASED; urgency=low * debian/patches/01_use-system-ca-certificates.patch - Use the bundle provided by ca-certificates instead of the embedded one + * debian/patches/02_use-system-chardet-and-urllib3.patches + - Use the system python-chardet and python-urllib3 instead of the + embedded copies - -- Daniele Tricoli Sat, 19 Jan 2013 05:09:37 +0100 + -- Daniele Tricoli Sat, 19 Jan 2013 08:33:10 +0100 requests (0.12.1-1) unstable; urgency=low diff --git a/debian/patches/02_use-system-chardet-and-urllib3.patch b/debian/patches/02_use-system-chardet-and-urllib3.patch new file mode 100644 index 0000000..62d14ef --- /dev/null +++ b/debian/patches/02_use-system-chardet-and-urllib3.patch @@ -0,0 +1,77 @@ +Description: Use the system python-chardet and python-urllib3 instead of the + embedded copies. +Author: Daniele Tricoli +Forwarded: not-needed +Last-Update: 2013-01-19 + +--- a/requests/adapters.py ++++ b/requests/adapters.py +@@ -11,17 +11,17 @@ + import socket + + from .models import Response +-from .packages.urllib3.poolmanager import PoolManager, proxy_from_url +-from .packages.urllib3.response import HTTPResponse ++from urllib3.poolmanager import PoolManager, proxy_from_url ++from urllib3.response import HTTPResponse + from .hooks import dispatch_hook + from .compat import urlparse, basestring, urldefrag + from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers, + prepend_scheme_if_needed) + from .structures import CaseInsensitiveDict +-from .packages.urllib3.exceptions import MaxRetryError +-from .packages.urllib3.exceptions import TimeoutError +-from .packages.urllib3.exceptions import SSLError as _SSLError +-from .packages.urllib3.exceptions import HTTPError as _HTTPError ++from urllib3.exceptions import MaxRetryError ++from urllib3.exceptions import TimeoutError ++from urllib3.exceptions import SSLError as _SSLError ++from urllib3.exceptions import HTTPError as _HTTPError + from .cookies import extract_cookies_to_jar + from .exceptions import ConnectionError, Timeout, SSLError + +--- a/requests/compat.py ++++ b/requests/compat.py +@@ -4,7 +4,7 @@ + pythoncompat + """ + +-from .packages import charade as chardet ++import chardet + + import sys + +@@ -89,7 +89,7 @@ + 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/models.py ++++ b/requests/models.py +@@ -17,7 +17,7 @@ + + from .auth import HTTPBasicAuth + from .cookies import cookiejar_from_dict, get_cookie_header +-from .packages.urllib3.filepost import encode_multipart_formdata ++from urllib3.filepost import encode_multipart_formdata + from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL + from .utils import ( + stream_untransfer, guess_filename, requote_uri, +--- a/setup.py ++++ b/setup.py +@@ -16,11 +16,6 @@ + + packages = [ + 'requests', +- 'requests.packages', +- 'requests.packages.charade', +- 'requests.packages.urllib3', +- 'requests.packages.urllib3.packages', +- 'requests.packages.urllib3.packages.ssl_match_hostname' + ] + + requires = [] diff --git a/debian/patches/series b/debian/patches/series index 29a09e4..632785a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 01_use-system-ca-certificates.patch +02_use-system-chardet-and-urllib3.patch -- cgit v1.2.3