Hello community,

here is the log from the commit of package python-wsgi_intercept for 
openSUSE:Leap:15.2 checked in at 2020-03-02 13:25:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-wsgi_intercept (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-wsgi_intercept.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-wsgi_intercept"

Mon Mar  2 13:25:02 2020 rev:11 rq:777289 version:1.9.2

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/python-wsgi_intercept/python-wsgi_intercept.changes
    2020-01-15 15:54:15.599625988 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-wsgi_intercept.new.26092/python-wsgi_intercept.changes
 2020-03-02 13:25:03.174600635 +0100
@@ -1,0 +2,68 @@
+Thu Feb  6 12:42:53 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to 1.9.2
+  * Don't send headers until we've read some results
+  * Update testing to include python 3.7 and 3.8
+  * Adding skipnetwork decorator to external resource
+  * Enable support for verify=False set in requests library.
+
+-------------------------------------------------------------------
+Wed Nov  6 12:22:52 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.9.0:
+  * Fix with new httplib2 included upstream
+- Remove patch httplib2.patch
+
+-------------------------------------------------------------------
+Tue Oct 15 11:19:10 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patch to build with latest httplib2 releases:
+  * httplib2.patch
+
+-------------------------------------------------------------------
+Tue May 28 06:48:33 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Use noun phrase in descriptions.
+
+-------------------------------------------------------------------
+Fri May 24 13:45:03 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.8.1:
+  * Fixes issues with latest urllib
+
+-------------------------------------------------------------------
+Thu Mar 21 05:51:06 UTC 2019 - Thomas Bechtold <[email protected]>
+
+- Add back devel dependency to be able to build on SLE12SP4. Without
+  it, the build fails with:
+  ImportError: cannot import name HTTPSConnection
+
+-------------------------------------------------------------------
+Sat Mar  9 09:12:17 UTC 2019 - John Vandenberg <[email protected]>
+
+- Fix removal of tests from runtime package
+- Run tests on both Python 2 and 3
+- Use documented method of disabling network unit tests
+- Remove no longer needed wsgi_intercept-disable-testbogusdomain.patch
+- Add fdupes
+- Update to v1.8.0
+  * Add wheel support
+- from v1.7.0
+  * Allow nested interceptor context managers
+- from v1.6.0
+  * set wsgi.errors to sys.stderr
+- from v1.5.1
+  * Use fewer dependencies when building docs
+  * Ignore `socket_options` for urllib3
+
+-------------------------------------------------------------------
+Thu Jan 10 22:45:48 UTC 2019 - Jonathan Brownell <[email protected]>
+
+- Support older OS targets by adding a fallback for Recommends:
+
+-------------------------------------------------------------------
+Tue Dec  4 12:56:08 UTC 2018 - Matej Cepl <[email protected]>
+
+- Remove superfluous devel dependency for noarch package
+
+-------------------------------------------------------------------

Old:
----
  wsgi_intercept-1.5.0.tar.gz
  wsgi_intercept-disable-testbogusdomain.patch

New:
----
  wsgi_intercept-1.9.2.tar.gz

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

Other differences:
------------------
++++++ python-wsgi_intercept.spec ++++++
--- /var/tmp/diff_new_pack.dS7H54/_old  2020-03-02 13:25:03.562601407 +0100
+++ /var/tmp/diff_new_pack.dS7H54/_new  2020-03-02 13:25:03.566601415 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-wsgi_intercept
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,35 +12,34 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-wsgi_intercept
-Version:        1.5.0
+Version:        1.9.2
 Release:        0
-Summary:        Installs a WSGI application in place of a real URI for testing
+Summary:        Library for installing a WSGI application in place of a real 
URI for testing
 License:        MIT
-Group:          Development/Languages/Python
-Url:            https://github.com/cdent/python3-wsgi-intercept
-Source:         
https://pypi.io/packages/source/w/wsgi_intercept/wsgi_intercept-%{version}.tar.gz
-# PATCH-FIX-OPENSUSE [email protected] -- Patching fails
-Patch0:         wsgi_intercept-disable-testbogusdomain.patch
+URL:            https://github.com/cdent/python3-wsgi-intercept
+Source:         
https://files.pythonhosted.org/packages/source/w/wsgi_intercept/wsgi_intercept-%{version}.tar.gz
 BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module setuptools}
-BuildRequires:  python-rpm-macros
-# Test requirements:
 BuildRequires:  %{python_module httplib2}
 BuildRequires:  %{python_module pytest >= 2.4}
 BuildRequires:  %{python_module requests >= 2.0.1}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module six}
 BuildRequires:  %{python_module urllib3 >= 1.11.0}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 Requires:       python-six
-Recommends:     python-requests >= 2.0.1
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
-
+%if 0%{?_no_weakdeps}
+Requires:       python-requests >= 2.0.1
+%else
+Recommends:     python-requests >= 2.0.1
+%endif
 %python_subpackages
 
 %description
@@ -52,23 +51,20 @@
 
 %prep
 %setup -q -n wsgi_intercept-%{version}
-%if 0%{?suse_version} == 1230
-%patch0 -p1
-%endif
 
 %build
 %python_build
 
 %install
 %python_install
-rm -rf %{buildroot}%{python_sitelib}/test
+rm -r %{buildroot}%{python_sitelib}/wsgi_intercept/tests
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-# skip tests trying to access google.com
-py.test -k "not not_intercepted" build/
+export WSGI_INTERCEPT_SKIP_NETWORK=true
+%pytest
 
 %files %{python_files}
-%defattr(-,root,root,-)
 %{python_sitelib}/wsgi_intercept-%{version}-py%{py_ver}.egg-info
 %{python_sitelib}/wsgi_intercept
 

++++++ wsgi_intercept-1.5.0.tar.gz -> wsgi_intercept-1.9.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/Makefile 
new/wsgi_intercept-1.9.2/Makefile
--- old/wsgi_intercept-1.5.0/Makefile   2016-09-23 13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.9.2/Makefile   2020-02-05 12:08:46.000000000 +0100
@@ -36,7 +36,8 @@
        git push origin master --tags
 
 pypi:
-       python setup.py sdist upload
+       python3 setup.py sdist bdist_wheel
+       twine upload -s dist/*
 
 docs:
        tox -edocs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/PKG-INFO 
new/wsgi_intercept-1.9.2/PKG-INFO
--- old/wsgi_intercept-1.5.0/PKG-INFO   2017-03-06 18:49:49.000000000 +0100
+++ new/wsgi_intercept-1.9.2/PKG-INFO   2020-02-05 12:15:55.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: wsgi_intercept
-Version: 1.5.0
+Version: 1.9.2
 Summary: wsgi_intercept installs a WSGI application in place of a real URI for 
testing.
 Home-page: http://pypi.python.org/pypi/wsgi_intercept
 Author: Titus Brown, Kumar McMillan, Chris Dent, Sasha Hart
@@ -22,7 +22,7 @@
         ==================
         
         ``wsgi_intercept`` works with a variety of HTTP clients in Python 2.7,
-        3.3 and beyond, and in pypy.
+        3.5 and beyond, and in pypy.
         
         * urllib2
         * urllib.request
@@ -123,8 +123,8 @@
         The Python 2 version of wsgi-intercept was the result. Kumar McMillan
         later took over maintenance.
         
-        The current version is tested with Python 2.7, 3.3, 3.4, 3.5, 3.6, and 
pypy
-        and was assembled by `Chris Dent`_. Testing and documentation 
improvements
+        The current version is tested with Python 2.7, 3.5-3.8, and pypy and 
pypy3.
+        It was assembled by `Chris Dent`_. Testing and documentation 
improvements
         from `Sasha Hart`_.
         
         .. _"best Web testing framework":
@@ -154,9 +154,11 @@
 Classifier: Programming Language :: Python :: 2
 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
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: Topic :: Software Development :: Testing
+Provides-Extra: testing
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/README 
new/wsgi_intercept-1.9.2/README
--- old/wsgi_intercept-1.5.0/README     2017-03-06 18:49:42.000000000 +0100
+++ new/wsgi_intercept-1.9.2/README     2020-02-05 12:15:50.000000000 +0100
@@ -14,7 +14,7 @@
 ==================
 
 ``wsgi_intercept`` works with a variety of HTTP clients in Python 2.7,
-3.3 and beyond, and in pypy.
+3.5 and beyond, and in pypy.
 
 * urllib2
 * urllib.request
@@ -115,8 +115,8 @@
 The Python 2 version of wsgi-intercept was the result. Kumar McMillan
 later took over maintenance.
 
-The current version is tested with Python 2.7, 3.3, 3.4, 3.5, 3.6, and pypy
-and was assembled by `Chris Dent`_. Testing and documentation improvements
+The current version is tested with Python 2.7, 3.5-3.8, and pypy and pypy3.
+It was assembled by `Chris Dent`_. Testing and documentation improvements
 from `Sasha Hart`_.
 
 .. _"best Web testing framework":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/setup.cfg 
new/wsgi_intercept-1.9.2/setup.cfg
--- old/wsgi_intercept-1.5.0/setup.cfg  2017-03-06 18:49:49.000000000 +0100
+++ new/wsgi_intercept-1.9.2/setup.cfg  2020-02-05 12:15:55.000000000 +0100
@@ -4,8 +4,10 @@
 [flake8]
 ignore = E128,E127,E126
 
+[bdist_wheel]
+universal = 1
+
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/setup.py 
new/wsgi_intercept-1.9.2/setup.py
--- old/wsgi_intercept-1.5.0/setup.py   2017-03-06 18:42:37.000000000 +0100
+++ new/wsgi_intercept-1.9.2/setup.py   2020-02-05 12:13:22.000000000 +0100
@@ -1,7 +1,7 @@
 
 from setuptools import setup, find_packages
 
-VERSION = '1.5.0'
+VERSION = '1.9.2'
 
 CLASSIFIERS = """
 Environment :: Web Environment
@@ -11,10 +11,10 @@
 Programming Language :: Python :: 2
 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
+Programming Language :: Python :: 3.7
 Topic :: Internet :: WWW/HTTP :: WSGI
 Topic :: Software Development :: Testing
 """.strip().splitlines()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/wsgi_intercept/__init__.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/__init__.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/__init__.py 2017-03-06 
18:42:19.000000000 +0100
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/__init__.py 2020-02-05 
12:08:46.000000000 +0100
@@ -14,7 +14,7 @@
 ==================
 
 ``wsgi_intercept`` works with a variety of HTTP clients in Python 2.7,
-3.3 and beyond, and in pypy.
+3.5 and beyond, and in pypy.
 
 * urllib2
 * urllib.request
@@ -115,8 +115,8 @@
 The Python 2 version of wsgi-intercept was the result. Kumar McMillan
 later took over maintenance.
 
-The current version is tested with Python 2.7, 3.3, 3.4, 3.5, 3.6, and pypy
-and was assembled by `Chris Dent`_. Testing and documentation improvements
+The current version is tested with Python 2.7, 3.5-3.8, and pypy and pypy3.
+It was assembled by `Chris Dent`_. Testing and documentation improvements
 from `Sasha Hart`_.
 
 .. _"best Web testing framework":
@@ -201,6 +201,7 @@
         key = (args[0], args[1])
         if key in _wsgi_intercept:
             del _wsgi_intercept[key]
+    return len(_wsgi_intercept)
 
 
 #
@@ -313,7 +314,7 @@
         "wsgi.version": (1, 0),
         "wsgi.url_scheme": "http",
         "wsgi.input": inp,  # to read for POSTs
-        "wsgi.errors": BytesIO(),
+        "wsgi.errors": sys.stderr,
         "wsgi.multithread": 0,
         "wsgi.multiprocess": 0,
         "wsgi.run_once": 0,
@@ -450,25 +451,6 @@
             raise WSGIAppError(error, sys.exc_info())
         self.result = iter(app_result)
 
-        # send the headers
-
-        for k, v in self.headers:
-            if STRICT_RESPONSE_HEADERS:
-                if not (isinstance(k, str) and isinstance(v, str)):
-                    raise TypeError(
-                        "Header has a key '%s' or value '%s' "
-                        "which is not a native str." % (k, v))
-            try:
-                k = k.encode('ISO-8859-1')
-            except AttributeError:
-                pass
-            try:
-                v = v.encode('ISO-8859-1')
-            except AttributeError:
-                pass
-            self.output.write(k + b': ' + v + b"\n")
-        self.output.write(b'\n')
-
         ###
 
         # read all of the results.  the trick here is to get the *first*
@@ -484,6 +466,25 @@
                 generator_data = next(self.result)
 
             finally:
+                # send the headers
+
+                for k, v in self.headers:
+                    if STRICT_RESPONSE_HEADERS:
+                        if not (isinstance(k, str) and isinstance(v, str)):
+                            raise TypeError(
+                                "Header has a key '%s' or value '%s' "
+                                "which is not a native str." % (k, v))
+                    try:
+                        k = k.encode('ISO-8859-1')
+                    except AttributeError:
+                        pass
+                    try:
+                        v = v.encode('ISO-8859-1')
+                    except AttributeError:
+                        pass
+                    self.output.write(k + b': ' + v + b"\n")
+                self.output.write(b'\n')
+
                 for data in self.write_results:
                     self.output.write(data)
 
@@ -622,6 +623,24 @@
             else:
                 try:
                     import ssl
+                    if hasattr(self, '_context'):
+                        self._context.check_hostname = self.assert_hostname
+                        self._check_hostname = self.assert_hostname     # Py3.6
+                        if hasattr(ssl, 'VerifyMode'):
+                            # Support for Python3.6 and higher
+                            if isinstance(self.cert_reqs, ssl.VerifyMode):
+                                self._context.verify_mode = self.cert_reqs
+                            else:
+                                self._context.verify_mode = ssl.VerifyMode[
+                                    self.cert_reqs]
+                        elif isinstance(self.cert_reqs, six.string_types):
+                            # Support for Python3.5 and below
+                            self._context.verify_mode = getattr(ssl,
+                                    self.cert_reqs,
+                                    self._context.verify_mode)
+                        else:
+                            self._context.verify_mode = self.cert_reqs
+
                     if not hasattr(self, 'key_file'):
                         self.key_file = None
                     if not hasattr(self, 'cert_file'):
@@ -639,7 +658,8 @@
                             else:
                                 self._check_hostname = self.check_hostname
                 except (ImportError, AttributeError):
-                    pass
+                    import traceback
+                    traceback.print_exc()
                 HTTPSConnection.connect(self)
 
         except Exception:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/wsgi_intercept/_urllib3.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/_urllib3.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/_urllib3.py 2016-09-23 
13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/_urllib3.py 2020-02-05 
12:08:46.000000000 +0100
@@ -16,6 +16,7 @@
         def __init__(self, *args, **kwargs):
             if 'strict' in kwargs and sys.version_info > (3, 0):
                 kwargs.pop('strict')
+            kwargs.pop('socket_options', None)
             WSGI_HTTPConnection.__init__(self, *args, **kwargs)
             HTTPConnection.__init__(self, *args, **kwargs)
 
@@ -25,6 +26,8 @@
         def __init__(self, *args, **kwargs):
             if 'strict' in kwargs and sys.version_info > (3, 0):
                 kwargs.pop('strict')
+            kwargs.pop('socket_options', None)
+            kwargs.pop('key_password', None)
             WSGI_HTTPSConnection.__init__(self, *args, **kwargs)
             HTTPSConnection.__init__(self, *args, **kwargs)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/httplib2_intercept.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/httplib2_intercept.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/httplib2_intercept.py       
2017-03-05 14:07:19.000000000 +0100
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/httplib2_intercept.py       
2020-02-05 12:08:46.000000000 +0100
@@ -32,8 +32,7 @@
         HTTPSConnectionWithTimeout):
     def __init__(self, host, port=None, strict=None, timeout=None,
             proxy_info=None, ca_certs=None, source_address=None,
-            disable_ssl_certificate_validation=False,
-            ssl_version=None):
+            **kwargs):
 
         # ignore proxy_info and ca_certs
         # In Python3 strict is deprecated
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/wsgi_intercept/interceptor.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/interceptor.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/interceptor.py      2016-09-13 
17:23:37.000000000 +0200
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/interceptor.py      2020-02-05 
12:08:46.000000000 +0100
@@ -91,7 +91,13 @@
                                           script_name=self.script_name)
 
     def uninstall_intercept(self):
-        wsgi_intercept.remove_wsgi_intercept(self.host, self.port)
+        remaining = wsgi_intercept.remove_wsgi_intercept(self.host, self.port)
+        # Only remove the module's class overrides if there are no intercepts
+        # left. Otherwise nested context managers cannot work.
+        if not remaining:
+            self.uninstall_module()
+
+    def uninstall_module(self):
         self._module.uninstall()
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_httplib2.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_httplib2.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_httplib2.py      
2016-09-23 13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_httplib2.py      
2020-02-05 12:08:46.000000000 +0100
@@ -42,10 +42,9 @@
 
 def test_bogus_domain():
     with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
-        py.test.raises(
-            gaierror,
-            'httplib2_intercept.HTTP_WSGIInterceptorWithTimeout('
-            '"_nonexistant_domain_").connect()')
+        with py.test.raises(gaierror):
+            httplib2_intercept.HTTP_WSGIInterceptorWithTimeout(
+                    "_nonexistant_domain_").connect()
 
 
 def test_proxy_handling():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_interceptor.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_interceptor.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_interceptor.py   
2016-09-23 13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_interceptor.py   
2020-02-05 12:08:46.000000000 +0100
@@ -266,3 +266,34 @@
     # outside the context manager the intercept does not work
     with py.test.raises(URLError):
         urlopen(url)
+
+
+def test_double_nested_context_interceptor():
+    hostname = str(uuid4())
+    url1 = 'http://%s:%s/' % (hostname, 9998)
+    url2 = 'http://%s:%s/' % (hostname, 9999)
+
+    with Urllib3Interceptor(app=app, url=url1):
+        with Urllib3Interceptor(app=app, url=url2):
+
+            response = httppool.request('GET', url1)
+            assert response.status == 200
+            assert 'WSGI intercept successful!' in str(response.data)
+
+            response = httppool.request('GET', url2)
+            assert response.status == 200
+            assert 'WSGI intercept successful!' in str(response.data)
+
+        response = httppool.request('GET', url1)
+        assert response.status == 200
+        assert 'WSGI intercept successful!' in str(response.data)
+
+        # outside the inner context manager url2 does not work
+        with py.test.raises(urllib3.exceptions.HTTPError):
+            httppool.request('GET', url2, retries=False)
+
+    # outside both context managers neither url works
+    with py.test.raises(urllib3.exceptions.HTTPError):
+        httppool.request('GET', url2, retries=False)
+    with py.test.raises(urllib3.exceptions.HTTPError):
+        httppool.request('GET', url1, retries=False)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_requests.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_requests.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_requests.py      
2016-09-23 13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_requests.py      
2020-02-05 12:08:46.000000000 +0100
@@ -36,9 +36,8 @@
 
 def test_bogus_domain():
     with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
-        py.test.raises(
-            ConnectionError,
-            'requests.get("http://_nonexistant_domain_";)')
+        with py.test.raises(ConnectionError):
+            requests.get("http://_nonexistant_domain_";)
 
 
 def test_proxy_handling():
@@ -60,6 +59,22 @@
         assert app.success()
 
 
+def test_https_no_ssl_verification_intercepted():
+    with InstalledApp(wsgi_app.simple_app, host=HOST, port=443) as app:
+        resp = requests.get('https://some_hopefully_nonexistant_domain:443/',
+                            verify=False)
+        assert resp.content == b'WSGI intercept successful!\n'
+        assert app.success()
+
+
+@skipnetwork
+def test_https_no_ssl_verification_not_intercepted():
+    with InstalledApp(wsgi_app.simple_app, host=HOST, port=443) as app:
+        resp = requests.get('https://self-signed.badssl.com/', verify=False)
+        assert resp.status_code >= 200 and resp.status_code < 300
+        assert not app.success()
+
+
 def test_https_default_port():
     with InstalledApp(wsgi_app.simple_app, host=HOST, port=443) as app:
         resp = requests.get('https://some_hopefully_nonexistant_domain/')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_response_headers.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_response_headers.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_response_headers.py      
2017-03-06 18:41:21.000000000 +0100
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_response_headers.py      
2020-02-05 12:08:46.000000000 +0100
@@ -77,8 +77,8 @@
         with py.test.raises(TypeError) as error:
             response = requests.get(url)
 
-        assert (str(error.value) ==
-            "Header has a key '%s' or value '%s' "
+        assert (
+            str(error.value) == "Header has a key '%s' or value '%s' "
             "which is not a native str." % (header_key, header_value))
 
         # When False, other types of strings are okay.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_urllib3.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_urllib3.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_urllib3.py       
2016-09-23 13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_urllib3.py       
2020-02-05 12:08:46.000000000 +0100
@@ -38,10 +38,8 @@
 
 def test_bogus_domain():
     with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
-        py.test.raises(
-            urllib3.exceptions.ProtocolError,
-            'http.request("GET", "http://_nonexistant_domain_";, '
-            'retries=False)')
+        with py.test.raises(urllib3.exceptions.ProtocolError):
+            http.request("GET", "http://_nonexistant_domain_";, retries=False)
 
 
 def test_proxy_handling():
@@ -74,6 +72,14 @@
         assert environ['wsgi.url_scheme'] == 'https'
 
 
+def test_socket_options():
+    http = urllib3.PoolManager(socket_options=[])
+    with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
+        http.request('GET', 'http://some_hopefully_nonexistant_domain/')
+    with InstalledApp(wsgi_app.simple_app, host=HOST, port=443):
+        http.request('GET', 'https://some_hopefully_nonexistant_domain/')
+
+
 def test_app_error():
     with InstalledApp(wsgi_app.raises_app, host=HOST, port=80):
         with py.test.raises(WSGIAppError):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_wsgi_compliance.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_wsgi_compliance.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/test_wsgi_compliance.py       
2017-03-06 18:41:21.000000000 +0100
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/test_wsgi_compliance.py       
2020-02-05 12:08:46.000000000 +0100
@@ -114,3 +114,13 @@
             'http://some_hopefully_nonexistant_domain/', 'GET')
         assert app.success()
         assert content == b'second'
+
+
+def test_generator():
+    with InstalledApp(wsgi_app.generator_app, host=HOST) as app:
+        http = httplib2.Http()
+        resp, content = http.request(
+            'http://some_hopefully_nonexistant_domain/', 'GET')
+        assert app.success()
+        assert resp.get('content-type') == 'text/plain'
+        assert content == b'First generated line\nSecond generated line\n'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept/tests/wsgi_app.py 
new/wsgi_intercept-1.9.2/wsgi_intercept/tests/wsgi_app.py
--- old/wsgi_intercept-1.5.0/wsgi_intercept/tests/wsgi_app.py   2017-03-06 
18:41:21.000000000 +0100
+++ new/wsgi_intercept-1.9.2/wsgi_intercept/tests/wsgi_app.py   2020-02-05 
12:08:46.000000000 +0100
@@ -37,3 +37,9 @@
 def empty_string_app(environ, start_response):
     start_response('200 OK', [('Content-type', 'text/plain')])
     return [b'', b'second']
+
+
+def generator_app(environ, start_response):
+    start_response('200 OK', [('Content-type', 'text/plain')])
+    yield b'First generated line\n'
+    yield b'Second generated line\n'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wsgi_intercept-1.5.0/wsgi_intercept.egg-info/PKG-INFO 
new/wsgi_intercept-1.9.2/wsgi_intercept.egg-info/PKG-INFO
--- old/wsgi_intercept-1.5.0/wsgi_intercept.egg-info/PKG-INFO   2017-03-06 
18:49:48.000000000 +0100
+++ new/wsgi_intercept-1.9.2/wsgi_intercept.egg-info/PKG-INFO   2020-02-05 
12:15:55.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: wsgi-intercept
-Version: 1.5.0
+Version: 1.9.2
 Summary: wsgi_intercept installs a WSGI application in place of a real URI for 
testing.
 Home-page: http://pypi.python.org/pypi/wsgi_intercept
 Author: Titus Brown, Kumar McMillan, Chris Dent, Sasha Hart
@@ -22,7 +22,7 @@
         ==================
         
         ``wsgi_intercept`` works with a variety of HTTP clients in Python 2.7,
-        3.3 and beyond, and in pypy.
+        3.5 and beyond, and in pypy.
         
         * urllib2
         * urllib.request
@@ -123,8 +123,8 @@
         The Python 2 version of wsgi-intercept was the result. Kumar McMillan
         later took over maintenance.
         
-        The current version is tested with Python 2.7, 3.3, 3.4, 3.5, 3.6, and 
pypy
-        and was assembled by `Chris Dent`_. Testing and documentation 
improvements
+        The current version is tested with Python 2.7, 3.5-3.8, and pypy and 
pypy3.
+        It was assembled by `Chris Dent`_. Testing and documentation 
improvements
         from `Sasha Hart`_.
         
         .. _"best Web testing framework":
@@ -154,9 +154,11 @@
 Classifier: Programming Language :: Python :: 2
 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
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: Topic :: Software Development :: Testing
+Provides-Extra: testing
+Provides-Extra: docs


Reply via email to