Hello community,

here is the log from the commit of package python-wsgi_intercept for 
openSUSE:Factory checked in at 2019-03-11 11:15:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-wsgi_intercept (Old)
 and      /work/SRC/openSUSE:Factory/.python-wsgi_intercept.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-wsgi_intercept"

Mon Mar 11 11:15:13 2019 rev:18 rq:682995 version:1.8.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-wsgi_intercept/python-wsgi_intercept.changes  
    2019-01-15 09:17:40.906162499 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-wsgi_intercept.new.28833/python-wsgi_intercept.changes
   2019-03-11 11:15:22.165340271 +0100
@@ -1,0 +2,18 @@
+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
+
+-------------------------------------------------------------------

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

New:
----
  wsgi_intercept-1.8.0.tar.gz

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

Other differences:
------------------
++++++ python-wsgi_intercept.spec ++++++
--- /var/tmp/diff_new_pack.pOin31/_old  2019-03-11 11:15:22.981339978 +0100
+++ /var/tmp/diff_new_pack.pOin31/_new  2019-03-11 11:15:22.981339978 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-wsgi_intercept
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-wsgi_intercept
-Version:        1.5.0
+Version:        1.8.0
 Release:        0
 Summary:        Installs 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
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 # Test requirements:
@@ -35,13 +33,13 @@
 BuildRequires:  %{python_module requests >= 2.0.1}
 BuildRequires:  %{python_module six}
 BuildRequires:  %{python_module urllib3 >= 1.11.0}
+BuildRequires:  fdupes
 Requires:       python-six
 %if 0%{?_no_weakdeps}
 Requires:       python-requests >= 2.0.1
 %else
 Recommends:     python-requests >= 2.0.1
 %endif
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
 %python_subpackages
@@ -64,14 +62,14 @@
 
 %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
+%python_exec -m pytest --ignore _build.python2 --ignore _build.python3
 
 %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.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/Makefile 
new/wsgi_intercept-1.8.0/Makefile
--- old/wsgi_intercept-1.5.0/Makefile   2016-09-23 13:57:20.000000000 +0200
+++ new/wsgi_intercept-1.8.0/Makefile   2018-07-06 13:21:51.000000000 +0200
@@ -36,7 +36,7 @@
        git push origin master --tags
 
 pypi:
-       python setup.py sdist upload
+       python setup.py sdist bdist_wheel upload --sign
 
 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.8.0/PKG-INFO
--- old/wsgi_intercept-1.5.0/PKG-INFO   2017-03-06 18:49:49.000000000 +0100
+++ new/wsgi_intercept-1.8.0/PKG-INFO   2018-07-06 13:24:09.000000000 +0200
@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Name: wsgi_intercept
-Version: 1.5.0
+Version: 1.8.0
 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
 Author-email: [email protected]
 License: MIT License
+Description-Content-Type: UNKNOWN
 Description: Installs a WSGI application in place of a real host for testing.
         
         Introduction
@@ -22,7 +23,7 @@
         ==================
         
         ``wsgi_intercept`` works with a variety of HTTP clients in Python 2.7,
-        3.3 and beyond, and in pypy.
+        3.4 and beyond, and in pypy.
         
         * urllib2
         * urllib.request
@@ -123,7 +124,7 @@
         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
+        The current version is tested with Python 2.7, 3.4, 3.5, 3.6, and pypy
         and was assembled by `Chris Dent`_. Testing and documentation 
improvements
         from `Sasha Hart`_.
         
@@ -154,7 +155,6 @@
 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/README 
new/wsgi_intercept-1.8.0/README
--- old/wsgi_intercept-1.5.0/README     2017-03-06 18:49:42.000000000 +0100
+++ new/wsgi_intercept-1.8.0/README     2018-07-06 13:24:00.000000000 +0200
@@ -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.4 and beyond, and in pypy.
 
 * urllib2
 * urllib.request
@@ -115,7 +115,7 @@
 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
+The current version is tested with Python 2.7, 3.4, 3.5, 3.6, and pypy
 and was assembled by `Chris Dent`_. Testing and documentation improvements
 from `Sasha Hart`_.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/setup.cfg 
new/wsgi_intercept-1.8.0/setup.cfg
--- old/wsgi_intercept-1.5.0/setup.cfg  2017-03-06 18:49:49.000000000 +0100
+++ new/wsgi_intercept-1.8.0/setup.cfg  2018-07-06 13:24:09.000000000 +0200
@@ -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.8.0/setup.py
--- old/wsgi_intercept-1.5.0/setup.py   2017-03-06 18:42:37.000000000 +0100
+++ new/wsgi_intercept-1.8.0/setup.py   2018-07-06 13:21:51.000000000 +0200
@@ -1,7 +1,7 @@
 
 from setuptools import setup, find_packages
 
-VERSION = '1.5.0'
+VERSION = '1.8.0'
 
 CLASSIFIERS = """
 Environment :: Web Environment
@@ -11,7 +11,6 @@
 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/wsgi_intercept/__init__.py 
new/wsgi_intercept-1.8.0/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.8.0/wsgi_intercept/__init__.py 2018-07-06 
13:21:51.000000000 +0200
@@ -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.4 and beyond, and in pypy.
 
 * urllib2
 * urllib.request
@@ -115,7 +115,7 @@
 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
+The current version is tested with Python 2.7, 3.4, 3.5, 3.6, and pypy
 and was assembled by `Chris Dent`_. Testing and documentation improvements
 from `Sasha Hart`_.
 
@@ -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,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wsgi_intercept-1.5.0/wsgi_intercept/_urllib3.py 
new/wsgi_intercept-1.8.0/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.8.0/wsgi_intercept/_urllib3.py 2017-09-26 
00:14:59.000000000 +0200
@@ -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,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_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/interceptor.py 
new/wsgi_intercept-1.8.0/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.8.0/wsgi_intercept/interceptor.py      2018-07-06 
13:21:51.000000000 +0200
@@ -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_interceptor.py 
new/wsgi_intercept-1.8.0/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.8.0/wsgi_intercept/tests/test_interceptor.py   
2018-07-06 13:21:51.000000000 +0200
@@ -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_urllib3.py 
new/wsgi_intercept-1.8.0/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.8.0/wsgi_intercept/tests/test_urllib3.py       
2017-09-26 00:14:59.000000000 +0200
@@ -74,6 +74,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.egg-info/PKG-INFO 
new/wsgi_intercept-1.8.0/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.8.0/wsgi_intercept.egg-info/PKG-INFO   2018-07-06 
13:24:09.000000000 +0200
@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Name: wsgi-intercept
-Version: 1.5.0
+Version: 1.8.0
 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
 Author-email: [email protected]
 License: MIT License
+Description-Content-Type: UNKNOWN
 Description: Installs a WSGI application in place of a real host for testing.
         
         Introduction
@@ -22,7 +23,7 @@
         ==================
         
         ``wsgi_intercept`` works with a variety of HTTP clients in Python 2.7,
-        3.3 and beyond, and in pypy.
+        3.4 and beyond, and in pypy.
         
         * urllib2
         * urllib.request
@@ -123,7 +124,7 @@
         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
+        The current version is tested with Python 2.7, 3.4, 3.5, 3.6, and pypy
         and was assembled by `Chris Dent`_. Testing and documentation 
improvements
         from `Sasha Hart`_.
         
@@ -154,7 +155,6 @@
 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


Reply via email to