-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
There are several deprecation warnings running Sanic (25.3.0 in my case) with Python 3.14
/Users/xxx/git/project/.venv/lib/python3.14/site-packages/sanic/server/loop.py:46: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
if not isinstance(asyncio.get_event_loop_policy(), uvloop.EventLoopPolicy):
/Users/xxx/git/project/.venv/lib/python3.14/site-packages/sanic/server/loop.py:47: DeprecationWarning: 'asyncio.set_event_loop_policy' is deprecated and slated for removal in Python 3.16
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
/Users/xxx/git/project/.venv/lib/python3.14/site-packages/sanic/server/runners.py:174: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
also noteworthy warning:
/app/.venv/lib/python3.14/site-packages/sanic/server/websockets/impl.py:439: SyntaxWarning: 'return' in a 'finally' block
return
/app/.venv/lib/python3.14/site-packages/sanic/server/websockets/impl.py:465: SyntaxWarning: 'return' in a 'finally' block
return
Code snippet
No response
Expected Behavior
no warnings
How do you run Sanic?
Sanic CLI
Operating System
MacOS
Sanic Version
25.3.0
Additional context
checked on MacOS / Linux (Docker) - same output noticed
ahopkins