summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2018-08-08 21:06:47 (GMT)
committerYury Selivanov <yury@magic.io>2018-08-08 21:06:47 (GMT)
commitcca4eec3c0a67cbfeaf09182ea6c097a94891ff6 (patch)
tree0d04ad10797fa95e5e09f8b32e8aa9e0c50f6aac /Misc
parent52dee687af3671a31f63d6432de0d9ef370fd7b0 (diff)
downloadcpython-cca4eec3c0a67cbfeaf09182ea6c097a94891ff6.zip
cpython-cca4eec3c0a67cbfeaf09182ea6c097a94891ff6.tar.gz
cpython-cca4eec3c0a67cbfeaf09182ea6c097a94891ff6.tar.bz2
bpo-34270: Make it possible to name asyncio tasks (GH-8547)
Co-authored-by: Antti Haapala <antti.haapala@anttipatterns.com>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/ACKS2
-rw-r--r--Misc/NEWS.d/next/Library/2018-07-29-11-32-56.bpo-34270.aL6P-3.rst8
2 files changed, 10 insertions, 0 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index 0cb73a0..8c8d954 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -573,6 +573,7 @@ Elliot Gorokhovsky
Hans de Graaff
Tim Graham
Kim Gräsman
+Alex Grönholm
Nathaniel Gray
Eddy De Greef
Duane Griffin
@@ -594,6 +595,7 @@ Michael Guravage
Lars Gustäbel
Thomas Güttler
Jonas H.
+Antti Haapala
Joseph Hackman
Barry Haddow
Philipp Hagemeister
diff --git a/Misc/NEWS.d/next/Library/2018-07-29-11-32-56.bpo-34270.aL6P-3.rst b/Misc/NEWS.d/next/Library/2018-07-29-11-32-56.bpo-34270.aL6P-3.rst
new file mode 100644
index 0000000..a66e110
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-07-29-11-32-56.bpo-34270.aL6P-3.rst
@@ -0,0 +1,8 @@
+The default asyncio task class now always has a name which can be get or set
+using two new methods (:meth:`~asyncio.Task.get_name()` and
+:meth:`~asyncio.Task.set_name`) and is visible in the :func:`repr` output. An
+initial name can also be set using the new ``name`` keyword argument to
+:func:`asyncio.create_task` or the
+:meth:`~asyncio.AbstractEventLoop.create_task` method of the event loop.
+If no initial name is set, the default Task implementation generates a name
+like ``Task-1`` using a monotonic counter.