Python 3.10: Deprecation warnings in asyncio and ssl
Though trio had some issues under Python 3.10 with traceback module there are below deprecation warnings in Python 3.10. Traceback issue #1914
Event loop warning : https://github.com/python/cpython/pull/25918
FAILED trio/_core/tests/test_run.py::test_calling_asyncio_function_gives_nice_error - DeprecationWarning: There is no current event loop
FAILED trio/_core/tests/test_run.py::test_asyncio_function_inside_nursery_does_not_explode - DeprecationWarning: There is no current event loop
FAILED trio/tests/test_ssl.py::test_selected_npn_protocol_when_not_set[tls13] - UserWarning: ssl module: NPN is deprecated, use ALPN instead
FAILED trio/tests/test_ssl.py::test_selected_npn_protocol_when_not_set[tls12] - UserWarning: ssl module: NPN is deprecated, use ALPN instead
FAILED trio/tests/test_util.py::test_coroutine_or_error - DeprecationWarning: There is no current event loop
For linkage, 3.10 testing is being added in #1921 and shows these messages. But, I don't know my way around these bits so someone else should probably decide about SSL changes.
The SSL changes probably just need to suppress the warning, since those tests are indeed testing some deprecated functionality. (Also someone should tell upstream cpython to make it a DeprecationWarning, not a UserWarning.)
@tiran
(Also someone should tell upstream cpython to make it a DeprecationWarning, not a UserWarning.)
@tiran it would be good if you could remove the : from the warning message so I can use simplefilter
@graingert Please open a BPO and I see what I can do.
@tiran https://bugs.python.org/issue44354
It looks to me like we're still seeing these warnings, and one error, when testing trio 0.19.0 for python3.10 in nixpkgs. Subscribing myself to this issue.