diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2014-02-09 02:00:01 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2014-02-09 02:00:01 (GMT) |
commit | c0bc0b46bb4849934a81fe46d057d40fb64d203e (patch) | |
tree | c8447ab66a6838a17f90eeb40259e6bf2063dbcb /Doc/whatsnew | |
parent | 0c3949c963c9f39095f85c5ec24d0f958e915ae9 (diff) | |
download | cpython-c0bc0b46bb4849934a81fe46d057d40fb64d203e.zip cpython-c0bc0b46bb4849934a81fe46d057d40fb64d203e.tar.gz cpython-c0bc0b46bb4849934a81fe46d057d40fb64d203e.tar.bz2 |
Issue #20500: Note other public APIs with the new assertion
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.4.rst | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 5da98da..720ea6e 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -1708,12 +1708,16 @@ Changes in the Python API Changes in the C API -------------------- -* :c:func:`PyObject_Str` now includes a debug assertion that ensures it will - no longer silently discard currently active exceptions. In cases where +* :c:func:`PyEval_EvalFrameEx`, :c:func:`PyObject_Repr(), and + :c:func:`PyObject_Str`, along with some other internal C APIs, now include + a debugging assertion that ensures they are not used in situations where + they may silently discard a currently active exception. In cases where discarding the active exception is expected and desired (for example, - because it has already been saved locally with :c:func:`PyErr_Fetch`), an - explicit :c:func:`PyErr_Clear` call will be needed to avoid triggering the - assertion. + because it has already been saved locally with :c:func:`PyErr_Fetch` or + is being deliberately replaced with a different exception), an explicit + :c:func:`PyErr_Clear` call will be needed to avoid triggering the + assertion when running against a version of Python that is compiled with + assertions enabled. * :c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg** argument is not set. Previously only ``NULL`` was returned with no exception |