summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-11-07 08:49:30 (GMT)
committerGitHub <noreply@github.com>2023-11-07 08:49:30 (GMT)
commit13405ecffda6c66d6a5cf2a22dff892c108c69db (patch)
tree2e577ae47a09aa34276d2ce4d1d10f373116eb0a /Doc
parentd2ddfccfb40e22bbdd75b28b444fd7b33dfe38db (diff)
downloadcpython-13405ecffda6c66d6a5cf2a22dff892c108c69db.zip
cpython-13405ecffda6c66d6a5cf2a22dff892c108c69db.tar.gz
cpython-13405ecffda6c66d6a5cf2a22dff892c108c69db.tar.bz2
gh-79932: raise exception if frame.clear() is called on a suspended frame (#111792)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/reference/datamodel.rst7
-rw-r--r--Doc/whatsnew/3.13.rst4
2 files changed, 10 insertions, 1 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 9e9fe83..f7d3d2d 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1214,10 +1214,15 @@ Frame objects support one method:
objects (for example when catching an exception and storing its
traceback for later use).
- :exc:`RuntimeError` is raised if the frame is currently executing.
+ :exc:`RuntimeError` is raised if the frame is currently executing
+ or suspended.
.. versionadded:: 3.4
+ .. versionchanged:: 3.13
+ Attempting to clear a suspended frame raises :exc:`RuntimeError`
+ (as has always been the case for executing frames).
+
.. _traceback-objects:
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index e12c2a1..ef83f66 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -397,6 +397,10 @@ Deprecated
and methods that consider plural forms even if the translation was not found.
(Contributed by Serhiy Storchaka in :gh:`88434`.)
+* Calling :meth:`frame.clear` on a suspended frame raises :exc:`RuntimeError`
+ (as has always been the case for an executing frame).
+ (Contributed by Irit Katriel in :gh:`79932`.)
+
Pending Removal in Python 3.14
------------------------------