[Python-checkins] gh-103193: Celebrate performance improvements to `inspect.getattr_static` in 'What's New in Python 3.12' (#103349)

AlexWaygood webhook-mailer at python.org
Fri Apr 7 13:15:05 EDT 2023


https://github.com/python/cpython/commit/04501ee57e7f6ef216b15b45785285fe4acebc42
commit: 04501ee57e7f6ef216b15b45785285fe4acebc42
branch: main
author: Alex Waygood <Alex.Waygood at Gmail.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-04-07T18:14:50+01:00
summary:

gh-103193: Celebrate performance improvements to `inspect.getattr_static` in 'What's New in Python 3.12' (#103349)

files:
M Doc/whatsnew/3.12.rst

diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 23524ec5d7d4..3a12fb20c43c 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -255,6 +255,10 @@ inspect
   for determining the current state of asynchronous generators.
   (Contributed by Thomas Krennwallner in :issue:`35759`.)
 
+* The performance of :func:`inspect.getattr_static` has been considerably
+  improved. Most calls to the function should be around 2x faster than they
+  were in Python 3.11. (Contributed by Alex Waygood in :gh:`103193`.)
+
 pathlib
 -------
 



More information about the Python-checkins mailing list