gh-79932: raise exception if frame.clear() is called on a suspended frame (#111792)

This commit is contained in:
Irit Katriel 2023-11-07 08:49:30 +00:00 committed by GitHub
parent d2ddfccfb4
commit 13405ecffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 7 deletions

View file

@ -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: