summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/tasks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 059143f..e604298 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -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)