https://github.com/python/cpython/commit/dbd0d9b8a9760a39c0cc2fa6a39c375db44cb08a
commit: dbd0d9b8a9760a39c0cc2fa6a39c375db44cb08a
branch: main
author: Petr Viktorin <[email protected]>
committer: encukou <[email protected]>
date: 2026-10-21T23:48:53+02:00
summary:

Soft-deprecate C-API OSError aliases (GH-160111)

files:
M Doc/c-api/exceptions.rst
M Doc/tools/removed-ids.txt

diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index 55b7e36b9b680e..ba4e2a418b2a49 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -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:
diff --git a/Doc/tools/removed-ids.txt b/Doc/tools/removed-ids.txt
index be3ed35de44855..cc5ec51b541ab3 100644
--- a/Doc/tools/removed-ids.txt
+++ b/Doc/tools/removed-ids.txt
@@ -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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to