trio icon indicating copy to clipboard operation
trio copied to clipboard

Python 3.10: Deprecation warnings in asyncio and ssl

Open tirkarthi opened this issue 4 years ago • 7 comments

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

tirkarthi avatar May 07 '21 18:05 tirkarthi

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.

altendky avatar May 07 '21 18:05 altendky

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.)

njsmith avatar May 07 '21 20:05 njsmith

@tiran

(Also someone should tell upstream cpython to make it a DeprecationWarning, not a UserWarning.)

graingert avatar Jun 08 '21 19:06 graingert

@tiran it would be good if you could remove the : from the warning message so I can use simplefilter

graingert avatar Jun 08 '21 20:06 graingert

@graingert Please open a BPO and I see what I can do.

tiran avatar Jun 08 '21 20:06 tiran

@tiran https://bugs.python.org/issue44354

graingert avatar Jun 08 '21 20:06 graingert

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.

rmcgibbo avatar Jan 09 '22 22:01 rmcgibbo