From: Ken Jin Date: Mon, 9 May 2022 13:45:13 +0000 (+0800) Subject: gh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew (GH-92552) X-Git-Tag: v3.12.0a1~1618 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be3cdd66c95806c648b6000c2b9f0e8417473eb8;p=thirdparty%2FPython%2Fcpython.git gh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew (GH-92552) --- diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index ab760d166030..fd7082e9fd74 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -891,10 +891,11 @@ holds execution information. The following are new frame optimizations: - Streamlined the internal frame struct to contain only essential information. Frames previously held extra debugging and memory management information. -Old-style frame objects are now created only when required by debuggers. For -most user code, no frame objects are created at all. As a result, nearly all -Python functions calls have sped up significantly. We measured a 3-7% speedup -in pyperformance. +Old-style frame objects are now created only when requested by debuggers or +by Python introspection functions such as ``sys._getframe`` or +``inspect.currentframe``. For most user code, no frame objects are +created at all. As a result, nearly all Python functions calls have sped +up significantly. We measured a 3-7% speedup in pyperformance. (Contributed by Mark Shannon in :issue:`44590`.)