Hello community,

here is the log from the commit of package python-requests for openSUSE:Factory 
checked in at 2017-10-02 16:48:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests (Old)
 and      /work/SRC/openSUSE:Factory/.python-requests.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requests"

Mon Oct  2 16:48:19 2017 rev:45 rq:529890 version:2.18.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-requests/python-requests.changes  
2017-08-14 12:36:55.578067388 +0200
+++ /work/SRC/openSUSE:Factory/.python-requests.new/python-requests.changes     
2017-10-02 16:48:20.403770220 +0200
@@ -1,0 +2,19 @@
+Sun Sep 24 21:48:31 UTC 2017 - [email protected]
+
+- update to version 2.18.4:
+  * Improvements
+    + Error messages for invalid headers now include the header name
+      for easier debugging
+  * Dependencies
+    + We now support idna v2.6.
+
+- changes from version 2.18.3:
+  * Improvements
+    + Running $ python -m requests.help now includes the installed
+      version of idna.
+  * Bugfixes
+    + Fixed issue where Requests would raise ConnectionError instead
+      of SSLError when encountering SSL problems when using urllib3
+      v1.22.
+
+-------------------------------------------------------------------

Old:
----
  requests-2.18.2.tar.gz

New:
----
  requests-2.18.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-requests.spec ++++++
--- /var/tmp/diff_new_pack.8y2ETG/_old  2017-10-02 16:48:21.479619232 +0200
+++ /var/tmp/diff_new_pack.8y2ETG/_new  2017-10-02 16:48:21.479619232 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-requests
-Version:        2.18.2
+Version:        2.18.4
 Release:        0
 Summary:        Awesome Python HTTP Library That's Actually Usable
 License:        Apache-2.0

++++++ requests-2.18.2.tar.gz -> requests-2.18.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/HISTORY.rst 
new/requests-2.18.4/HISTORY.rst
--- old/requests-2.18.2/HISTORY.rst     2017-07-25 17:21:44.000000000 +0200
+++ new/requests-2.18.4/HISTORY.rst     2017-08-15 15:22:10.000000000 +0200
@@ -3,6 +3,29 @@
 Release History
 ---------------
 
+2.18.4 (2017-08-15)
++++++++++++++++++++
+
+**Improvements**
+
+- Error messages for invalid headers now include the header name for easier 
debugging
+
+**Dependencies**
+
+- We now support idna v2.6.
+
+2.18.3 (2017-08-02)
++++++++++++++++++++
+
+**Improvements**
+
+- Running ``$ python -m requests.help`` now includes the installed version of 
idna.
+
+**Bugfixes**
+
+- Fixed issue where Requests would raise ``ConnectionError`` instead of
+  ``SSLError`` when encountering SSL problems when using urllib3 v1.22.
+
 2.18.2 (2017-07-25)
 +++++++++++++++++++
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/PKG-INFO new/requests-2.18.4/PKG-INFO
--- old/requests-2.18.2/PKG-INFO        2017-07-25 17:22:25.000000000 +0200
+++ new/requests-2.18.4/PKG-INFO        2017-08-15 15:23:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests
-Version: 2.18.2
+Version: 2.18.4
 Summary: Python HTTP for Humans.
 Home-page: http://python-requests.org
 Author: Kenneth Reitz
@@ -127,6 +127,29 @@
         Release History
         ---------------
         
+        2.18.4 (2017-08-15)
+        +++++++++++++++++++
+        
+        **Improvements**
+        
+        - Error messages for invalid headers now include the header name for 
easier debugging
+        
+        **Dependencies**
+        
+        - We now support idna v2.6.
+        
+        2.18.3 (2017-08-02)
+        +++++++++++++++++++
+        
+        **Improvements**
+        
+        - Running ``$ python -m requests.help`` now includes the installed 
version of idna.
+        
+        **Bugfixes**
+        
+        - Fixed issue where Requests would raise ``ConnectionError`` instead of
+          ``SSLError`` when encountering SSL problems when using urllib3 v1.22.
+        
         2.18.2 (2017-07-25)
         +++++++++++++++++++
         
@@ -1636,7 +1659,6 @@
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/__init__.py 
new/requests-2.18.4/requests/__init__.py
--- old/requests-2.18.2/requests/__init__.py    2017-06-14 19:44:15.000000000 
+0200
+++ new/requests-2.18.4/requests/__init__.py    2017-07-29 12:53:55.000000000 
+0200
@@ -57,7 +57,7 @@
     # Check urllib3 for compatibility.
     major, minor, patch = urllib3_version  # noqa: F811
     major, minor, patch = int(major), int(minor), int(patch)
-    # urllib3 >= 1.21.1, < 1.22
+    # urllib3 >= 1.21.1, <= 1.22
     assert major == 1
     assert minor >= 21
     assert minor <= 22
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/__version__.py 
new/requests-2.18.4/requests/__version__.py
--- old/requests-2.18.2/requests/__version__.py 2017-07-25 17:20:06.000000000 
+0200
+++ new/requests-2.18.4/requests/__version__.py 2017-08-15 15:22:32.000000000 
+0200
@@ -5,8 +5,8 @@
 __title__ = 'requests'
 __description__ = 'Python HTTP for Humans.'
 __url__ = 'http://python-requests.org'
-__version__ = '2.18.2'
-__build__ = 0x021802
+__version__ = '2.18.4'
+__build__ = 0x021804
 __author__ = 'Kenneth Reitz'
 __author_email__ = '[email protected]'
 __license__ = 'Apache 2.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/adapters.py 
new/requests-2.18.4/requests/adapters.py
--- old/requests-2.18.2/requests/adapters.py    2017-06-01 15:42:10.000000000 
+0200
+++ new/requests-2.18.4/requests/adapters.py    2017-08-02 15:21:11.000000000 
+0200
@@ -501,6 +501,10 @@
             if isinstance(e.reason, _ProxyError):
                 raise ProxyError(e, request=request)
 
+            if isinstance(e.reason, _SSLError):
+                # This branch is for urllib3 v1.22 and later.
+                raise SSLError(e, request=request)
+
             raise ConnectionError(e, request=request)
 
         except ClosedPoolError as e:
@@ -511,6 +515,7 @@
 
         except (_SSLError, _HTTPError) as e:
             if isinstance(e, _SSLError):
+                # This branch is for urllib3 versions earlier than v1.22
                 raise SSLError(e, request=request)
             elif isinstance(e, ReadTimeoutError):
                 raise ReadTimeout(e, request=request)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/compat.py 
new/requests-2.18.4/requests/compat.py
--- old/requests-2.18.2/requests/compat.py      2017-06-01 15:42:10.000000000 
+0200
+++ new/requests-2.18.4/requests/compat.py      2017-07-29 12:53:55.000000000 
+0200
@@ -27,9 +27,7 @@
 
 try:
     import simplejson as json
-except (ImportError, SyntaxError):
-    # simplejson does not support Python 3.2, it throws a SyntaxError
-    # because of u'...' Unicode literals.
+except ImportError:
     import json
 
 # ---------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/help.py 
new/requests-2.18.4/requests/help.py
--- old/requests-2.18.2/requests/help.py        2017-07-20 11:07:20.000000000 
+0200
+++ new/requests-2.18.4/requests/help.py        2017-07-29 12:53:55.000000000 
+0200
@@ -6,6 +6,7 @@
 import sys
 import ssl
 
+import idna
 import urllib3
 import chardet
 
@@ -84,6 +85,9 @@
     cryptography_info = {
         'version': getattr(cryptography, '__version__', ''),
     }
+    idna_info = {
+        'version': getattr(idna, '__version__', ''),
+    }
 
     # OPENSSL_VERSION_NUMBER doesn't exist in the Python 2.6 ssl module.
     system_ssl = getattr(ssl, 'OPENSSL_VERSION_NUMBER', None)
@@ -100,6 +104,7 @@
         'urllib3': urllib3_info,
         'chardet': chardet_info,
         'cryptography': cryptography_info,
+        'idna': idna_info,
         'requests': {
             'version': requests_version,
         },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/models.py 
new/requests-2.18.4/requests/models.py
--- old/requests-2.18.2/requests/models.py      2017-06-14 19:44:15.000000000 
+0200
+++ new/requests-2.18.4/requests/models.py      2017-07-29 12:53:55.000000000 
+0200
@@ -586,8 +586,6 @@
     ]
 
     def __init__(self):
-        super(Response, self).__init__()
-
         self._content = False
         self._content_consumed = False
         self._next = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/sessions.py 
new/requests-2.18.4/requests/sessions.py
--- old/requests-2.18.2/requests/sessions.py    2017-07-20 11:07:20.000000000 
+0200
+++ new/requests-2.18.4/requests/sessions.py    2017-07-29 12:53:55.000000000 
+0200
@@ -97,6 +97,12 @@
 
     def get_redirect_target(self, resp):
         """Receives a Response. Returns a redirect URI or ``None``"""
+        # Due to the nature of how requests processes redirects this method 
will
+        # be called at least once upon the original response and at least twice
+        # on each subsequent redirect response (if any).
+        # If a custom mixin is used to handle this logic, it may be 
advantageous
+        # to cache the redirect location onto the response object as a private
+        # attribute.
         if resp.is_redirect:
             location = resp.headers['location']
             # Currently the underlying http module on py3 decode headers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests/utils.py 
new/requests-2.18.4/requests/utils.py
--- old/requests-2.18.2/requests/utils.py       2017-06-14 19:44:15.000000000 
+0200
+++ new/requests-2.18.4/requests/utils.py       2017-08-15 15:19:39.000000000 
+0200
@@ -868,8 +868,8 @@
         if not pat.match(value):
             raise InvalidHeader("Invalid return character or leading space in 
header: %s" % name)
     except TypeError:
-        raise InvalidHeader("Header value %s must be of type str or bytes, "
-                            "not %s" % (value, type(value)))
+        raise InvalidHeader("Value for header {%s: %s} must be of type str or "
+                            "bytes, not %s" % (name, value, type(value)))
 
 
 def urldefragauth(url):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests.egg-info/PKG-INFO 
new/requests-2.18.4/requests.egg-info/PKG-INFO
--- old/requests-2.18.2/requests.egg-info/PKG-INFO      2017-07-25 
17:22:25.000000000 +0200
+++ new/requests-2.18.4/requests.egg-info/PKG-INFO      2017-08-15 
15:23:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests
-Version: 2.18.2
+Version: 2.18.4
 Summary: Python HTTP for Humans.
 Home-page: http://python-requests.org
 Author: Kenneth Reitz
@@ -127,6 +127,29 @@
         Release History
         ---------------
         
+        2.18.4 (2017-08-15)
+        +++++++++++++++++++
+        
+        **Improvements**
+        
+        - Error messages for invalid headers now include the header name for 
easier debugging
+        
+        **Dependencies**
+        
+        - We now support idna v2.6.
+        
+        2.18.3 (2017-08-02)
+        +++++++++++++++++++
+        
+        **Improvements**
+        
+        - Running ``$ python -m requests.help`` now includes the installed 
version of idna.
+        
+        **Bugfixes**
+        
+        - Fixed issue where Requests would raise ``ConnectionError`` instead of
+          ``SSLError`` when encountering SSL problems when using urllib3 v1.22.
+        
         2.18.2 (2017-07-25)
         +++++++++++++++++++
         
@@ -1636,7 +1659,6 @@
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/requests.egg-info/requires.txt 
new/requests-2.18.4/requests.egg-info/requires.txt
--- old/requests-2.18.2/requests.egg-info/requires.txt  2017-07-25 
17:22:25.000000000 +0200
+++ new/requests-2.18.4/requests.egg-info/requires.txt  2017-08-15 
15:23:34.000000000 +0200
@@ -1,5 +1,5 @@
 chardet<3.1.0,>=3.0.2
-idna<2.6,>=2.5
+idna<2.7,>=2.5
 urllib3<1.23,>=1.21.1
 certifi>=2017.4.17
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/setup.py new/requests-2.18.4/setup.py
--- old/requests-2.18.2/setup.py        2017-07-25 17:15:36.000000000 +0200
+++ new/requests-2.18.4/setup.py        2017-08-15 15:19:39.000000000 +0200
@@ -43,7 +43,7 @@
 
 requires = [
     'chardet>=3.0.2,<3.1.0',
-    'idna>=2.5,<2.6',
+    'idna>=2.5,<2.7',
     'urllib3>=1.21.1,<1.23',
     'certifi>=2017.4.17'
 
@@ -83,7 +83,6 @@
         'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/tests/test_help.py 
new/requests-2.18.4/tests/test_help.py
--- old/requests-2.18.2/tests/test_help.py      2017-07-20 11:07:20.000000000 
+0200
+++ new/requests-2.18.4/tests/test_help.py      2017-07-29 12:53:55.000000000 
+0200
@@ -19,3 +19,22 @@
 def test_system_ssl():
     """Verify we're actually setting system_ssl when it should be available."""
     assert info()['system_ssl']['version'] != ''
+
+
+class VersionedPackage(object):
+    def __init__(self, version):
+        self.__version__ = version
+
+
+def test_idna_without_version_attribute(mocker):
+    """Older versions of IDNA don't provide a __version__ attribute, verify
+    that if we have such a package, we don't blow up.
+    """
+    mocker.patch('requests.help.idna', new=None)
+    assert info()['idna'] == {'version': ''}
+
+
+def test_idna_with_version_attribute(mocker):
+    """Verify we're actually setting idna version when it should be 
available."""
+    mocker.patch('requests.help.idna', new=VersionedPackage('2.6'))
+    assert info()['idna'] == {'version': '2.6'}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-2.18.2/tests/test_requests.py 
new/requests-2.18.4/tests/test_requests.py
--- old/requests-2.18.2/tests/test_requests.py  2017-06-14 19:44:15.000000000 
+0200
+++ new/requests-2.18.4/tests/test_requests.py  2017-08-15 15:19:39.000000000 
+0200
@@ -23,7 +23,7 @@
 from requests.exceptions import (
     ConnectionError, ConnectTimeout, InvalidSchema, InvalidURL,
     MissingSchema, ReadTimeout, Timeout, RetryError, TooManyRedirects,
-    ProxyError, InvalidHeader, UnrewindableBodyError)
+    ProxyError, InvalidHeader, UnrewindableBodyError, SSLError)
 from requests.models import PreparedRequest
 from requests.structures import CaseInsensitiveDict
 from requests.sessions import SessionRedirectMixin
@@ -812,6 +812,15 @@
             item.category.__name__ for item in warning_records)
         assert warnings_category == warnings_expected
 
+    def test_certificate_failure(self, httpbin_secure):
+        """
+        When underlying SSL problems occur, an SSLError is raised.
+        """
+        with pytest.raises(SSLError):
+            # Our local httpbin does not have a trusted CA, so this call will
+            # fail if we use our default trust bundle.
+            requests.get(httpbin_secure('status', '200'))
+
     def test_urlencoded_get_query_multivalued_param(self, httpbin):
 
         r = requests.get(httpbin('get'), params=dict(test=['foo', 'baz']))
@@ -1392,14 +1401,17 @@
         headers_list = {'baz': ['foo', 'bar']}
 
         # Test for int
-        with pytest.raises(InvalidHeader):
+        with pytest.raises(InvalidHeader) as excinfo:
             r = requests.get(httpbin('get'), headers=headers_int)
+        assert 'foo' in str(excinfo.value)
         # Test for dict
-        with pytest.raises(InvalidHeader):
+        with pytest.raises(InvalidHeader) as excinfo:
             r = requests.get(httpbin('get'), headers=headers_dict)
+        assert 'bar' in str(excinfo.value)
         # Test for list
-        with pytest.raises(InvalidHeader):
+        with pytest.raises(InvalidHeader) as excinfo:
             r = requests.get(httpbin('get'), headers=headers_list)
+        assert 'baz' in str(excinfo.value)
 
     def test_header_no_return_chars(self, httpbin):
         """Ensure that a header containing return character sequences raise an


Reply via email to