You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It creates a Task instance without specifying event loop, that will cause it to use current running loop which does not exists at that time. It will also bring "DeprecationWarning: There is no current event loop" warning.
Ok, in reading the Python 3.11 changelog, I confirm the issue is really down to deprecating the behavior of asynicio.get_event_loop() towards Python 3.12 - 3.14: python/cpython#93453.
Your proposed fix of explicitly creating the event loop before using it should be fine. I don't think anything else is needed since the class instances all start their tasks using the loop in their respective create methods.
Run this script in Python3.10, we will get "DeprecationWarning: There is no current event loop" warning.
That's caused by
Suggest to use this
And, here
It creates a Task instance without specifying event loop, that will cause it to use current running loop which does not exists at that time. It will also bring "DeprecationWarning: There is no current event loop" warning.
Suggest to change to this
The same modification should apply to
UDPSender
The text was updated successfully, but these errors were encountered: