From 4862d29a96d83c1503048b0e12de23aa2b8e4aa4 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 9 Jan 2014 19:08:58 +0000 Subject: [PATCH 1/2] Make ContentDecodingError a subclass. This should avoid the user having to worry about the new exception. --- requests/exceptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requests/exceptions.py b/requests/exceptions.py index 7caf4db2..cd3c7600 100644 --- a/requests/exceptions.py +++ b/requests/exceptions.py @@ -7,6 +7,7 @@ requests.exceptions This module contains the set of Requests' exceptions. """ +from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): @@ -63,5 +64,5 @@ class ChunkedEncodingError(RequestException): """The server declared chunked encoding but sent an invalid chunk.""" -class ContentDecodingError(RequestException): +class ContentDecodingError(RequestException, BaseHTTPError): """Failed to decode response content""" From 48e2ecc14d998e342fec8de8f6a845887972de20 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 9 Jan 2014 19:10:30 +0000 Subject: [PATCH 2/2] Changelog for 2.2.0. --- HISTORY.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 91d75058..4fb4cf27 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,9 +3,21 @@ Release History --------------- -2.x.y (yyyy-mm-dd) +2.2.0 (2014-01-09) ++++++++++++++++++ +**API Changes** +- New exception: ``ContentDecodingError``. Raised instead of ``urllib3`` + ``DecodeError`` exceptions. + +**Bugfixes** +- Avoid many many exceptions from the buggy implementation of ``proxy_bypass`` + on OS X in Python 2.6. +- Avoid crashing when attempting to get authentication credentions from + ~/.netrc when running as a user without a home directory. +- Use the correct pool size for pools of connections to proxies. +- Fix iteration of ``CookieJar`` objects. +- Ensure that cookies are persisted over redirect. - Switch back to using chardet since charade has merged with it 2.1.0 (2013-12-05)