From: C.A.M. Gerlach Date: Mon, 17 Oct 2022 19:16:37 +0000 (-0500) Subject: gh-95914: Add What's New item describing PEP 670 changes (#98315) X-Git-Tag: v3.12.0a1~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aafc53c0a6d1450dcfbc3f994318025ffb49ce73;p=thirdparty%2FPython%2Fcpython.git gh-95914: Add What's New item describing PEP 670 changes (#98315) --- diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 73e23a1a9e7f..1e93fcaaf791 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1895,6 +1895,17 @@ New Features Porting to Python 3.11 ---------------------- +* Some macros have been converted to static inline functions to avoid + `macro pitfalls `_. + The change should be mostly transparent to users, + as the replacement functions will cast their arguments to the expected types + to avoid compiler warnings due to static type checks. + However, when the limited C API is set to >=3.11, + these casts are not done, + and callers will need to cast arguments to their expected types. + See :pep:`670` for more details. + (Contributed by Victor Stinner and Erlend E. Aasland in :gh:`89653`.) + * :c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback`` arguments, the interpreter now derives those values from the exception instance (the ``value`` argument). The function still steals references