cpython/Doc/whatsnew
Itamar Ostricher 85c7bf5bce
gh-103793: Defer formatting task name (#103767)
The default task name is "Task-<counter>" (if no name is passed in during Task creation).
This is initialized in `Task.__init__` (C impl) using string formatting, which can be quite slow.
Actually using the task name in real world code is not very common, so this is wasted init.

Let's defer this string formatting to the first time the name is read (in `get_name` impl),
so we don't need to pay the string formatting cost if the task name is never read.

We don't change the order in which tasks are assigned numbers (if they are) --
the number is set on task creation, as a PyLong instead of a formatted string.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-29 08:20:09 -07:00
..
2.0.rst gh-96959: Update more HTTP links (GH-97536) 2022-09-27 14:08:11 +03:00
2.1.rst gh-93851: Fix all broken links in Doc/ (GH-93853) 2022-06-21 20:55:18 +02:00
2.2.rst docs: Change links to label refs (#98454) 2022-10-25 20:26:28 -07:00
2.3.rst gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (#97768) 2022-10-05 11:01:14 -07:00
2.4.rst gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (#97768) 2022-10-05 11:01:14 -07:00
2.5.rst gh-93738: Disallow pre-v3 syntax in the C domain (#97962) 2022-10-06 10:11:37 -07:00
2.6.rst GH-103484: Fix broken links reported by linkcheck (#103608) 2023-04-22 08:24:47 -06:00
2.7.rst GH-103484: Fix broken links reported by linkcheck (#103608) 2023-04-22 08:24:47 -06:00
3.0.rst Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) 2022-07-05 11:16:10 +02:00
3.1.rst gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961) 2022-09-24 14:38:53 +03:00
3.2.rst gh-99087: Add missing newline for prompts in docs (GH-98993) 2022-12-08 19:31:19 -08:00
3.3.rst gh-99087: Add missing newline for prompts in docs (GH-98993) 2022-12-08 19:31:19 -08:00
3.4.rst gh-96959: Update more HTTP links (GH-97536) 2022-09-27 14:08:11 +03:00
3.5.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.6.rst docs: Change links to label refs (#98454) 2022-10-25 20:26:28 -07:00
3.7.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.8.rst docs: Change links to label refs (#98454) 2022-10-25 20:26:28 -07:00
3.9.rst gh-100700: Remove Date and Release fields in past whatsnews (GH-100728) 2023-01-03 16:00:26 -06:00
3.10.rst gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410) 2023-01-13 14:40:29 +02:00
3.11.rst gh-95913: Consolidate build requirements changes in 3.11 WhatsNew (GH-98781) 2023-03-07 15:38:31 +01:00
3.12.rst gh-103793: Defer formatting task name (#103767) 2023-04-29 08:20:09 -07:00
changelog.rst Include additional changes to support blurbified NEWS (#3340) 2017-09-05 00:46:18 -07:00
index.rst Fix What's New for 3.12 (GH-92482) 2022-05-08 18:23:08 +03:00