Hello community,

here is the log from the commit of package python3-websockets for 
openSUSE:Factory checked in at 2015-11-22 11:00:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-websockets (Old)
 and      /work/SRC/openSUSE:Factory/.python3-websockets.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-websockets"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-websockets/python3-websockets.changes    
2015-09-08 17:39:51.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python3-websockets.new/python3-websockets.changes   
    2015-11-22 11:02:50.000000000 +0100
@@ -1,0 +2,8 @@
+Fri Nov 20 08:23:03 UTC 2015 - [email protected]
+
+Release 2.7
+
+* Added compatibility with Python 3.5.
+* Refreshed documentation.
+
+-------------------------------------------------------------------

Old:
----
  websockets-2.6.tar.gz

New:
----
  websockets-2.7.tar.gz

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

Other differences:
------------------
++++++ python3-websockets.spec ++++++
--- /var/tmp/diff_new_pack.ZpTe2P/_old  2015-11-22 11:02:51.000000000 +0100
+++ /var/tmp/diff_new_pack.ZpTe2P/_new  2015-11-22 11:02:51.000000000 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package python-websockets
+# spec file for package python3-websockets
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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
@@ -13,15 +13,16 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           python3-websockets
-Version:        2.6
+Version:        2.7
 Release:        0
-License:        BSD-3-Clause
 Summary:        An implementation of the WebSocket Protocol (RFC 6455)
-Url:            https://github.com/aaugustin/websockets
+License:        BSD-3-Clause
 Group:          Development/Languages/Python
+Url:            https://github.com/aaugustin/websockets
 Source:         
https://pypi.python.org/packages/source/w/websockets/websockets-%{version}.tar.gz
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools

++++++ websockets-2.6.tar.gz -> websockets-2.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/PKG-INFO new/websockets-2.7/PKG-INFO
--- old/websockets-2.6/PKG-INFO 2015-08-18 20:13:54.000000000 +0200
+++ new/websockets-2.7/PKG-INFO 2015-11-18 20:52:28.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: websockets
-Version: 2.6
+Version: 2.7
 Summary: An implementation of the WebSocket Protocol (RFC 6455)
 Home-page: https://github.com/aaugustin/websockets
 Author: Aymeric Augustin
@@ -19,7 +19,7 @@
         3.4 or Python 3.3 with the ``asyncio`` module, which is available with 
``pip
         install asyncio``.
         
-        Documentation is available at http://aaugustin.github.io/websockets/.
+        Documentation is available on `Read the Docs`_.
         
         Bug reports, patches and suggestions welcome! Just open an issue_ or 
send a
         `pull request`_.
@@ -29,6 +29,7 @@
         .. _RFC 6455: http://tools.ietf.org/html/rfc6455
         .. _Autobahn Testsuite: 
https://github.com/aaugustin/websockets/blob/master/compliance/README.rst
         .. _PEP 3156: http://www.python.org/dev/peps/pep-3156/
+        .. _Read the Docs: https://websockets.readthedocs.org/
         .. _issue: https://github.com/aaugustin/websockets/issues/new
         .. _pull request: https://github.com/aaugustin/websockets/compare/
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/README new/websockets-2.7/README
--- old/websockets-2.6/README   2015-08-18 09:00:25.000000000 +0200
+++ new/websockets-2.7/README   2015-10-31 16:55:41.000000000 +0100
@@ -13,7 +13,7 @@
 3.4 or Python 3.3 with the ``asyncio`` module, which is available with ``pip
 install asyncio``.
 
-Documentation is available at http://aaugustin.github.io/websockets/.
+Documentation is available on `Read the Docs`_.
 
 Bug reports, patches and suggestions welcome! Just open an issue_ or send a
 `pull request`_.
@@ -23,5 +23,6 @@
 .. _RFC 6455: http://tools.ietf.org/html/rfc6455
 .. _Autobahn Testsuite: 
https://github.com/aaugustin/websockets/blob/master/compliance/README.rst
 .. _PEP 3156: http://www.python.org/dev/peps/pep-3156/
+.. _Read the Docs: https://websockets.readthedocs.org/
 .. _issue: https://github.com/aaugustin/websockets/issues/new
 .. _pull request: https://github.com/aaugustin/websockets/compare/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/setup.cfg new/websockets-2.7/setup.cfg
--- old/websockets-2.6/setup.cfg        2015-08-18 20:13:54.000000000 +0200
+++ new/websockets-2.7/setup.cfg        2015-11-18 20:52:28.000000000 +0100
@@ -9,7 +9,7 @@
 lines_after_imports = 2
 
 [egg_info]
-tag_build = 
 tag_svn_revision = 0
+tag_build = 
 tag_date = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets/compatibility.py 
new/websockets-2.7/websockets/compatibility.py
--- old/websockets-2.6/websockets/compatibility.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/websockets-2.7/websockets/compatibility.py      2015-10-31 
14:01:31.000000000 +0100
@@ -0,0 +1,8 @@
+import asyncio
+
+
+# Replace with BaseEventLoop.create_task when dropping Python < 3.4.2.
+try:                                                # pragma: no cover
+    asyncio_ensure_future = asyncio.ensure_future   # Python ≥ 3.5
+except AttributeError:                              # pragma: no cover
+    asyncio_ensure_future = asyncio.async           # Python < 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets/protocol.py 
new/websockets-2.7/websockets/protocol.py
--- old/websockets-2.6/websockets/protocol.py   2015-08-18 13:26:29.000000000 
+0200
+++ new/websockets-2.7/websockets/protocol.py   2015-10-31 16:45:55.000000000 
+0100
@@ -15,6 +15,7 @@
 import random
 import struct
 
+from .compatibility import asyncio_ensure_future
 from .exceptions import InvalidState, PayloadTooBig, WebSocketProtocolError
 from .framing import *
 from .handshake import *
@@ -181,7 +182,7 @@
         It waits for the other end to complete the handshake. It doesn't do
         anything once the connection is closed.
 
-        It's usually safe to wrap this coroutine in :func:`~asyncio.async`
+        It's safe to wrap this coroutine in :func:`~asyncio.ensure_future`
         since errors during connection termination aren't particularly useful.
 
         ``code`` must be an :class:`int` and ``reason`` a :class:`str`.
@@ -222,7 +223,8 @@
             pass
 
         # Wait for a message until the connection is closed
-        next_message = asyncio.async(self.messages.get(), loop=self.loop)
+        next_message = asyncio_ensure_future(
+            self.messages.get(), loop=self.loop)
         try:
             done, pending = yield from asyncio.wait(
                 [next_message, self.worker],
@@ -493,7 +495,21 @@
         self.reader = reader
         self.writer = writer
         # Start the task that handles incoming messages.
-        self.worker = asyncio.async(self.run(), loop=self.loop)
+        self.worker = asyncio_ensure_future(self.run(), loop=self.loop)
+
+    def eof_received(self):
+        super().eof_received()
+        # Since Python 3.5, StreamReaderProtocol.eof_received() returns True
+        # to leave the transport open (http://bugs.python.org/issue24539).
+        # This is inappropriate for websockets for at least three reasons.
+        # 1. The use case is to read data until EOF with self.reader.read(-1).
+        #    Since websockets is a TLV protocol, this never happens.
+        # 2. It doesn't work on SSL connections. A falsy value must be
+        #    returned to have the same behavior on SSL and plain connections.
+        # 3. The websockets protocol has its own closing handshake. Endpoints
+        #    close the TCP connection after sending a Close frame.
+        # As a consequence we revert to the previous, more useful behavior.
+        return
 
     def connection_lost(self, exc):
         # 7.1.4. The WebSocket Connection is Closed
@@ -503,4 +519,7 @@
             self.closing_handshake.set_result(False)
         if not self.connection_closed.done():
             self.connection_closed.set_result(None)
+        # Close the transport in case close_connection() wasn't executed.
+        if self.writer is not None:
+            self.writer.close()
         super().connection_lost(exc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets/server.py 
new/websockets-2.7/websockets/server.py
--- old/websockets-2.6/websockets/server.py     2015-08-09 22:03:36.000000000 
+0200
+++ new/websockets-2.7/websockets/server.py     2015-10-31 14:01:31.000000000 
+0100
@@ -9,6 +9,7 @@
 import email.message
 import logging
 
+from .compatibility import asyncio_ensure_future
 from .exceptions import InvalidHandshake, InvalidOrigin
 from .handshake import build_response, check_request
 from .http import USER_AGENT, read_request
@@ -42,7 +43,13 @@
 
     def connection_made(self, transport):
         super().connection_made(transport)
-        self.handler_task = asyncio.async(self.handler(), loop=self.loop)
+        # Register the connection with the server when creating the handler
+        # task. (Registering at the beginning of the handler coroutine would
+        # create a race condition between the creation of the task, which
+        # schedules its execution, and the moment the handler starts running.)
+        self.ws_server.register(self)
+        self.handler_task = asyncio_ensure_future(
+            self.handler(), loop=self.loop)
 
     @asyncio.coroutine
     def handler(self):
@@ -86,6 +93,13 @@
             except Exception:                               # pragma: no cover
                 pass
 
+        finally:
+            # Unregister the connection with the server when the handler task
+            # terminates. Registration is tied to the lifecycle of the handler
+            # task because the server waits for tasks attached to registered
+            # connections before terminating.
+            self.ws_server.unregister(self)
+
     @asyncio.coroutine
     def handshake(self, origins=None, subprotocols=None, extra_headers=None):
         """
@@ -170,14 +184,6 @@
         priority = lambda p: client_protos.index(p) + server_protos.index(p)
         return sorted(common_protos, key=priority)[0]
 
-    def client_connected(self, reader, writer):
-        super().client_connected(reader, writer)
-        self.ws_server.register(self)
-
-    def connection_lost(self, exc):
-        self.ws_server.unregister(self)
-        super().connection_lost(exc)
-
 
 class WebSocketServer(asyncio.AbstractServer):
     """
@@ -216,7 +222,7 @@
         Stop serving and trigger a closing handshake on open connections.
         """
         for websocket in self.websockets:
-            asyncio.async(websocket.close(1001), loop=self.loop)
+            asyncio_ensure_future(websocket.close(1001), loop=self.loop)
         self.server.close()
 
     @asyncio.coroutine
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets/test_client_server.py 
new/websockets-2.7/websockets/test_client_server.py
--- old/websockets-2.6/websockets/test_client_server.py 2015-08-09 
22:05:37.000000000 +0200
+++ new/websockets-2.7/websockets/test_client_server.py 2015-11-18 
19:26:33.000000000 +0100
@@ -45,10 +45,9 @@
         self.loop.close()
 
     def run_loop_once(self):
-        # Process callbacks scheduled with call_soon. This pattern works
-        # because stop schedules a callback to stop the event loop and
-        # run_forever runs the loop until it hits this callback.
-        self.loop.stop()
+        # Process callbacks scheduled with call_soon by appending a callback
+        # to stop the event loop then running it until it hits that callback.
+        self.loop.call_soon(self.loop.stop)
         self.loop.run_forever()
 
     def start_server(self, **kwds):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets/test_protocol.py 
new/websockets-2.7/websockets/test_protocol.py
--- old/websockets-2.6/websockets/test_protocol.py      2015-08-18 
13:23:21.000000000 +0200
+++ new/websockets-2.7/websockets/test_protocol.py      2015-11-18 
19:26:37.000000000 +0100
@@ -6,6 +6,7 @@
 import unittest
 import unittest.mock
 
+from .compatibility import asyncio_ensure_future
 from .exceptions import InvalidState
 from .framing import *
 from .protocol import CLOSED, WebSocketCommonProtocol
@@ -62,10 +63,9 @@
         super().tearDown()
 
     def run_loop_once(self):
-        # Process callbacks scheduled with call_soon. This pattern works
-        # because stop schedules a callback to stop the event loop and
-        # run_forever runs the loop until it hits this callback.
-        self.loop.stop()
+        # Process callbacks scheduled with call_soon by appending a callback
+        # to stop the event loop then running it until it hits that callback.
+        self.loop.call_soon(self.loop.stop)
         self.loop.run_forever()
 
     def make_drain_slow(self):
@@ -88,7 +88,7 @@
 
     @property
     def async(self):
-        return functools.partial(asyncio.async, loop=self.loop)
+        return functools.partial(asyncio_ensure_future, loop=self.loop)
 
     def receive_frame(self, frame):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets/version.py 
new/websockets-2.7/websockets/version.py
--- old/websockets-2.6/websockets/version.py    2015-08-18 20:13:27.000000000 
+0200
+++ new/websockets-2.7/websockets/version.py    2015-11-18 20:51:57.000000000 
+0100
@@ -1 +1 @@
-version = '2.6'
+version = '2.7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets.egg-info/PKG-INFO 
new/websockets-2.7/websockets.egg-info/PKG-INFO
--- old/websockets-2.6/websockets.egg-info/PKG-INFO     2015-08-18 
20:13:53.000000000 +0200
+++ new/websockets-2.7/websockets.egg-info/PKG-INFO     2015-11-18 
20:52:27.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: websockets
-Version: 2.6
+Version: 2.7
 Summary: An implementation of the WebSocket Protocol (RFC 6455)
 Home-page: https://github.com/aaugustin/websockets
 Author: Aymeric Augustin
@@ -19,7 +19,7 @@
         3.4 or Python 3.3 with the ``asyncio`` module, which is available with 
``pip
         install asyncio``.
         
-        Documentation is available at http://aaugustin.github.io/websockets/.
+        Documentation is available on `Read the Docs`_.
         
         Bug reports, patches and suggestions welcome! Just open an issue_ or 
send a
         `pull request`_.
@@ -29,6 +29,7 @@
         .. _RFC 6455: http://tools.ietf.org/html/rfc6455
         .. _Autobahn Testsuite: 
https://github.com/aaugustin/websockets/blob/master/compliance/README.rst
         .. _PEP 3156: http://www.python.org/dev/peps/pep-3156/
+        .. _Read the Docs: https://websockets.readthedocs.org/
         .. _issue: https://github.com/aaugustin/websockets/issues/new
         .. _pull request: https://github.com/aaugustin/websockets/compare/
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websockets-2.6/websockets.egg-info/SOURCES.txt 
new/websockets-2.7/websockets.egg-info/SOURCES.txt
--- old/websockets-2.6/websockets.egg-info/SOURCES.txt  2015-08-18 
20:13:54.000000000 +0200
+++ new/websockets-2.7/websockets.egg-info/SOURCES.txt  2015-11-18 
20:52:27.000000000 +0100
@@ -5,6 +5,7 @@
 setup.py
 websockets/__init__.py
 websockets/client.py
+websockets/compatibility.py
 websockets/exceptions.py
 websockets/framing.py
 websockets/handshake.py


Reply via email to