Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 24 additions & 28 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1340,34 +1340,30 @@ Exception types
OSError aliases
---------------

The following are a compatibility aliases to :c:data:`PyExc_OSError`.

.. versionchanged:: 3.3
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:

.. [win]
:c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that
uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined.
The following are :term:`soft deprecated` compatibility aliases
to :c:data:`PyExc_OSError`.

.. stable-abi-note::

These pointers are part of the :ref:`Stable ABI <stable>` since the
version in the *S.ABI* column (or since 3.2 when *S.ABI* is empty).

.. c:var:: PyObject *PyExc_EnvironmentError

.. soft-deprecated:: next
Use :c:data:`PyExc_OSError` instead.

.. c:var:: PyObject *PyExc_IOError

.. soft-deprecated:: next
Use :c:data:`PyExc_OSError` instead.

.. c:var:: PyObject *PyExc_WindowsError

.. availability:: Windows

.. soft-deprecated:: next
Use :c:data:`PyExc_OSError` instead.


.. _standardwarningcategories:
Expand Down
3 changes: 3 additions & 0 deletions Doc/tools/removed-ids.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,6 @@ library/turtle.html: introduction
# Wrong exception names in 'concurrent.interpreters' docs (gh-136563)
library/concurrent.interpreters.html: concurrent.interpreters.QueueEmptyError
library/concurrent.interpreters.html: concurrent.interpreters.QueueFullError

# Removed footnote
c-api/exceptions.html: win
Loading