Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-trio-websocket for 
openSUSE:Factory checked in at 2023-12-13 18:36:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-trio-websocket (Old)
 and      /work/SRC/openSUSE:Factory/.python-trio-websocket.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-trio-websocket"

Wed Dec 13 18:36:17 2023 rev:2 rq:1132849 version:0.11.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-trio-websocket/python-trio-websocket.changes  
    2023-06-09 20:43:26.720647510 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-trio-websocket.new.25432/python-trio-websocket.changes
   2023-12-13 18:36:27.981738205 +0100
@@ -1,0 +2,7 @@
+Wed Dec 13 10:31:49 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 0.11.1:
+  * remove exceptiongroup dependency for Python >= 3.11
+  * fix client hang when connection lost just after remote closes
+
+-------------------------------------------------------------------

Old:
----
  trio-websocket-0.10.3.tar.gz

New:
----
  trio-websocket-0.11.1.tar.gz

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

Other differences:
------------------
++++++ python-trio-websocket.spec ++++++
--- /var/tmp/diff_new_pack.8IeedH/_old  2023-12-13 18:36:28.793768209 +0100
+++ /var/tmp/diff_new_pack.8IeedH/_new  2023-12-13 18:36:28.793768209 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python-trio-websocket
-Version:        0.10.3
+Version:        0.11.1
 Release:        0
 Summary:        WebSocket library for Trio
 License:        MIT
@@ -30,7 +30,7 @@
 BuildRequires:  %{python_module wheel}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
-BuildRequires:  %{python_module exceptiongroup}
+BuildRequires:  %{python_module exceptiongroup if %python-base < 3.11}
 BuildRequires:  %{python_module pytest-trio}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module trio >= 0.11}
@@ -38,7 +38,9 @@
 BuildRequires:  %{python_module wsproto >= 0.14}
 # /SECTION
 BuildRequires:  fdupes
+%if 0%{?python_version_nodots} < 311
 Requires:       python-exceptiongroup
+%endif
 Requires:       python-trio >= 0.11
 Requires:       python-wsproto >= 0.14
 BuildArch:      noarch

++++++ trio-websocket-0.10.3.tar.gz -> trio-websocket-0.11.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trio-websocket-0.10.3/PKG-INFO 
new/trio-websocket-0.11.1/PKG-INFO
--- old/trio-websocket-0.10.3/PKG-INFO  2023-06-08 07:54:46.000000000 +0200
+++ new/trio-websocket-0.11.1/PKG-INFO  2023-09-27 01:22:39.000000000 +0200
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: trio-websocket
-Version: 0.10.3
+Version: 0.11.1
 Summary: WebSocket library for Trio
-Home-page: https://github.com/HyperionGray/trio-websocket
+Home-page: https://github.com/python-trio/trio-websocket
 Author: Mark E. Haase
 Author-email: [email protected]
-Project-URL: Bug Reports, https://github.com/HyperionGray/trio-websocket/issues
-Project-URL: Source, https://github.com/HyperionGray/trio-websocket
+Project-URL: Bug Reports, https://github.com/python-trio/trio-websocket/issues
+Project-URL: Source, https://github.com/python-trio/trio-websocket
 Keywords: websocket client server trio
 Classifier: Development Status :: 3 - Alpha
 Classifier: Intended Audience :: Developers
@@ -17,6 +17,7 @@
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Requires-Python: >=3.7
@@ -40,7 +41,7 @@
 
 
[![PyPI](https://img.shields.io/pypi/v/trio-websocket.svg?style=flat-square)](https://pypi.org/project/trio-websocket/)
 ![Python 
Versions](https://img.shields.io/pypi/pyversions/trio-websocket.svg?style=flat-square)
-[![Build 
Status](https://img.shields.io/github/actions/workflow/status/HyperionGray/trio-websocket/ci.yml)](https://github.com/HyperionGray/trio-websocket/actions/workflows/ci.yml)
+[![Build 
Status](https://img.shields.io/github/actions/workflow/status/python-trio/trio-websocket/ci.yml)](https://github.com/python-trio/trio-websocket/actions/workflows/ci.yml)
 [![Read the 
Docs](https://img.shields.io/readthedocs/trio-websocket.svg)](https://trio-websocket.readthedocs.io)
 
 ## Alternatives
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trio-websocket-0.10.3/README.md 
new/trio-websocket-0.11.1/README.md
--- old/trio-websocket-0.10.3/README.md 2023-03-19 10:32:10.000000000 +0100
+++ new/trio-websocket-0.11.1/README.md 2023-09-06 22:45:09.000000000 +0200
@@ -15,7 +15,7 @@
 
 
[![PyPI](https://img.shields.io/pypi/v/trio-websocket.svg?style=flat-square)](https://pypi.org/project/trio-websocket/)
 ![Python 
Versions](https://img.shields.io/pypi/pyversions/trio-websocket.svg?style=flat-square)
-[![Build 
Status](https://img.shields.io/github/actions/workflow/status/HyperionGray/trio-websocket/ci.yml)](https://github.com/HyperionGray/trio-websocket/actions/workflows/ci.yml)
+[![Build 
Status](https://img.shields.io/github/actions/workflow/status/python-trio/trio-websocket/ci.yml)](https://github.com/python-trio/trio-websocket/actions/workflows/ci.yml)
 [![Read the 
Docs](https://img.shields.io/readthedocs/trio-websocket.svg)](https://trio-websocket.readthedocs.io)
 
 ## Alternatives
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trio-websocket-0.10.3/setup.py 
new/trio-websocket-0.11.1/setup.py
--- old/trio-websocket-0.10.3/setup.py  2023-03-19 10:32:10.000000000 +0100
+++ new/trio-websocket-0.11.1/setup.py  2023-09-27 01:18:34.000000000 +0200
@@ -19,7 +19,7 @@
     description='WebSocket library for Trio',
     long_description=long_description,
     long_description_content_type='text/markdown',
-    url='https://github.com/HyperionGray/trio-websocket',
+    url='https://github.com/python-trio/trio-websocket',
     author='Mark E. Haase',
     author_email='[email protected]',
     classifiers=[
@@ -33,6 +33,7 @@
         'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: 3.10',
         'Programming Language :: Python :: 3.11',
+        'Programming Language :: Python :: 3.12',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
     ],
@@ -40,12 +41,12 @@
     keywords='websocket client server trio',
     packages=find_packages(exclude=['docs', 'examples', 'tests']),
     install_requires=[
-        'exceptiongroup',
+        'exceptiongroup; python_version<"3.11"',
         'trio>=0.11',
         'wsproto>=0.14',
     ],
     project_urls={
-        'Bug Reports': 'https://github.com/HyperionGray/trio-websocket/issues',
-        'Source': 'https://github.com/HyperionGray/trio-websocket',
+        'Bug Reports': 'https://github.com/python-trio/trio-websocket/issues',
+        'Source': 'https://github.com/python-trio/trio-websocket',
     },
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trio-websocket-0.10.3/tests/test_connection.py 
new/trio-websocket-0.11.1/tests/test_connection.py
--- old/trio-websocket-0.10.3/tests/test_connection.py  2023-03-19 
12:11:56.000000000 +0100
+++ new/trio-websocket-0.11.1/tests/test_connection.py  2023-09-06 
22:45:09.000000000 +0200
@@ -38,7 +38,7 @@
 import trio
 import trustme
 import wsproto
-from trio.testing import memory_stream_pair
+from trio.testing import memory_stream_pair, memory_stream_pump
 from wsproto.events import CloseConnection
 
 try:
@@ -1017,3 +1017,41 @@
                     await trio.sleep_forever()
                 finally:
                     raise ValueError
+
+
+async def test_remote_close_rude():
+    """
+    Bad ordering:
+    1. Remote close
+    2. TCP closed
+    3. Local confirms
+    => no ConnectionClosed raised, client hangs forever
+    """
+    client_stream, server_stream = memory_stream_pair()
+
+    async def client():
+        client_conn = await wrap_client_stream(nursery, client_stream, HOST, 
RESOURCE)
+        assert not client_conn.closed
+        await client_conn.send_message('Hello from client!')
+        with pytest.raises(ConnectionClosed):
+            await client_conn.get_message()
+
+    async def server():
+        server_request = await wrap_server_stream(nursery, server_stream)
+        server_ws = await server_request.accept()
+        assert not server_ws.closed
+        msg = await server_ws.get_message()
+        assert msg == "Hello from client!"
+
+        # disable pumping so that the CloseConnection arrives at the same time 
as the stream closure
+        server_stream.send_stream.send_all_hook = None
+        await server_ws._send(CloseConnection(code=1000, reason=None))
+        await server_stream.aclose()
+
+        # pump the messages over
+        memory_stream_pump(server_stream.send_stream, 
client_stream.receive_stream)
+
+
+    async with trio.open_nursery() as nursery:
+        nursery.start_soon(server)
+        nursery.start_soon(client)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trio-websocket-0.10.3/trio_websocket/_impl.py 
new/trio-websocket-0.11.1/trio_websocket/_impl.py
--- old/trio-websocket-0.10.3/trio_websocket/_impl.py   2023-06-08 
07:43:11.000000000 +0200
+++ new/trio-websocket-0.11.1/trio_websocket/_impl.py   2023-09-27 
01:18:34.000000000 +0200
@@ -13,7 +13,6 @@
 
 import trio
 import trio.abc
-from exceptiongroup import BaseExceptionGroup
 from wsproto import ConnectionType, WSConnection
 from wsproto.connection import ConnectionState
 import wsproto.frame_protocol as wsframeproto
@@ -30,6 +29,10 @@
 )
 import wsproto.utilities
 
+if sys.version_info < (3, 11):  # pragma: no cover
+    # pylint doesn't care about the version_info check, so need to ignore the 
warning
+    from exceptiongroup import BaseExceptionGroup  # pylint: 
disable=redefined-builtin
+
 _TRIO_MULTI_ERROR = tuple(map(int, trio.__version__.split('.')[:2])) < (0, 22)
 
 CONN_TIMEOUT = 60 # default connect & disconnect timeout, in seconds
@@ -65,7 +68,7 @@
         if value is None or not self._armed:
             return False
 
-        if _TRIO_MULTI_ERROR:
+        if _TRIO_MULTI_ERROR:  # pragma: no cover
             filtered_exception = trio.MultiError.filter(_ignore_cancel, value) 
 # pylint: disable=no-member
         elif isinstance(value, BaseExceptionGroup):
             filtered_exception = value.subgroup(lambda exc: not 
isinstance(exc, trio.Cancelled))
@@ -1210,45 +1213,46 @@
             except ConnectionClosed:
                 self._reader_running = False
 
-        while self._reader_running:
-            # Process events.
-            for event in self._wsproto.events():
-                event_type = type(event)
+        async with self._send_channel:
+            while self._reader_running:
+                # Process events.
+                for event in self._wsproto.events():
+                    event_type = type(event)
+                    try:
+                        handler = handlers[event_type]
+                        logger.debug('%s received event: %s', self,
+                            event_type)
+                        await handler(event)
+                    except KeyError:
+                        logger.warning('%s received unknown event type: "%s"', 
self,
+                            event_type)
+                    except ConnectionClosed:
+                        self._reader_running = False
+                        break
+
+                # Get network data.
                 try:
-                    handler = handlers[event_type]
-                    logger.debug('%s received event: %s', self,
-                        event_type)
-                    await handler(event)
-                except KeyError:
-                    logger.warning('%s received unknown event type: "%s"', 
self,
-                        event_type)
-                except ConnectionClosed:
-                    self._reader_running = False
+                    data = await self._stream.receive_some(RECEIVE_BYTES)
+                except (trio.BrokenResourceError, trio.ClosedResourceError):
+                    await self._abort_web_socket()
                     break
-
-            # Get network data.
-            try:
-                data = await self._stream.receive_some(RECEIVE_BYTES)
-            except (trio.BrokenResourceError, trio.ClosedResourceError):
-                await self._abort_web_socket()
-                break
-            if len(data) == 0:
-                logger.debug('%s received zero bytes (connection closed)',
-                    self)
-                # If TCP closed before WebSocket, then record it as an abnormal
-                # closure.
+                if len(data) == 0:
+                    logger.debug('%s received zero bytes (connection closed)',
+                        self)
+                    # If TCP closed before WebSocket, then record it as an 
abnormal
+                    # closure.
+                    if self._wsproto.state != ConnectionState.CLOSED:
+                        await self._abort_web_socket()
+                    break
+                logger.debug('%s received %d bytes', self, len(data))
                 if self._wsproto.state != ConnectionState.CLOSED:
-                    await self._abort_web_socket()
-                break
-            logger.debug('%s received %d bytes', self, len(data))
-            if self._wsproto.state != ConnectionState.CLOSED:
-                try:
-                    self._wsproto.receive_data(data)
-                except wsproto.utilities.RemoteProtocolError as err:
-                    logger.debug('%s remote protocol error: %s', self, err)
-                    if err.event_hint:
-                        await self._send(err.event_hint)
-                    await self._close_stream()
+                    try:
+                        self._wsproto.receive_data(data)
+                    except wsproto.utilities.RemoteProtocolError as err:
+                        logger.debug('%s remote protocol error: %s', self, err)
+                        if err.event_hint:
+                            await self._send(err.event_hint)
+                        await self._close_stream()
 
         logger.debug('%s reader task finished', self)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trio-websocket-0.10.3/trio_websocket/_version.py 
new/trio-websocket-0.11.1/trio_websocket/_version.py
--- old/trio-websocket-0.10.3/trio_websocket/_version.py        2023-06-08 
07:48:42.000000000 +0200
+++ new/trio-websocket-0.11.1/trio_websocket/_version.py        2023-09-27 
01:22:10.000000000 +0200
@@ -1 +1 @@
-__version__ = '0.10.3'
+__version__ = '0.11.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trio-websocket-0.10.3/trio_websocket.egg-info/PKG-INFO 
new/trio-websocket-0.11.1/trio_websocket.egg-info/PKG-INFO
--- old/trio-websocket-0.10.3/trio_websocket.egg-info/PKG-INFO  2023-06-08 
07:54:46.000000000 +0200
+++ new/trio-websocket-0.11.1/trio_websocket.egg-info/PKG-INFO  2023-09-27 
01:22:39.000000000 +0200
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: trio-websocket
-Version: 0.10.3
+Version: 0.11.1
 Summary: WebSocket library for Trio
-Home-page: https://github.com/HyperionGray/trio-websocket
+Home-page: https://github.com/python-trio/trio-websocket
 Author: Mark E. Haase
 Author-email: [email protected]
-Project-URL: Bug Reports, https://github.com/HyperionGray/trio-websocket/issues
-Project-URL: Source, https://github.com/HyperionGray/trio-websocket
+Project-URL: Bug Reports, https://github.com/python-trio/trio-websocket/issues
+Project-URL: Source, https://github.com/python-trio/trio-websocket
 Keywords: websocket client server trio
 Classifier: Development Status :: 3 - Alpha
 Classifier: Intended Audience :: Developers
@@ -17,6 +17,7 @@
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Requires-Python: >=3.7
@@ -40,7 +41,7 @@
 
 
[![PyPI](https://img.shields.io/pypi/v/trio-websocket.svg?style=flat-square)](https://pypi.org/project/trio-websocket/)
 ![Python 
Versions](https://img.shields.io/pypi/pyversions/trio-websocket.svg?style=flat-square)
-[![Build 
Status](https://img.shields.io/github/actions/workflow/status/HyperionGray/trio-websocket/ci.yml)](https://github.com/HyperionGray/trio-websocket/actions/workflows/ci.yml)
+[![Build 
Status](https://img.shields.io/github/actions/workflow/status/python-trio/trio-websocket/ci.yml)](https://github.com/python-trio/trio-websocket/actions/workflows/ci.yml)
 [![Read the 
Docs](https://img.shields.io/readthedocs/trio-websocket.svg)](https://trio-websocket.readthedocs.io)
 
 ## Alternatives
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trio-websocket-0.10.3/trio_websocket.egg-info/requires.txt 
new/trio-websocket-0.11.1/trio_websocket.egg-info/requires.txt
--- old/trio-websocket-0.10.3/trio_websocket.egg-info/requires.txt      
2023-06-08 07:54:46.000000000 +0200
+++ new/trio-websocket-0.11.1/trio_websocket.egg-info/requires.txt      
2023-09-27 01:22:39.000000000 +0200
@@ -1,3 +1,5 @@
-exceptiongroup
 trio>=0.11
 wsproto>=0.14
+
+[:python_version < "3.11"]
+exceptiongroup

Reply via email to