[Bug 1969902] Re: Legacy API not compatible with Python 3.10 (Update to 10.x)

Bastian Germann 1969902 at bugs.launchpad.net
Mon Jan 16 14:20:13 UTC 2023


** Description changed:

- Currently we have python3-websockets version 9.1 in jammy's repo, which doesn't work with python3 version 3.10. 
- This is part of the log:
- ❯  python3 /tmp/pyext.py ws://127.0.0.1:10000
- Traceback (most recent call last):
-   File "/tmp/pyext.py", line 103, in <module>
-     asyncio.run(connect(args['url']))
-   File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
-     return loop.run_until_complete(main)
-   File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
-     return future.result()
-   File "/tmp/pyext.py", line 88, in connect
-     async with websockets.connect(uri) as websocket:
-   File "/home/zwq/.local/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/contents/tmp/lib/python3.10/site-packages/websockets/legacy/client.py", line 604, in __aenter__
-     return await self
-   File "/home/zwq/.local/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/contents/tmp/lib/python3.10/site-packages/websockets/legacy/client.py", line 622, in __await_impl__
-     transport, protocol = await self._create_connection()
-   File "/usr/lib/python3.10/asyncio/base_events.py", line 1089, in create_connection
-     transport, protocol = await self._create_connection_transport(
-   File "/usr/lib/python3.10/asyncio/base_events.py", line 1107, in _create_connection_transport
-     protocol = protocol_factory()
-   File "/home/zwq/.local/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/contents/tmp/lib/python3.10/site-packages/websockets/legacy/client.py", line 160, in __init__
-     super().__init__(**kwargs)
-   File "/home/zwq/.local/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/contents/tmp/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 154, in __init__
-     self._drain_lock = asyncio.Lock(
-   File "/usr/lib/python3.10/asyncio/locks.py", line 78, in __init__
-     super().__init__(loop=loop)
-   File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
-     raise TypeError(
- TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
+ [ Impact ]
  
- Today python3-websockets version 10.2 has been migrated into Debian's
- testing repo (https://tracker.debian.org/news/1320190/python-
- websockets-102-1-migrated-to-testing/). Maybe we should update the
- package to fix the problem.
+ Currently we have python3-websockets version 9.1 in jammy's repo, which
+ doesn't work with python3 version 3.10. python3-websockets version
+ 10.2-1 is available in kinetic which fixes this. It should be made
+ available via a SRU.
+ 
+ [ Test Plan ]
+ 
+ on jammy, get the GitHub tarball for 9.1 and run the tests:
+ $ apt install python3-websockets
+ $ wget https://github.com/aaugustin/websockets/archive/refs/tags/9.1.tar.gz
+ $ tar xf 9.1.tar.gz
+ $ cd websockets-9.1
+ $ python3 -m unittest
+ 
+ [ Where problems could occur ]
+ 
+ The reverse dependencies are all building with the potential python-
+ websockets 10.2-0ubuntu0.22.04.1 installed. python-hbmqtt fails but that
+ is not a regression (see comments on this bug).
+ 
+ 10.2 includes the backwards-incompatible changes that are listed in 10.0's changelog:
+ https://websockets.readthedocs.io/en/stable/project/changelog.html#id11
+ 
+ These are the interesting ones:
+ The signature of ConnectionClosed changed.
+ A msg parameter was added to InvalidURI.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1969902

Title:
  Legacy API not compatible with Python 3.10 (Update to 10.x)

Status in rtpengine:
  Fix Released
Status in python-websockets package in Ubuntu:
  Fix Released

Bug description:
  [ Impact ]

  Currently we have python3-websockets version 9.1 in jammy's repo,
  which doesn't work with python3 version 3.10. python3-websockets
  version 10.2-1 is available in kinetic which fixes this. It should be
  made available via a SRU.

  [ Test Plan ]

  on jammy, get the GitHub tarball for 9.1 and run the tests:
  $ apt install python3-websockets
  $ wget https://github.com/aaugustin/websockets/archive/refs/tags/9.1.tar.gz
  $ tar xf 9.1.tar.gz
  $ cd websockets-9.1
  $ python3 -m unittest

  [ Where problems could occur ]

  The reverse dependencies are all building with the potential python-
  websockets 10.2-0ubuntu0.22.04.1 installed. python-hbmqtt fails but
  that is not a regression (see comments on this bug).

  10.2 includes the backwards-incompatible changes that are listed in 10.0's changelog:
  https://websockets.readthedocs.io/en/stable/project/changelog.html#id11

  These are the interesting ones:
  The signature of ConnectionClosed changed.
  A msg parameter was added to InvalidURI.

  Both of them are used by qiskit-ibmq-provider but in a 9.1/10.x
  compatible way.

To manage notifications about this bug go to:
https://bugs.launchpad.net/rtpengine/+bug/1969902/+subscriptions




More information about the Ubuntu-sponsors mailing list