Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c0bc0b46
Commit
c0bc0b46
authored
Feb 09, 2014
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20500: Note other public APIs with the new assertion
parent
0c3949c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
Doc/c-api/object.rst
Doc/c-api/object.rst
+5
-2
Doc/c-api/veryhigh.rst
Doc/c-api/veryhigh.rst
+4
-0
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.4.rst
+9
-5
No files found.
Doc/c-api/object.rst
View file @
c0bc0b46
...
...
@@ -149,6 +149,9 @@ Object Protocol
representation on success, *NULL* on failure. This is the equivalent of the
Python expression ``repr(o)``. Called by the :func:`repr` built-in function.
.. versionchanged:: 3.4
This function now includes a debug assertion to help ensure that it
does not silently discard an active exception.
.. c:function:: PyObject* PyObject_ASCII(PyObject *o)
...
...
@@ -171,8 +174,8 @@ Object Protocol
and, therefore, by the :func:`print` function.
.. versionchanged:: 3.4
This function now includes a debug assertion t
hat ensures it does no
t
silently discard an active exception.
This function now includes a debug assertion t
o help ensure that i
t
does not
silently discard an active exception.
.. c:function:: PyObject* PyObject_Bytes(PyObject *o)
...
...
Doc/c-api/veryhigh.rst
View file @
c0bc0b46
...
...
@@ -322,6 +322,10 @@ the same library that the Python runtime is using.
it causes an exception to immediately be thrown; this is used for the
:meth:`~generator.throw` methods of generator objects.
.. versionchanged:: 3.4
This function now includes a debug assertion to help ensure that it
does not silently discard an active exception.
.. c:function:: int PyEval_MergeCompilerFlags(PyCompilerFlags *cf)
...
...
Doc/whatsnew/3.4.rst
View file @
c0bc0b46
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment