-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix "DeprecationWarning: There is no current event loop" #2390
Conversation
Signed-off-by: Javier Marcet <javier@marcet.info>
Thanks for the contribution. Can you let me know the context in which you are seeing this? I am particularly interested to know what is calling this causing the notice. What platform are you seeing this on? OS/Python/Sanic? |
I am seeing this when running my iptv proxy movistar-u7d natively on Windows. I am using python 3.10, installed with scoop on Windows 11 x86_64 and sanic stable, i.e., v21.12.1 For some reason I'm also getting a The proxy has two sanic backends, which start here and here By the way, having Sanic running as native Windows applications, compiled with |
This shows up on in TTY output when debug is off. So, if you are not calling |
Yeah, I checked it after writing the message. I am not seeing it in Linux in general because I usually run under docker, not in a terminal directly.
It is just In those backends I only create tasks with Furthermore, it is Windows only, I never saw it in Linux. |
I've just done a quick test with this simplistic sanic app:
That's enough to trigger the warning: |
Codecov Report
@@ Coverage Diff @@
## main #2390 +/- ##
=============================================
+ Coverage 87.242% 87.301% +0.059%
=============================================
Files 60 60
Lines 5040 5040
Branches 907 907
=============================================
+ Hits 4397 4400 +3
+ Misses 472 470 -2
+ Partials 171 170 -1
Continue to review full report at Codecov.
|
I'm seeing the warning on Windows platforms only but it is a general deprecation of Python 3.10, to be dropped for 3.11