Hello community,

here is the log from the commit of package python-tornado for openSUSE:Factory 
checked in at 2011-11-25 11:13:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tornado (Old)
 and      /work/SRC/openSUSE:Factory/.python-tornado.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tornado", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tornado/python-tornado.changes    
2011-09-23 12:43:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-tornado.new/python-tornado.changes       
2011-11-25 10:13:59.000000000 +0100
@@ -1,0 +2,24 @@
+Tue Oct  4 23:57:09 UTC 2011 - [email protected]
+
+- Update to 2.1.1
+  Bug fixes:
+  - Fixed handling of closed connections with the epoll
+    (i.e. Linux) IOLoop. Previously, closed connections could be
+    shut down too early, which most often manifested as “Stream
+    is closed” exceptions in SimpleAsyncHTTPClient.
+  - Fixed a case in which chunked responses could be closed
+    prematurely, leading to truncated output.
+  - IOStream.connect now reports errors more consistently via
+    logging and the close callback (this affects e.g. connections
+    to localhost on FreeBSD).
+  - IOStream.read_bytes again accepts both int and long arguments.
+  - PeriodicCallback no longer runs repeatedly when IOLoop
+    iterations complete faster than the resolution of time.time()
+    (mainly a problem on Windows).
+  Backwards-compatibility note
+  - Listening for IOLoop.ERROR alone is no longer sufficient for
+    detecting closed connections on an otherwise unused socket.
+    IOLoop.ERROR must always be used in combination with READ or
+    WRITE.
+
+-------------------------------------------------------------------

Old:
----
  tornado-2.1.tar.bz2

New:
----
  tornado-2.1.1.tar.bz2

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

Other differences:
------------------
++++++ python-tornado.spec ++++++
--- /var/tmp/diff_new_pack.LLBKHh/_old  2011-11-25 10:14:00.000000000 +0100
+++ /var/tmp/diff_new_pack.LLBKHh/_new  2011-11-25 10:14:00.000000000 +0100
@@ -16,7 +16,7 @@
 #
 
 Name:           python-tornado
-Version:        2.1
+Version:        2.1.1
 Release:        0
 Url:            http://www.tornadoweb.org
 Summary:        Open source version of scalable, non-blocking web server that 
power FriendFeed

++++++ tornado-2.1.tar.bz2 -> tornado-2.1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/PKG-INFO new/tornado-2.1.1/PKG-INFO
--- old/tornado-2.1/PKG-INFO    2011-09-21 06:23:14.000000000 +0200
+++ new/tornado-2.1.1/PKG-INFO  2011-10-04 19:01:49.000000000 +0200
@@ -1,11 +1,11 @@
 Metadata-Version: 1.0
 Name: tornado
-Version: 2.1
+Version: 2.1.1
 Summary: Tornado is an open source version of the scalable, non-blocking web 
server and and tools that power FriendFeed
 Home-page: http://www.tornadoweb.org/
 Author: Facebook
 Author-email: [email protected]
 License: http://www.apache.org/licenses/LICENSE-2.0
-Download-URL: http://github.com/downloads/facebook/tornado/tornado-2.1.tar.gz
+Download-URL: http://github.com/downloads/facebook/tornado/tornado-2.1.1.tar.gz
 Description: UNKNOWN
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/setup.py new/tornado-2.1.1/setup.py
--- old/tornado-2.1/setup.py    2011-09-21 06:21:29.000000000 +0200
+++ new/tornado-2.1.1/setup.py  2011-10-04 18:59:37.000000000 +0200
@@ -33,7 +33,7 @@
     extensions.append(distutils.core.Extension(
         "tornado.epoll", ["tornado/epoll.c"]))
 
-version = "2.1"
+version = "2.1.1"
 
 if major >= 3:
     import setuptools  # setuptools is required for use_2to3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado/__init__.py 
new/tornado-2.1.1/tornado/__init__.py
--- old/tornado-2.1/tornado/__init__.py 2011-09-21 06:21:38.000000000 +0200
+++ new/tornado-2.1.1/tornado/__init__.py       2011-10-04 18:59:46.000000000 
+0200
@@ -16,5 +16,5 @@
 
 """The Tornado web server and tools."""
 
-version = "2.1"
-version_info = (2, 1, 0)
+version = "2.1.1"
+version_info = (2, 1, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado/httpserver.py 
new/tornado-2.1.1/tornado/httpserver.py
--- old/tornado-2.1/tornado/httpserver.py       2011-09-19 00:36:54.000000000 
+0200
+++ new/tornado-2.1.1/tornado/httpserver.py     2011-10-04 18:59:28.000000000 
+0200
@@ -190,7 +190,14 @@
             callback = self._write_callback
             self._write_callback = None
             callback()            
-        if self._request_finished:
+        # _on_write_complete is enqueued on the IOLoop whenever the
+        # IOStream's write buffer becomes empty, but it's possible for
+        # another callback that runs on the IOLoop before it to
+        # simultaneously write more data and finish the request.  If
+        # there is still data in the IOStream, a future
+        # _on_write_complete will be responsible for calling
+        # _finish_request.
+        if self._request_finished and not self.stream.writing():
             self._finish_request()
 
     def _finish_request(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado/ioloop.py 
new/tornado-2.1.1/tornado/ioloop.py
--- old/tornado-2.1/tornado/ioloop.py   2011-09-18 23:23:16.000000000 +0200
+++ new/tornado-2.1.1/tornado/ioloop.py 2011-10-04 18:59:28.000000000 +0200
@@ -102,7 +102,7 @@
     NONE = 0
     READ = _EPOLLIN
     WRITE = _EPOLLOUT
-    ERROR = _EPOLLERR | _EPOLLHUP | _EPOLLRDHUP
+    ERROR = _EPOLLERR | _EPOLLHUP
 
     def __init__(self, impl=None):
         self._impl = impl or _poll()
@@ -477,7 +477,7 @@
     def _schedule_next(self):
         if self._running:
             current_time = time.time()
-            while self._next_timeout < current_time:
+            while self._next_timeout <= current_time:
                 self._next_timeout += self.callback_time / 1000.0
             self.io_loop.add_timeout(self._next_timeout, self._run)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado/iostream.py 
new/tornado-2.1.1/tornado/iostream.py
--- old/tornado-2.1/tornado/iostream.py 2011-09-19 01:45:01.000000000 +0200
+++ new/tornado-2.1.1/tornado/iostream.py       2011-10-04 18:59:28.000000000 
+0200
@@ -119,9 +119,18 @@
         try:
             self.socket.connect(address)
         except socket.error, e:
-            # In non-blocking mode connect() always raises an exception
+            # In non-blocking mode we expect connect() to raise an
+            # exception with EINPROGRESS or EWOULDBLOCK.
+            #
+            # On freebsd, other errors such as ECONNREFUSED may be
+            # returned immediately when attempting to connect to
+            # localhost, so handle them the same way as an error
+            # reported later in _handle_connect.
             if e.args[0] not in (errno.EINPROGRESS, errno.EWOULDBLOCK):
-                raise
+                logging.warning("Connect error on fd %d: %s",
+                                self.socket.fileno(), e)
+                self.close()
+                return
         self._connect_callback = stack_context.wrap(callback)
         self._add_io_state(self.io_loop.WRITE)
 
@@ -161,7 +170,7 @@
         ``callback`` will be empty.
         """
         assert not self._read_callback, "Already reading"
-        assert isinstance(num_bytes, int)
+        assert isinstance(num_bytes, (int, long))
         self._read_bytes = num_bytes
         self._read_callback = stack_context.wrap(callback)
         self._streaming_callback = stack_context.wrap(streaming_callback)
@@ -272,6 +281,8 @@
                 state |= self.io_loop.READ
             if self.writing():
                 state |= self.io_loop.WRITE
+            if state == self.io_loop.ERROR:
+                state |= self.io_loop.READ
             if state != self._state:
                 assert self._state is not None, \
                     "shouldn't happen: _handle_events without self._state"
@@ -500,7 +511,7 @@
                     self._close_callback = None
                     self._run_callback(cb)
             else:
-                self._add_io_state(0)
+                self._add_io_state(ioloop.IOLoop.READ)
 
     def _add_io_state(self, state):
         """Adds `state` (IOLoop.{READ,WRITE} flags) to our event handler.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado/test/iostream_test.py 
new/tornado-2.1.1/tornado/test/iostream_test.py
--- old/tornado-2.1/tornado/test/iostream_test.py       2011-09-19 
01:45:01.000000000 +0200
+++ new/tornado-2.1.1/tornado/test/iostream_test.py     2011-10-04 
18:59:28.000000000 +0200
@@ -4,6 +4,7 @@
 from tornado.util import b
 from tornado.web import RequestHandler, Application
 import socket
+import time
 
 class HelloHandler(RequestHandler):
     def get(self):
@@ -13,20 +14,21 @@
     def get_app(self):
         return Application([('/', HelloHandler)])
 
-    def make_iostream_pair(self):
+    def make_iostream_pair(self, **kwargs):
         port = get_unused_port()
         [listener] = netutil.bind_sockets(port, '127.0.0.1',
                                           family=socket.AF_INET)
         streams = [None, None]
         def accept_callback(connection, address):
-            streams[0] = IOStream(connection, io_loop=self.io_loop)
+            streams[0] = IOStream(connection, io_loop=self.io_loop, **kwargs)
             self.stop()
         def connect_callback():
             streams[1] = client_stream
             self.stop()
         netutil.add_accept_handler(listener, accept_callback,
                                    io_loop=self.io_loop)
-        client_stream = IOStream(socket.socket(), io_loop=self.io_loop)
+        client_stream = IOStream(socket.socket(), io_loop=self.io_loop,
+                                 **kwargs)
         client_stream.connect(('127.0.0.1', port),
                               callback=connect_callback)
         self.wait(condition=lambda: all(streams))
@@ -160,3 +162,31 @@
         finally:
             server.close()
             client.close()
+
+    def test_close_buffered_data(self):
+        # Similar to the previous test, but with data stored in the OS's
+        # socket buffers instead of the IOStream's read buffer.  Out-of-band
+        # close notifications must be delayed until all data has been
+        # drained into the IOStream buffer. (epoll used to use out-of-band
+        # close events with EPOLLRDHUP, but no longer)
+        #
+        # This depends on the read_chunk_size being smaller than the
+        # OS socket buffer, so make it small.
+        server, client = self.make_iostream_pair(read_chunk_size=256)
+        try:
+            server.write(b("A") * 512)
+            client.read_bytes(256, self.stop)
+            data = self.wait()
+            self.assertEqual(b("A") * 256, data)
+            server.close()
+            # Allow the close to propagate to the client side of the
+            # connection.  Using add_callback instead of add_timeout
+            # doesn't seem to work, even with multiple iterations
+            self.io_loop.add_timeout(time.time() + 0.01, self.stop)
+            self.wait()
+            client.read_bytes(256, self.stop)
+            data = self.wait()
+            self.assertEqual(b("A") * 256, data)
+        finally:
+            server.close()
+            client.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado/test/simple_httpclient_test.py 
new/tornado-2.1.1/tornado/test/simple_httpclient_test.py
--- old/tornado-2.1/tornado/test/simple_httpclient_test.py      2011-09-18 
23:23:16.000000000 +0200
+++ new/tornado-2.1.1/tornado/test/simple_httpclient_test.py    2011-10-04 
18:59:28.000000000 +0200
@@ -141,11 +141,15 @@
         self.assertEqual(str(response.error), "HTTP 599: Timeout")
 
     def test_ipv6(self):
+        if not socket.has_ipv6:
+            # python compiled without ipv6 support, so skip this test
+            return
         try:
             self.http_server.listen(self.get_http_port(), address='::1')
         except socket.gaierror, e:
             if e.errno == socket.EAI_ADDRFAMILY:
-                # ipv6 is not configured on this system, so skip this test
+                # python supports ipv6, but it's not configured on the network
+                # interface, so skip this test.
                 return
             raise
         url = self.get_url("/hello").replace("localhost", "[::1]")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tornado-2.1/tornado.egg-info/PKG-INFO 
new/tornado-2.1.1/tornado.egg-info/PKG-INFO
--- old/tornado-2.1/tornado.egg-info/PKG-INFO   2011-09-21 06:23:13.000000000 
+0200
+++ new/tornado-2.1.1/tornado.egg-info/PKG-INFO 2011-10-04 19:01:48.000000000 
+0200
@@ -1,11 +1,11 @@
 Metadata-Version: 1.0
 Name: tornado
-Version: 2.1
+Version: 2.1.1
 Summary: Tornado is an open source version of the scalable, non-blocking web 
server and and tools that power FriendFeed
 Home-page: http://www.tornadoweb.org/
 Author: Facebook
 Author-email: [email protected]
 License: http://www.apache.org/licenses/LICENSE-2.0
-Download-URL: http://github.com/downloads/facebook/tornado/tornado-2.1.tar.gz
+Download-URL: http://github.com/downloads/facebook/tornado/tornado-2.1.1.tar.gz
 Description: UNKNOWN
 Platform: UNKNOWN

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to