mirror of https://github.com/python/cpython.git
gh-102192: deprecate _PyErr_ChainExceptions (#102935)
This commit is contained in:
parent
848bdbe166
commit
06249ec89f
|
@ -975,6 +975,10 @@ New Features
|
||||||
This is less error prone and a bit more efficient.
|
This is less error prone and a bit more efficient.
|
||||||
(Contributed by Mark Shannon in :gh:`101578`.)
|
(Contributed by Mark Shannon in :gh:`101578`.)
|
||||||
|
|
||||||
|
* Add ``_PyErr_ChainExceptions1``, which takes an exception instance,
|
||||||
|
to replace the legacy-API ``_PyErr_ChainExceptions``, which is now
|
||||||
|
deprecated. (Contributed by Mark Shannon in :gh:`101578`.)
|
||||||
|
|
||||||
* Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs`
|
* Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs`
|
||||||
as convenience functions for retrieving and modifying
|
as convenience functions for retrieving and modifying
|
||||||
the :attr:`~BaseException.args` passed to the exception's constructor.
|
the :attr:`~BaseException.args` passed to the exception's constructor.
|
||||||
|
@ -1125,6 +1129,8 @@ Deprecated
|
||||||
* :c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException`
|
* :c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException`
|
||||||
instead. (Contributed by Irit Katriel in :gh:`102755`).
|
instead. (Contributed by Irit Katriel in :gh:`102755`).
|
||||||
|
|
||||||
|
* ``_PyErr_ChainExceptions`` is deprecated. Use ``_PyErr_ChainExceptions1``
|
||||||
|
instead. (Contributed by Irit Katriel in :gh:`102192`.)
|
||||||
|
|
||||||
Removed
|
Removed
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -98,7 +98,7 @@ PyAPI_FUNC(void) _PyErr_GetExcInfo(PyThreadState *, PyObject **, PyObject **, Py
|
||||||
|
|
||||||
/* Context manipulation (PEP 3134) */
|
/* Context manipulation (PEP 3134) */
|
||||||
|
|
||||||
PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);
|
Py_DEPRECATED(3.12) PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);
|
||||||
PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *);
|
PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *);
|
||||||
|
|
||||||
/* Like PyErr_Format(), but saves current exception as __context__ and
|
/* Like PyErr_Format(), but saves current exception as __context__ and
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Deprecated ``_PyErr_ChainExceptions`` in favour of
|
||||||
|
``_PyErr_ChainExceptions1``.
|
Loading…
Reference in New Issue