Examples in 6_asyncio_websockets are not working with Python 3.10.
This can be observed with 2 issues:
- New deprecation warnings appear as per https://docs.python.org/3/whatsnew/3.10.html
[asyncio.get_event_loop()](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop) now emits a deprecation warning if there is no running event loop.. Should be fixed by changing this code:
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
to something like:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(start_server)
loop.run_forever()
- Basic and advanced apps are not functioning anymore. Didn't look very close into the reason, but could be related.
Examples in
6_asyncio_websocketsare not working with Python 3.10.This can be observed with 2 issues:
[asyncio.get_event_loop()](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop) now emits a deprecation warning if there is no running event loop.. Should be fixed by changing this code:to something like: