Skip to content

Deprecation Message #3044

@ahankinson

Description

@ahankinson

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am seeing the following deprecation warning in my journalctl output (application is running as a systemd unit):

Mar 13 08:23:08 my.host.name sanic[189797]: /srv/my.host.name/webapps/application/.venv/lib/python3.11/site-packages/sanic/server/runners.py:183: DeprecationWarning: Passing 'msg' argument to Task.cancel() is deprecated since Python 3.11, and scheduled for removal in Python 3.14.
Mar 13 08:23:08 my.host.name sanic[189797]:   loop.run_forever()
Mar 13 08:23:08 my.host.name sanic[189797]: /srv/my.host.name/webapps/application/.venv/lib/python3.11/site-packages/sanic/server/runners.py:183: DeprecationWarning: Passing 'msg' argument to Future.cancel() is deprecated since Python 3.11, and scheduled for removal in Python 3.14.
Mar 13 08:23:08 my.host.name sanic[189797]:   loop.run_forever()

I tried looking at the line in runners.py that it mentions, but didn't see any obvious fix.

Code snippet

No response

Expected Behavior

No deprecation warnings

How do you run Sanic?

Sanic CLI

Operating System

Linux

Sanic Version

24.12.0

Additional context

Running on Python 3.11.0 (latest version that is in apt on Ubuntu 22)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions