Skip to content

Commit

Permalink
pythongh-95914: Add What's New item describing PEP 670 changes (pytho…
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach authored Oct 17, 2022
1 parent 0f156c1 commit aafc53c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,17 @@ New Features
Porting to Python 3.11
----------------------

* Some macros have been converted to static inline functions to avoid
`macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_.
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
Expand Down

0 comments on commit aafc53c

Please sign in to comment.