Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion 5 Lib/asyncio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def _set_task_name(task, name):
try:
set_name = task.set_name
except AttributeError:
pass
warnings.warn("Task.set_name() was added in Python 3.8, "
"the method support will be mandatory for third-party "
"task implementations since 3.13.",
DeprecationWarning, stacklevel=3)
else:
set_name(name)

Expand Down
1 change: 0 additions & 1 deletion 1 Lib/test/test_asyncio/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import textwrap
import traceback
import unittest
import weakref
from unittest import mock
from types import GenericAlias

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Deprecate missing :meth:`asyncio.Task.set_name` for third-party task
implementations, schedule making it mandatory in Python 3.13.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.