Hello community,

here is the log from the commit of package python-Paste for openSUSE:Factory 
checked in at 2019-11-04 17:04:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Paste (Old)
 and      /work/SRC/openSUSE:Factory/.python-Paste.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Paste"

Mon Nov  4 17:04:30 2019 rev:24 rq:735885 version:3.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Paste/python-Paste.changes        
2019-09-30 15:55:06.709901178 +0200
+++ /work/SRC/openSUSE:Factory/.python-Paste.new.2990/python-Paste.changes      
2019-11-04 17:04:31.980141043 +0100
@@ -1,0 +2,6 @@
+Mon Oct  7 14:54:45 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 3.2.1:
+  * no changelog
+
+-------------------------------------------------------------------

Old:
----
  Paste-3.2.0.tar.gz

New:
----
  Paste-3.2.1.tar.gz

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

Other differences:
------------------
++++++ python-Paste.spec ++++++
--- /var/tmp/diff_new_pack.4OC0C1/_old  2019-11-04 17:04:32.700141813 +0100
+++ /var/tmp/diff_new_pack.4OC0C1/_new  2019-11-04 17:04:32.704141817 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define oldpython python
 Name:           python-Paste
-Version:        3.2.0
+Version:        3.2.1
 Release:        0
 Summary:        Tools for using a Web Server Gateway Interface stack
 License:        MIT

++++++ Paste-3.2.0.tar.gz -> Paste-3.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/PKG-INFO new/Paste-3.2.1/PKG-INFO
--- old/Paste-3.2.0/PKG-INFO    2019-09-05 12:31:04.000000000 +0200
+++ new/Paste-3.2.1/PKG-INFO    2019-09-25 14:32:20.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Paste
-Version: 3.2.0
+Version: 3.2.1
 Summary: Tools for using a Web Server Gateway Interface stack
 Home-page: https://pythonpaste.readthedocs.io/
 Author: Chris Dent
@@ -130,8 +130,8 @@
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
 Classifier: Framework :: Paste
-Provides-Extra: openid
-Provides-Extra: Flup
 Provides-Extra: hotshot
 Provides-Extra: subprocess
+Provides-Extra: openid
 Provides-Extra: Paste
+Provides-Extra: Flup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/Paste.egg-info/PKG-INFO 
new/Paste-3.2.1/Paste.egg-info/PKG-INFO
--- old/Paste-3.2.0/Paste.egg-info/PKG-INFO     2019-09-05 12:31:04.000000000 
+0200
+++ new/Paste-3.2.1/Paste.egg-info/PKG-INFO     2019-09-25 14:32:19.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Paste
-Version: 3.2.0
+Version: 3.2.1
 Summary: Tools for using a Web Server Gateway Interface stack
 Home-page: https://pythonpaste.readthedocs.io/
 Author: Chris Dent
@@ -130,8 +130,8 @@
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
 Classifier: Framework :: Paste
-Provides-Extra: openid
-Provides-Extra: Flup
 Provides-Extra: hotshot
 Provides-Extra: subprocess
+Provides-Extra: openid
 Provides-Extra: Paste
+Provides-Extra: Flup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/docs/news.txt 
new/Paste-3.2.1/docs/news.txt
--- old/Paste-3.2.0/docs/news.txt       2019-09-05 12:27:36.000000000 +0200
+++ new/Paste-3.2.1/docs/news.txt       2019-09-25 14:29:52.000000000 +0200
@@ -3,6 +3,11 @@
 
 .. contents::
 
+3.2.1
+-----
+
+* Handle io.UnsupportedOperation from socket.tell()
+
 3.2.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/paste/httpserver.py 
new/Paste-3.2.1/paste/httpserver.py
--- old/Paste-3.2.0/paste/httpserver.py 2019-09-05 12:21:52.000000000 +0200
+++ new/Paste-3.2.1/paste/httpserver.py 2019-09-25 14:27:36.000000000 +0200
@@ -20,6 +20,7 @@
 from __future__ import print_function
 import atexit
 import traceback
+import io
 import socket, sys, threading
 import posixpath
 import six
@@ -523,9 +524,11 @@
 
     def tell(self):
         if hasattr(self.file, 'tell'):
-            return self.file.tell()
-        else:
-            return self._consumed
+            try:
+                return self.file.tell()
+            except io.UnsupportedOperation:
+                pass
+        return self._consumed
 
 class ThreadPool(object):
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/paste/request.py 
new/Paste-3.2.1/paste/request.py
--- old/Paste-3.2.0/paste/request.py    2019-09-05 12:21:52.000000000 +0200
+++ new/Paste-3.2.1/paste/request.py    2019-09-25 14:27:36.000000000 +0200
@@ -161,51 +161,40 @@
             return parsed
     # @@: Shouldn't bother FieldStorage parsing during GET/HEAD and
     # fake_out_cgi requests
-    type = environ.get('CONTENT_TYPE', '').lower()
-    if ';' in type:
-        type = type.split(';', 1)[0]
-    fake_out_cgi = type not in ('', 'application/x-www-form-urlencoded',
+    formvars = MultiDict()
+    ct = environ.get('CONTENT_TYPE', '').partition(';')[0].lower()
+    use_cgi = ct in ('', 'application/x-www-form-urlencoded',
                                 'multipart/form-data')
     # FieldStorage assumes a default CONTENT_LENGTH of -1, but a
     # default of 0 is better:
     if not environ.get('CONTENT_LENGTH'):
         environ['CONTENT_LENGTH'] = '0'
-    # Prevent FieldStorage from parsing QUERY_STRING during GET/HEAD
-    # requests
-    old_query_string = environ.get('QUERY_STRING','')
-    environ['QUERY_STRING'] = ''
-    if fake_out_cgi:
-        input = six.BytesIO(b'')
-        old_content_type = environ.get('CONTENT_TYPE')
-        old_content_length = environ.get('CONTENT_LENGTH')
-        environ['CONTENT_LENGTH'] = '0'
-        environ['CONTENT_TYPE'] = ''
-    else:
-        input = environ['wsgi.input']
-    kwparms = {}
-    if six.PY3:
-        if encoding:
-            kwparms['encoding'] = encoding
-        if errors:
-            kwparms['errors'] = errors
-    fs = cgi.FieldStorage(fp=input,
-                          environ=environ,
-                          keep_blank_values=1,
-                          **kwparms)
-    environ['QUERY_STRING'] = old_query_string
-    if fake_out_cgi:
-        environ['CONTENT_TYPE'] = old_content_type
-        environ['CONTENT_LENGTH'] = old_content_length
-    formvars = MultiDict()
-    if isinstance(fs.value, list):
-        for name in fs.keys():
-            values = fs[name]
-            if not isinstance(values, list):
-                values = [values]
-            for value in values:
-                if not value.filename:
-                    value = value.value
-                formvars.add(name, value)
+    if use_cgi:
+        # Prevent FieldStorage from parsing QUERY_STRING during GET/HEAD
+        # requests
+        old_query_string = environ.get('QUERY_STRING','')
+        environ['QUERY_STRING'] = ''
+        inp = environ['wsgi.input']
+        kwparms = {}
+        if six.PY3:
+            if encoding:
+                kwparms['encoding'] = encoding
+            if errors:
+                kwparms['errors'] = errors
+        fs = cgi.FieldStorage(fp=inp,
+                              environ=environ,
+                              keep_blank_values=True,
+                              **kwparms)
+        environ['QUERY_STRING'] = old_query_string
+        if isinstance(fs.value, list):
+            for name in fs.keys():
+                values = fs[name]
+                if not isinstance(values, list):
+                    values = [values]
+                for value in values:
+                    if not value.filename:
+                        value = value.value
+                    formvars.add(name, value)
     environ['paste.parsed_formvars'] = (formvars, source)
     if include_get_vars:
         formvars.update(parse_querystring(environ))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/setup.py new/Paste-3.2.1/setup.py
--- old/Paste-3.2.0/setup.py    2019-09-05 12:22:38.000000000 +0200
+++ new/Paste-3.2.1/setup.py    2019-09-25 14:29:30.000000000 +0200
@@ -12,7 +12,7 @@
 # - git push
 # - python setup.py sdist bdist_wheel upload --sign
 
-__version__ = '3.2.0'
+__version__ = '3.2.1'
 
 from setuptools import setup, find_packages
 import sys, os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Paste-3.2.0/tests/test_httpserver.py 
new/Paste-3.2.1/tests/test_httpserver.py
--- old/Paste-3.2.0/tests/test_httpserver.py    2019-09-05 12:21:52.000000000 
+0200
+++ new/Paste-3.2.1/tests/test_httpserver.py    2019-09-25 14:27:36.000000000 
+0200
@@ -1,5 +1,8 @@
 import email
 import io
+import socket
+
+import six
 
 from paste.httpserver import LimitedLengthFile, WSGIHandler
 from six.moves import StringIO
@@ -49,5 +52,23 @@
 def test_limited_length_file():
     backing = io.BytesIO(b'0123456789')
     f = LimitedLengthFile(backing, 9)
+    assert f.tell() == 0
     assert f.read() == b'012345678'
+    assert f.tell() == 9
     assert f.read() == b''
+
+def test_limited_length_file_tell_on_socket():
+    backing_read, backing_write = socket.socketpair()
+    if six.PY2:
+        # On Python 2, socketpair() returns an internal socket type rather than
+        # the public one.
+        backing_read = socket.socket(_sock=backing_read)
+    f = LimitedLengthFile(backing_read.makefile('rb'), 10)
+    backing_write.send(b'0123456789')
+    backing_write.close()
+    assert f.tell() == 0
+    assert f.read(1) == b'0'
+    assert f.tell() == 1
+    assert f.read() == b'123456789'
+    assert f.tell() == 10
+    backing_read.close()


Reply via email to