[3.13] gh-136209: Add .. c:var:: declarations for C exception types (GH-136210) (GH-136503)

(cherry picked from commit 85bc89f35f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2025-07-10 15:10:51 +02:00 committed by GitHub
parent a2140fad71
commit 15e9c3bc51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 182 additions and 315 deletions

View file

@ -970,184 +970,135 @@ these are the C equivalent to :func:`reprlib.recursive_repr`.
.. _standardexceptions: .. _standardexceptions:
Standard Exceptions Exception and warning types
=================== ===========================
All standard Python exceptions are available as global variables whose names are All standard Python exceptions and warning categories are available as global
``PyExc_`` followed by the Python exception name. These have the type variables whose names are ``PyExc_`` followed by the Python exception name.
:c:expr:`PyObject*`; they are all class objects. For completeness, here are all These have the type :c:expr:`PyObject*`; they are all class objects.
the variables:
.. index:: For completeness, here are all the variables:
single: PyExc_BaseException (C var)
single: PyExc_BaseExceptionGroup (C var)
single: PyExc_Exception (C var)
single: PyExc_ArithmeticError (C var)
single: PyExc_AssertionError (C var)
single: PyExc_AttributeError (C var)
single: PyExc_BlockingIOError (C var)
single: PyExc_BrokenPipeError (C var)
single: PyExc_BufferError (C var)
single: PyExc_ChildProcessError (C var)
single: PyExc_ConnectionAbortedError (C var)
single: PyExc_ConnectionError (C var)
single: PyExc_ConnectionRefusedError (C var)
single: PyExc_ConnectionResetError (C var)
single: PyExc_EOFError (C var)
single: PyExc_FileExistsError (C var)
single: PyExc_FileNotFoundError (C var)
single: PyExc_FloatingPointError (C var)
single: PyExc_GeneratorExit (C var)
single: PyExc_ImportError (C var)
single: PyExc_IndentationError (C var)
single: PyExc_IndexError (C var)
single: PyExc_InterruptedError (C var)
single: PyExc_IsADirectoryError (C var)
single: PyExc_KeyError (C var)
single: PyExc_KeyboardInterrupt (C var)
single: PyExc_LookupError (C var)
single: PyExc_MemoryError (C var)
single: PyExc_ModuleNotFoundError (C var)
single: PyExc_NameError (C var)
single: PyExc_NotADirectoryError (C var)
single: PyExc_NotImplementedError (C var)
single: PyExc_OSError (C var)
single: PyExc_OverflowError (C var)
single: PyExc_PermissionError (C var)
single: PyExc_ProcessLookupError (C var)
single: PyExc_PythonFinalizationError (C var)
single: PyExc_RecursionError (C var)
single: PyExc_ReferenceError (C var)
single: PyExc_RuntimeError (C var)
single: PyExc_StopAsyncIteration (C var)
single: PyExc_StopIteration (C var)
single: PyExc_SyntaxError (C var)
single: PyExc_SystemError (C var)
single: PyExc_SystemExit (C var)
single: PyExc_TabError (C var)
single: PyExc_TimeoutError (C var)
single: PyExc_TypeError (C var)
single: PyExc_UnboundLocalError (C var)
single: PyExc_UnicodeDecodeError (C var)
single: PyExc_UnicodeEncodeError (C var)
single: PyExc_UnicodeError (C var)
single: PyExc_UnicodeTranslateError (C var)
single: PyExc_ValueError (C var)
single: PyExc_ZeroDivisionError (C var)
+-----------------------------------------+---------------------------------+----------+ Exception types
| C Name | Python Name | Notes | ---------------
+=========================================+=================================+==========+
| :c:data:`PyExc_BaseException` | :exc:`BaseException` | [1]_ | .. list-table::
+-----------------------------------------+---------------------------------+----------+ :align: left
| :c:data:`PyExc_BaseExceptionGroup` | :exc:`BaseExceptionGroup` | [1]_ | :widths: auto
+-----------------------------------------+---------------------------------+----------+ :header-rows: 1
| :c:data:`PyExc_Exception` | :exc:`Exception` | [1]_ |
+-----------------------------------------+---------------------------------+----------+ * * C name
| :c:data:`PyExc_ArithmeticError` | :exc:`ArithmeticError` | [1]_ | * Python name
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_BaseException
| :c:data:`PyExc_AssertionError` | :exc:`AssertionError` | | * :exc:`BaseException`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_BaseExceptionGroup
| :c:data:`PyExc_AttributeError` | :exc:`AttributeError` | | * :exc:`BaseExceptionGroup`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_Exception
| :c:data:`PyExc_BlockingIOError` | :exc:`BlockingIOError` | | * :exc:`Exception`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ArithmeticError
| :c:data:`PyExc_BrokenPipeError` | :exc:`BrokenPipeError` | | * :exc:`ArithmeticError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_AssertionError
| :c:data:`PyExc_BufferError` | :exc:`BufferError` | | * :exc:`AssertionError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_AttributeError
| :c:data:`PyExc_ChildProcessError` | :exc:`ChildProcessError` | | * :exc:`AttributeError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_BlockingIOError
| :c:data:`PyExc_ConnectionAbortedError` | :exc:`ConnectionAbortedError` | | * :exc:`BlockingIOError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_BrokenPipeError
| :c:data:`PyExc_ConnectionError` | :exc:`ConnectionError` | | * :exc:`BrokenPipeError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_BufferError
| :c:data:`PyExc_ConnectionRefusedError` | :exc:`ConnectionRefusedError` | | * :exc:`BufferError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ChildProcessError
| :c:data:`PyExc_ConnectionResetError` | :exc:`ConnectionResetError` | | * :exc:`ChildProcessError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ConnectionAbortedError
| :c:data:`PyExc_EOFError` | :exc:`EOFError` | | * :exc:`ConnectionAbortedError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ConnectionError
| :c:data:`PyExc_FileExistsError` | :exc:`FileExistsError` | | * :exc:`ConnectionError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ConnectionRefusedError
| :c:data:`PyExc_FileNotFoundError` | :exc:`FileNotFoundError` | | * :exc:`ConnectionRefusedError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ConnectionResetError
| :c:data:`PyExc_FloatingPointError` | :exc:`FloatingPointError` | | * :exc:`ConnectionResetError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_EOFError
| :c:data:`PyExc_GeneratorExit` | :exc:`GeneratorExit` | | * :exc:`EOFError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_FileExistsError
| :c:data:`PyExc_ImportError` | :exc:`ImportError` | | * :exc:`FileExistsError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_FileNotFoundError
| :c:data:`PyExc_IndentationError` | :exc:`IndentationError` | | * :exc:`FileNotFoundError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_FloatingPointError
| :c:data:`PyExc_IndexError` | :exc:`IndexError` | | * :exc:`FloatingPointError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_GeneratorExit
| :c:data:`PyExc_InterruptedError` | :exc:`InterruptedError` | | * :exc:`GeneratorExit`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ImportError
| :c:data:`PyExc_IsADirectoryError` | :exc:`IsADirectoryError` | | * :exc:`ImportError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_IndentationError
| :c:data:`PyExc_KeyError` | :exc:`KeyError` | | * :exc:`IndentationError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_IndexError
| :c:data:`PyExc_KeyboardInterrupt` | :exc:`KeyboardInterrupt` | | * :exc:`IndexError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_InterruptedError
| :c:data:`PyExc_LookupError` | :exc:`LookupError` | [1]_ | * :exc:`InterruptedError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_IsADirectoryError
| :c:data:`PyExc_MemoryError` | :exc:`MemoryError` | | * :exc:`IsADirectoryError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_KeyError
| :c:data:`PyExc_ModuleNotFoundError` | :exc:`ModuleNotFoundError` | | * :exc:`KeyError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_KeyboardInterrupt
| :c:data:`PyExc_NameError` | :exc:`NameError` | | * :exc:`KeyboardInterrupt`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_LookupError
| :c:data:`PyExc_NotADirectoryError` | :exc:`NotADirectoryError` | | * :exc:`LookupError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_MemoryError
| :c:data:`PyExc_NotImplementedError` | :exc:`NotImplementedError` | | * :exc:`MemoryError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ModuleNotFoundError
| :c:data:`PyExc_OSError` | :exc:`OSError` | [1]_ | * :exc:`ModuleNotFoundError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_NameError
| :c:data:`PyExc_OverflowError` | :exc:`OverflowError` | | * :exc:`NameError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_NotADirectoryError
| :c:data:`PyExc_PermissionError` | :exc:`PermissionError` | | * :exc:`NotADirectoryError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_NotImplementedError
| :c:data:`PyExc_ProcessLookupError` | :exc:`ProcessLookupError` | | * :exc:`NotImplementedError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_OSError
| :c:data:`PyExc_PythonFinalizationError` | :exc:`PythonFinalizationError` | | * :exc:`OSError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_OverflowError
| :c:data:`PyExc_RecursionError` | :exc:`RecursionError` | | * :exc:`OverflowError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_PermissionError
| :c:data:`PyExc_ReferenceError` | :exc:`ReferenceError` | | * :exc:`PermissionError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ProcessLookupError
| :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | | * :exc:`ProcessLookupError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_PythonFinalizationError
| :c:data:`PyExc_StopAsyncIteration` | :exc:`StopAsyncIteration` | | * :exc:`PythonFinalizationError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_RecursionError
| :c:data:`PyExc_StopIteration` | :exc:`StopIteration` | | * :exc:`RecursionError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_ReferenceError
| :c:data:`PyExc_SyntaxError` | :exc:`SyntaxError` | | * :exc:`ReferenceError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_RuntimeError
| :c:data:`PyExc_SystemError` | :exc:`SystemError` | | * :exc:`RuntimeError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_StopAsyncIteration
| :c:data:`PyExc_SystemExit` | :exc:`SystemExit` | | * :exc:`StopAsyncIteration`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_StopIteration
| :c:data:`PyExc_TabError` | :exc:`TabError` | | * :exc:`StopIteration`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_SyntaxError
| :c:data:`PyExc_TimeoutError` | :exc:`TimeoutError` | | * :exc:`SyntaxError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_SystemError
| :c:data:`PyExc_TypeError` | :exc:`TypeError` | | * :exc:`SystemError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_SystemExit
| :c:data:`PyExc_UnboundLocalError` | :exc:`UnboundLocalError` | | * :exc:`SystemExit`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_TabError
| :c:data:`PyExc_UnicodeDecodeError` | :exc:`UnicodeDecodeError` | | * :exc:`TabError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_TimeoutError
| :c:data:`PyExc_UnicodeEncodeError` | :exc:`UnicodeEncodeError` | | * :exc:`TimeoutError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_TypeError
| :c:data:`PyExc_UnicodeError` | :exc:`UnicodeError` | | * :exc:`TypeError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_UnboundLocalError
| :c:data:`PyExc_UnicodeTranslateError` | :exc:`UnicodeTranslateError` | | * :exc:`UnboundLocalError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_UnicodeDecodeError
| :c:data:`PyExc_ValueError` | :exc:`ValueError` | | * :exc:`UnicodeDecodeError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_UnicodeEncodeError
| :c:data:`PyExc_ZeroDivisionError` | :exc:`ZeroDivisionError` | | * :exc:`UnicodeEncodeError`
+-----------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_UnicodeError
* :exc:`UnicodeError`
* * .. c:var:: PyObject *PyExc_UnicodeTranslateError
* :exc:`UnicodeTranslateError`
* * .. c:var:: PyObject *PyExc_ValueError
* :exc:`ValueError`
* * .. c:var:: PyObject *PyExc_ZeroDivisionError
* :exc:`ZeroDivisionError`
.. versionadded:: 3.3 .. versionadded:: 3.3
:c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`,
@ -1168,94 +1119,79 @@ the variables:
.. versionadded:: 3.11 .. versionadded:: 3.11
:c:data:`PyExc_BaseExceptionGroup`. :c:data:`PyExc_BaseExceptionGroup`.
These are compatibility aliases to :c:data:`PyExc_OSError`:
.. index:: OSError aliases
single: PyExc_EnvironmentError (C var) ---------------
single: PyExc_IOError (C var)
single: PyExc_WindowsError (C var)
+-------------------------------------+----------+ The following are a compatibility aliases to :c:data:`PyExc_OSError`.
| C Name | Notes |
+=====================================+==========+
| :c:data:`!PyExc_EnvironmentError` | |
+-------------------------------------+----------+
| :c:data:`!PyExc_IOError` | |
+-------------------------------------+----------+
| :c:data:`!PyExc_WindowsError` | [2]_ |
+-------------------------------------+----------+
.. versionchanged:: 3.3 .. versionchanged:: 3.3
These aliases used to be separate exception types. These aliases used to be separate exception types.
.. list-table::
:align: left
:widths: auto
:header-rows: 1
* * C name
* Python name
* Notes
* * .. c:var:: PyObject *PyExc_EnvironmentError
* :exc:`OSError`
*
* * .. c:var:: PyObject *PyExc_IOError
* :exc:`OSError`
*
* * .. c:var:: PyObject *PyExc_WindowsError
* :exc:`OSError`
* [win]_
Notes: Notes:
.. [1] .. [win]
This is a base class for other standard exceptions. :c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that
uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined.
.. [2]
Only defined on Windows; protect code that uses this by testing that the
preprocessor macro ``MS_WINDOWS`` is defined.
.. _standardwarningcategories: .. _standardwarningcategories:
Standard Warning Categories Warning types
=========================== -------------
All standard Python warning categories are available as global variables whose .. list-table::
names are ``PyExc_`` followed by the Python exception name. These have the type :align: left
:c:expr:`PyObject*`; they are all class objects. For completeness, here are all :widths: auto
the variables: :header-rows: 1
.. index:: * * C name
single: PyExc_Warning (C var) * Python name
single: PyExc_BytesWarning (C var) * * .. c:var:: PyObject *PyExc_Warning
single: PyExc_DeprecationWarning (C var) * :exc:`Warning`
single: PyExc_EncodingWarning (C var) * * .. c:var:: PyObject *PyExc_BytesWarning
single: PyExc_FutureWarning (C var) * :exc:`BytesWarning`
single: PyExc_ImportWarning (C var) * * .. c:var:: PyObject *PyExc_DeprecationWarning
single: PyExc_PendingDeprecationWarning (C var) * :exc:`DeprecationWarning`
single: PyExc_ResourceWarning (C var) * * .. c:var:: PyObject *PyExc_EncodingWarning
single: PyExc_RuntimeWarning (C var) * :exc:`EncodingWarning`
single: PyExc_SyntaxWarning (C var) * * .. c:var:: PyObject *PyExc_FutureWarning
single: PyExc_UnicodeWarning (C var) * :exc:`FutureWarning`
single: PyExc_UserWarning (C var) * * .. c:var:: PyObject *PyExc_ImportWarning
* :exc:`ImportWarning`
+------------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_PendingDeprecationWarning
| C Name | Python Name | Notes | * :exc:`PendingDeprecationWarning`
+==========================================+=================================+==========+ * * .. c:var:: PyObject *PyExc_ResourceWarning
| :c:data:`PyExc_Warning` | :exc:`Warning` | [3]_ | * :exc:`ResourceWarning`
+------------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_RuntimeWarning
| :c:data:`PyExc_BytesWarning` | :exc:`BytesWarning` | | * :exc:`RuntimeWarning`
+------------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_SyntaxWarning
| :c:data:`PyExc_DeprecationWarning` | :exc:`DeprecationWarning` | | * :exc:`SyntaxWarning`
+------------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_UnicodeWarning
| :c:data:`PyExc_EncodingWarning` | :exc:`EncodingWarning` | | * :exc:`UnicodeWarning`
+------------------------------------------+---------------------------------+----------+ * * .. c:var:: PyObject *PyExc_UserWarning
| :c:data:`PyExc_FutureWarning` | :exc:`FutureWarning` | | * :exc:`UserWarning`
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ImportWarning` | :exc:`ImportWarning` | |
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_PendingDeprecationWarning`| :exc:`PendingDeprecationWarning`| |
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ResourceWarning` | :exc:`ResourceWarning` | |
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_RuntimeWarning` | :exc:`RuntimeWarning` | |
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_SyntaxWarning` | :exc:`SyntaxWarning` | |
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_UnicodeWarning` | :exc:`UnicodeWarning` | |
+------------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_UserWarning` | :exc:`UserWarning` | |
+------------------------------------------+---------------------------------+----------+
.. versionadded:: 3.2 .. versionadded:: 3.2
:c:data:`PyExc_ResourceWarning`. :c:data:`PyExc_ResourceWarning`.
.. versionadded:: 3.10 .. versionadded:: 3.10
:c:data:`PyExc_EncodingWarning`. :c:data:`PyExc_EncodingWarning`.
Notes:
.. [3]
This is a base class for other standard warning categories.

View file

@ -225,75 +225,6 @@
# Temporary undocumented names. # Temporary undocumented names.
# In future this list must be empty. # In future this list must be empty.
nitpick_ignore += [ nitpick_ignore += [
# C API: Standard Python exception classes
('c:data', 'PyExc_ArithmeticError'),
('c:data', 'PyExc_AssertionError'),
('c:data', 'PyExc_AttributeError'),
('c:data', 'PyExc_BaseException'),
('c:data', 'PyExc_BaseExceptionGroup'),
('c:data', 'PyExc_BlockingIOError'),
('c:data', 'PyExc_BrokenPipeError'),
('c:data', 'PyExc_BufferError'),
('c:data', 'PyExc_ChildProcessError'),
('c:data', 'PyExc_ConnectionAbortedError'),
('c:data', 'PyExc_ConnectionError'),
('c:data', 'PyExc_ConnectionRefusedError'),
('c:data', 'PyExc_ConnectionResetError'),
('c:data', 'PyExc_EOFError'),
('c:data', 'PyExc_Exception'),
('c:data', 'PyExc_FileExistsError'),
('c:data', 'PyExc_FileNotFoundError'),
('c:data', 'PyExc_FloatingPointError'),
('c:data', 'PyExc_GeneratorExit'),
('c:data', 'PyExc_ImportError'),
('c:data', 'PyExc_IndentationError'),
('c:data', 'PyExc_IndexError'),
('c:data', 'PyExc_InterruptedError'),
('c:data', 'PyExc_IsADirectoryError'),
('c:data', 'PyExc_KeyboardInterrupt'),
('c:data', 'PyExc_KeyError'),
('c:data', 'PyExc_LookupError'),
('c:data', 'PyExc_MemoryError'),
('c:data', 'PyExc_ModuleNotFoundError'),
('c:data', 'PyExc_NameError'),
('c:data', 'PyExc_NotADirectoryError'),
('c:data', 'PyExc_NotImplementedError'),
('c:data', 'PyExc_OSError'),
('c:data', 'PyExc_OverflowError'),
('c:data', 'PyExc_PermissionError'),
('c:data', 'PyExc_ProcessLookupError'),
('c:data', 'PyExc_PythonFinalizationError'),
('c:data', 'PyExc_RecursionError'),
('c:data', 'PyExc_ReferenceError'),
('c:data', 'PyExc_RuntimeError'),
('c:data', 'PyExc_StopAsyncIteration'),
('c:data', 'PyExc_StopIteration'),
('c:data', 'PyExc_SyntaxError'),
('c:data', 'PyExc_SystemError'),
('c:data', 'PyExc_SystemExit'),
('c:data', 'PyExc_TabError'),
('c:data', 'PyExc_TimeoutError'),
('c:data', 'PyExc_TypeError'),
('c:data', 'PyExc_UnboundLocalError'),
('c:data', 'PyExc_UnicodeDecodeError'),
('c:data', 'PyExc_UnicodeEncodeError'),
('c:data', 'PyExc_UnicodeError'),
('c:data', 'PyExc_UnicodeTranslateError'),
('c:data', 'PyExc_ValueError'),
('c:data', 'PyExc_ZeroDivisionError'),
# C API: Standard Python warning classes
('c:data', 'PyExc_BytesWarning'),
('c:data', 'PyExc_DeprecationWarning'),
('c:data', 'PyExc_EncodingWarning'),
('c:data', 'PyExc_FutureWarning'),
('c:data', 'PyExc_ImportWarning'),
('c:data', 'PyExc_PendingDeprecationWarning'),
('c:data', 'PyExc_ResourceWarning'),
('c:data', 'PyExc_RuntimeWarning'),
('c:data', 'PyExc_SyntaxWarning'),
('c:data', 'PyExc_UnicodeWarning'),
('c:data', 'PyExc_UserWarning'),
('c:data', 'PyExc_Warning'),
# Undocumented public C macros # Undocumented public C macros
('c:macro', 'Py_BUILD_ASSERT'), ('c:macro', 'Py_BUILD_ASSERT'),
('c:macro', 'Py_BUILD_ASSERT_EXPR'), ('c:macro', 'Py_BUILD_ASSERT_EXPR'),