summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorKumar Aditya <kumaraditya@python.org>2024-10-25 12:49:30 (GMT)
committerGitHub <noreply@github.com>2024-10-25 12:49:30 (GMT)
commitcae853e3b44cd5cb033b904e163c490dd28bc30a (patch)
tree31d8533074f271cf1d4710552171c8b54e62512c /Misc
parentebcc578dff47b1dcffb634923bedc5361c8f29f6 (diff)
downloadcpython-cae853e3b44cd5cb033b904e163c490dd28bc30a.zip
cpython-cae853e3b44cd5cb033b904e163c490dd28bc30a.tar.gz
cpython-cae853e3b44cd5cb033b904e163c490dd28bc30a.tar.bz2
GH-125789: fix `fut._callbacks` to always return a copy of callbacks (#125922)
Fix `asyncio.Future._callbacks` to always return a copy of the internal list of callbacks to avoid mutation from user code affecting the internal state.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2024-10-24-14-08-10.gh-issue-125789.eaiAMw.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-10-24-14-08-10.gh-issue-125789.eaiAMw.rst b/Misc/NEWS.d/next/Library/2024-10-24-14-08-10.gh-issue-125789.eaiAMw.rst
new file mode 100644
index 0000000..964a006
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-10-24-14-08-10.gh-issue-125789.eaiAMw.rst
@@ -0,0 +1 @@
+Fix possible crash when mutating list of callbacks returned by :attr:`!asyncio.Future._callbacks`. It now always returns a new copy in C implementation :mod:`!_asyncio`. Patch by Kumar Aditya.