Hello community,

here is the log from the commit of package python-Paste for openSUSE:Factory 
checked in at 2019-08-06 15:07:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Paste (Old)
 and      /work/SRC/openSUSE:Factory/.python-Paste.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Paste"

Tue Aug  6 15:07:51 2019 rev:22 rq:719517 version:3.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Paste/python-Paste.changes        
2019-03-12 09:45:40.343630663 +0100
+++ /work/SRC/openSUSE:Factory/.python-Paste.new.4126/python-Paste.changes      
2019-08-06 15:07:53.263870920 +0200
@@ -1,0 +2,7 @@
+Mon Jul 29 07:45:13 UTC 2019 - [email protected]
+
+- version update to 3.1.0
+  * Allow anything that can read() for a file-like response, not just
+    a ``file`` instance.
+
+-------------------------------------------------------------------

Old:
----
  Paste-3.0.8.tar.gz

New:
----
  Paste-3.1.0.tar.gz

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

Other differences:
------------------
++++++ python-Paste.spec ++++++
--- /var/tmp/diff_new_pack.HmXkBW/_old  2019-08-06 15:07:53.783870574 +0200
+++ /var/tmp/diff_new_pack.HmXkBW/_new  2019-08-06 15:07:53.787870571 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define oldpython python
 Name:           python-Paste
-Version:        3.0.8
+Version:        3.1.0
 Release:        0
 Summary:        Tools for using a Web Server Gateway Interface stack
 License:        MIT

++++++ Paste-3.0.8.tar.gz -> Paste-3.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/PKG-INFO new/Paste-3.1.0/PKG-INFO
--- old/Paste-3.0.8/PKG-INFO    2019-03-07 11:59:41.000000000 +0100
+++ new/Paste-3.1.0/PKG-INFO    2019-07-24 12:54:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Paste
-Version: 3.0.8
+Version: 3.1.0
 Summary: Tools for using a Web Server Gateway Interface stack
 Home-page: https://pythonpaste.readthedocs.io/
 Author: Chris Dent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/Paste.egg-info/PKG-INFO 
new/Paste-3.1.0/Paste.egg-info/PKG-INFO
--- old/Paste-3.0.8/Paste.egg-info/PKG-INFO     2019-03-07 11:59:41.000000000 
+0100
+++ new/Paste-3.1.0/Paste.egg-info/PKG-INFO     2019-07-24 12:54:34.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Paste
-Version: 3.0.8
+Version: 3.1.0
 Summary: Tools for using a Web Server Gateway Interface stack
 Home-page: https://pythonpaste.readthedocs.io/
 Author: Chris Dent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/docs/news.txt 
new/Paste-3.1.0/docs/news.txt
--- old/Paste-3.0.8/docs/news.txt       2019-03-07 11:54:28.000000000 +0100
+++ new/Paste-3.1.0/docs/news.txt       2019-07-24 12:51:47.000000000 +0200
@@ -3,6 +3,12 @@
 
 .. contents::
 
+3.1.0
+-----
+
+* Allow anything that can read() for a file-like response, not just
+  a ``file`` instance.
+
 3.0.8
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/paste/request.py 
new/Paste-3.1.0/paste/request.py
--- old/Paste-3.0.8/paste/request.py    2019-02-28 16:09:41.000000000 +0100
+++ new/Paste-3.1.0/paste/request.py    2019-07-24 12:46:25.000000000 +0200
@@ -30,7 +30,7 @@
 try:
     from UserDict import DictMixin
 except ImportError:
-    from collections import MutableMapping as DictMixin
+    from collections.abc import MutableMapping as DictMixin
 import six
 
 from paste.util.multidict import MultiDict
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/paste/urlmap.py 
new/Paste-3.1.0/paste/urlmap.py
--- old/Paste-3.0.8/paste/urlmap.py     2019-02-28 16:09:41.000000000 +0100
+++ new/Paste-3.1.0/paste/urlmap.py     2019-07-24 12:46:25.000000000 +0200
@@ -9,7 +9,7 @@
 from paste.util import html
 try:
     # Python 3
-    from collections import MutableMapping as DictMixin
+    from collections.abc import MutableMapping as DictMixin
 except ImportError:
     # Python 2
     from UserDict import DictMixin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/paste/util/multidict.py 
new/Paste-3.1.0/paste/util/multidict.py
--- old/Paste-3.0.8/paste/util/multidict.py     2019-02-28 16:09:41.000000000 
+0100
+++ new/Paste-3.1.0/paste/util/multidict.py     2019-07-24 12:46:25.000000000 
+0200
@@ -7,7 +7,7 @@
 
 try:
     # Python 3
-    from collections import MutableMapping as DictMixin
+    from collections.abc import MutableMapping as DictMixin
 except ImportError:
     # Python 2
     from UserDict import DictMixin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/paste/wsgiwrappers.py 
new/Paste-3.1.0/paste/wsgiwrappers.py
--- old/Paste-3.0.8/paste/wsgiwrappers.py       2019-02-28 16:09:41.000000000 
+0100
+++ new/Paste-3.1.0/paste/wsgiwrappers.py       2019-07-24 12:46:25.000000000 
+0200
@@ -360,11 +360,11 @@
         for c in self.cookies.values():
             response_headers.append(('Set-Cookie', c.output(header='')))
         start_response(status, response_headers)
-        is_file = isinstance(self.content, file)
+        is_file = hasattr(self.content, 'read')
         if 'wsgi.file_wrapper' in environ and is_file:
             return environ['wsgi.file_wrapper'](self.content)
         elif is_file:
-            return iter(lambda: self.content.read(), '')
+            return iter(lambda: self.content.read(), b'')
         return self.get_content()
 
     def determine_charset(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/setup.py new/Paste-3.1.0/setup.py
--- old/Paste-3.0.8/setup.py    2019-03-07 11:53:15.000000000 +0100
+++ new/Paste-3.1.0/setup.py    2019-07-24 12:48:35.000000000 +0200
@@ -12,7 +12,7 @@
 # - git push
 # - python setup.py sdist bdist_wheel upload --sign
 
-__version__ = '3.0.8'
+__version__ = '3.1.0'
 
 from setuptools import setup, find_packages
 import sys, os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.0.8/tests/test_wsgiwrappers.py 
new/Paste-3.1.0/tests/test_wsgiwrappers.py
--- old/Paste-3.0.8/tests/test_wsgiwrappers.py  2019-02-28 16:09:41.000000000 
+0100
+++ new/Paste-3.1.0/tests/test_wsgiwrappers.py  2019-07-24 12:46:25.000000000 
+0200
@@ -2,6 +2,7 @@
 # (c) 2007 Philip Jenvey; written for Paste (http://pythonpaste.org)
 # Licensed under the MIT license: 
http://www.opensource.org/licenses/mit-license.php
 import cgi
+import io
 from paste.fixture import TestApp
 from paste.wsgiwrappers import WSGIRequest, WSGIResponse
 import six
@@ -144,3 +145,19 @@
             assert isinstance(data, six.text_type)
     finally:
         WSGIResponse.defaults._pop_object()
+
+def test_call_wsgiresponse():
+    resp = WSGIResponse(b'some content', 'application/octet-stream')
+    def sp(status, response_headers):
+        assert status == '200 OK'
+        assert sorted(response_headers) == [
+            ('cache-control', 'no-cache'),
+            ('content-type', 'application/octet-stream'),
+        ]
+    assert resp({}, sp) == [b'some content']
+    f = io.BytesIO(b'some content')
+    resp = WSGIResponse(f, 'application/octet-stream')
+    assert list(resp({}, sp)) == [b'some content']
+    f = io.BytesIO()
+    resp = WSGIResponse(f, 'application/octet-stream')
+    assert resp({'wsgi.file_wrapper': lambda x: x}, sp) is f


Reply via email to