]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-150032: Tidy up 3.15 pending removals (#149594)
authorStan Ulbrych <stan@python.org>
Wed, 3 Jun 2026 14:29:13 +0000 (15:29 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2026 14:29:13 +0000 (17:29 +0300)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
Doc/c-api/interp-lifecycle.rst
Doc/c-api/unicode.rst
Doc/deprecations/c-api-pending-removal-in-3.15.rst
Doc/deprecations/c-api-pending-removal-in-3.16.rst
Doc/deprecations/index.rst
Doc/deprecations/pending-removal-in-3.15.rst
Doc/deprecations/pending-removal-in-3.16.rst
Doc/reference/datamodel.rst
Doc/tools/removed-ids.txt

index 8dee601d04876b8bc6906e0245942e78a1d0e78e..46f5b1dd33963c08016c87e2418b89b391189036 100644 (file)
@@ -104,7 +104,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    Set by the :option:`-b` option.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_DebugFlag
@@ -119,7 +119,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment
    variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_DontWriteBytecodeFlag
@@ -134,7 +134,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE`
    environment variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_FrozenFlag
@@ -145,7 +145,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    Private flag used by ``_freeze_module`` and ``frozenmain`` programs.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_HashRandomizationFlag
@@ -161,7 +161,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment
    variable to initialize the secret hash seed.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_IgnoreEnvironmentFlag
@@ -175,7 +175,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    Set by the :option:`-E` and :option:`-I` options.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_InspectFlag
@@ -191,7 +191,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment
    variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_InteractiveFlag
@@ -202,7 +202,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    Set by the :option:`-i` option.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_IsolatedFlag
@@ -218,7 +218,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    .. versionadded:: 3.4
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_LegacyWindowsFSEncodingFlag
@@ -238,7 +238,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    .. availability:: Windows.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_LegacyWindowsStdioFlag
@@ -257,7 +257,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    .. availability:: Windows.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_NoSiteFlag
@@ -273,7 +273,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    Set by the :option:`-S` option.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_NoUserSiteDirectory
@@ -288,7 +288,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-s` and :option:`-I` options, and the
    :envvar:`PYTHONNOUSERSITE` environment variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_OptimizeFlag
@@ -300,7 +300,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment
    variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_QuietFlag
@@ -315,7 +315,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
 
    .. versionadded:: 3.2
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_UnbufferedStdioFlag
@@ -329,7 +329,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED`
    environment variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 .. c:var:: int Py_VerboseFlag
@@ -346,7 +346,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
    Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment
    variable.
 
-   .. deprecated-removed:: 3.12 3.15
+   .. deprecated-removed:: 3.12 3.16
 
 
 Initializing and finalizing the interpreter
@@ -804,7 +804,7 @@ Process-wide parameters
    Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
    :c:expr:`wchar_t*` string.
 
-   .. deprecated-removed:: 3.11 3.15
+   .. deprecated-removed:: 3.11 3.16
 
 
 .. c:function:: const char* Py_GetVersion()
@@ -929,7 +929,7 @@ Process-wide parameters
 
    .. versionadded:: 3.1.3
 
-   .. deprecated-removed:: 3.11 3.15
+   .. deprecated-removed:: 3.11 3.16
 
 
 .. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
@@ -950,7 +950,7 @@ Process-wide parameters
 
    .. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
 
-   .. deprecated-removed:: 3.11 3.15
+   .. deprecated-removed:: 3.11 3.16
 
 
 .. c:function:: void Py_SetPythonHome(const wchar_t *home)
@@ -971,4 +971,4 @@ Process-wide parameters
    Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
    :c:expr:`wchar_t*` string.
 
-   .. deprecated-removed:: 3.11 3.15
+   .. deprecated-removed:: 3.11 3.16
index 401c99ebeb0fec67f431d5d9d0ee7dc14af9b44f..634dcbce7a57915584c62592a1517fe7a7c368cd 100644 (file)
@@ -1953,7 +1953,7 @@ The following API is deprecated.
       whether you selected a "narrow" or "wide" Unicode version of Python at
       build time.
 
-   .. deprecated-removed:: 3.13 3.15
+   .. deprecated-removed:: 3.13 3.16
 
 
 .. c:function:: int PyUnicode_READY(PyObject *unicode)
index 789ec83d2d957aa67c621bc809bb05b9eace1f5c..6d0d47403ff2ed43f2b22cde0b1782ee88b3c4c4 100644 (file)
@@ -46,88 +46,3 @@ Pending removal in Python 3.15
   The `pythoncapi-compat project
   <https://github.com/python/pythoncapi-compat/>`__ can be used to get
   :c:func:`PyConfig_Get` on Python 3.13 and older.
-
-* Functions to configure Python's initialization, deprecated in Python 3.11:
-
-  * :c:func:`!PySys_SetArgvEx()`:
-    Set :c:member:`PyConfig.argv` instead.
-  * :c:func:`!PySys_SetArgv()`:
-    Set :c:member:`PyConfig.argv` instead.
-  * :c:func:`!Py_SetProgramName()`:
-    Set :c:member:`PyConfig.program_name` instead.
-  * :c:func:`!Py_SetPythonHome()`:
-    Set :c:member:`PyConfig.home` instead.
-  * :c:func:`!PySys_ResetWarnOptions`:
-    Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead.
-
-  The :c:func:`Py_InitializeFromConfig` API should be used with
-  :c:type:`PyConfig` instead.
-
-* Global configuration variables:
-
-  * :c:var:`Py_DebugFlag`:
-    Use :c:member:`PyConfig.parser_debug` or
-    :c:func:`PyConfig_Get("parser_debug") <PyConfig_Get>` instead.
-  * :c:var:`Py_VerboseFlag`:
-    Use :c:member:`PyConfig.verbose` or
-    :c:func:`PyConfig_Get("verbose") <PyConfig_Get>` instead.
-  * :c:var:`Py_QuietFlag`:
-    Use :c:member:`PyConfig.quiet` or
-    :c:func:`PyConfig_Get("quiet") <PyConfig_Get>` instead.
-  * :c:var:`Py_InteractiveFlag`:
-    Use :c:member:`PyConfig.interactive` or
-    :c:func:`PyConfig_Get("interactive") <PyConfig_Get>` instead.
-  * :c:var:`Py_InspectFlag`:
-    Use :c:member:`PyConfig.inspect` or
-    :c:func:`PyConfig_Get("inspect") <PyConfig_Get>` instead.
-  * :c:var:`Py_OptimizeFlag`:
-    Use :c:member:`PyConfig.optimization_level` or
-    :c:func:`PyConfig_Get("optimization_level") <PyConfig_Get>` instead.
-  * :c:var:`Py_NoSiteFlag`:
-    Use :c:member:`PyConfig.site_import` or
-    :c:func:`PyConfig_Get("site_import") <PyConfig_Get>` instead.
-  * :c:var:`Py_BytesWarningFlag`:
-    Use :c:member:`PyConfig.bytes_warning` or
-    :c:func:`PyConfig_Get("bytes_warning") <PyConfig_Get>` instead.
-  * :c:var:`Py_FrozenFlag`:
-    Use :c:member:`PyConfig.pathconfig_warnings` or
-    :c:func:`PyConfig_Get("pathconfig_warnings") <PyConfig_Get>` instead.
-  * :c:var:`Py_IgnoreEnvironmentFlag`:
-    Use :c:member:`PyConfig.use_environment` or
-    :c:func:`PyConfig_Get("use_environment") <PyConfig_Get>` instead.
-  * :c:var:`Py_DontWriteBytecodeFlag`:
-    Use :c:member:`PyConfig.write_bytecode` or
-    :c:func:`PyConfig_Get("write_bytecode") <PyConfig_Get>` instead.
-  * :c:var:`Py_NoUserSiteDirectory`:
-    Use :c:member:`PyConfig.user_site_directory` or
-    :c:func:`PyConfig_Get("user_site_directory") <PyConfig_Get>` instead.
-  * :c:var:`Py_UnbufferedStdioFlag`:
-    Use :c:member:`PyConfig.buffered_stdio` or
-    :c:func:`PyConfig_Get("buffered_stdio") <PyConfig_Get>` instead.
-  * :c:var:`Py_HashRandomizationFlag`:
-    Use :c:member:`PyConfig.use_hash_seed`
-    and :c:member:`PyConfig.hash_seed` or
-    :c:func:`PyConfig_Get("hash_seed") <PyConfig_Get>` instead.
-  * :c:var:`Py_IsolatedFlag`:
-    Use :c:member:`PyConfig.isolated` or
-    :c:func:`PyConfig_Get("isolated") <PyConfig_Get>` instead.
-  * :c:var:`Py_LegacyWindowsFSEncodingFlag`:
-    Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` or
-    :c:func:`PyConfig_Get("legacy_windows_fs_encoding") <PyConfig_Get>` instead.
-  * :c:var:`Py_LegacyWindowsStdioFlag`:
-    Use :c:member:`PyConfig.legacy_windows_stdio` or
-    :c:func:`PyConfig_Get("legacy_windows_stdio") <PyConfig_Get>` instead.
-  * :c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!Py_HasFileSystemDefaultEncoding`:
-    Use :c:member:`PyConfig.filesystem_encoding` or
-    :c:func:`PyConfig_Get("filesystem_encoding") <PyConfig_Get>` instead.
-  * :c:var:`!Py_FileSystemDefaultEncodeErrors`:
-    Use :c:member:`PyConfig.filesystem_errors` or
-    :c:func:`PyConfig_Get("filesystem_errors") <PyConfig_Get>` instead.
-  * :c:var:`!Py_UTF8Mode`:
-    Use :c:member:`PyPreConfig.utf8_mode` or
-    :c:func:`PyConfig_Get("utf8_mode") <PyConfig_Get>` instead.
-    (see :c:func:`Py_PreInitialize`)
-
-  The :c:func:`Py_InitializeFromConfig` API should be used with
-  :c:type:`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be
-  used to get these options at runtime.
index 9453f83799c43d7bd10fa7979f2b35675798faeb..fe2d91cf316b18ff9f67da11b43e63b6ce11cd0d 100644 (file)
@@ -1,4 +1,87 @@
 Pending removal in Python 3.16
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-* The bundled copy of ``libmpdec``.
+* Functions to configure Python's initialization, deprecated in Python 3.11:
+
+  * :c:func:`!PySys_SetArgvEx()`:
+    Set :c:member:`PyConfig.argv` instead.
+  * :c:func:`!PySys_SetArgv()`:
+    Set :c:member:`PyConfig.argv` instead.
+  * :c:func:`!Py_SetProgramName()`:
+    Set :c:member:`PyConfig.program_name` instead.
+  * :c:func:`!Py_SetPythonHome()`:
+    Set :c:member:`PyConfig.home` instead.
+
+  The :c:func:`Py_InitializeFromConfig` API should be used with
+  :c:type:`PyConfig` instead.
+
+* Global configuration variables:
+
+  * :c:var:`Py_DebugFlag`:
+    Use :c:member:`PyConfig.parser_debug` or
+    :c:func:`PyConfig_Get("parser_debug") <PyConfig_Get>` instead.
+  * :c:var:`Py_VerboseFlag`:
+    Use :c:member:`PyConfig.verbose` or
+    :c:func:`PyConfig_Get("verbose") <PyConfig_Get>` instead.
+  * :c:var:`Py_QuietFlag`:
+    Use :c:member:`PyConfig.quiet` or
+    :c:func:`PyConfig_Get("quiet") <PyConfig_Get>` instead.
+  * :c:var:`Py_InteractiveFlag`:
+    Use :c:member:`PyConfig.interactive` or
+    :c:func:`PyConfig_Get("interactive") <PyConfig_Get>` instead.
+  * :c:var:`Py_InspectFlag`:
+    Use :c:member:`PyConfig.inspect` or
+    :c:func:`PyConfig_Get("inspect") <PyConfig_Get>` instead.
+  * :c:var:`Py_OptimizeFlag`:
+    Use :c:member:`PyConfig.optimization_level` or
+    :c:func:`PyConfig_Get("optimization_level") <PyConfig_Get>` instead.
+  * :c:var:`Py_NoSiteFlag`:
+    Use :c:member:`PyConfig.site_import` or
+    :c:func:`PyConfig_Get("site_import") <PyConfig_Get>` instead.
+  * :c:var:`Py_BytesWarningFlag`:
+    Use :c:member:`PyConfig.bytes_warning` or
+    :c:func:`PyConfig_Get("bytes_warning") <PyConfig_Get>` instead.
+  * :c:var:`Py_FrozenFlag`:
+    Use :c:member:`PyConfig.pathconfig_warnings` or
+    :c:func:`PyConfig_Get("pathconfig_warnings") <PyConfig_Get>` instead.
+  * :c:var:`Py_IgnoreEnvironmentFlag`:
+    Use :c:member:`PyConfig.use_environment` or
+    :c:func:`PyConfig_Get("use_environment") <PyConfig_Get>` instead.
+  * :c:var:`Py_DontWriteBytecodeFlag`:
+    Use :c:member:`PyConfig.write_bytecode` or
+    :c:func:`PyConfig_Get("write_bytecode") <PyConfig_Get>` instead.
+  * :c:var:`Py_NoUserSiteDirectory`:
+    Use :c:member:`PyConfig.user_site_directory` or
+    :c:func:`PyConfig_Get("user_site_directory") <PyConfig_Get>` instead.
+  * :c:var:`Py_UnbufferedStdioFlag`:
+    Use :c:member:`PyConfig.buffered_stdio` or
+    :c:func:`PyConfig_Get("buffered_stdio") <PyConfig_Get>` instead.
+  * :c:var:`Py_HashRandomizationFlag`:
+    Use :c:member:`PyConfig.use_hash_seed`
+    and :c:member:`PyConfig.hash_seed` or
+    :c:func:`PyConfig_Get("hash_seed") <PyConfig_Get>` instead.
+  * :c:var:`Py_IsolatedFlag`:
+    Use :c:member:`PyConfig.isolated` or
+    :c:func:`PyConfig_Get("isolated") <PyConfig_Get>` instead.
+  * :c:var:`Py_LegacyWindowsFSEncodingFlag`:
+    Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` or
+    :c:func:`PyConfig_Get("legacy_windows_fs_encoding") <PyConfig_Get>` instead.
+  * :c:var:`Py_LegacyWindowsStdioFlag`:
+    Use :c:member:`PyConfig.legacy_windows_stdio` or
+    :c:func:`PyConfig_Get("legacy_windows_stdio") <PyConfig_Get>` instead.
+  * :c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!Py_HasFileSystemDefaultEncoding`:
+    Use :c:member:`PyConfig.filesystem_encoding` or
+    :c:func:`PyConfig_Get("filesystem_encoding") <PyConfig_Get>` instead.
+  * :c:var:`!Py_FileSystemDefaultEncodeErrors`:
+    Use :c:member:`PyConfig.filesystem_errors` or
+    :c:func:`PyConfig_Get("filesystem_errors") <PyConfig_Get>` instead.
+  * :c:var:`!Py_UTF8Mode`:
+    Use :c:member:`PyPreConfig.utf8_mode` or
+    :c:func:`PyConfig_Get("utf8_mode") <PyConfig_Get>` instead.
+    (see :c:func:`Py_PreInitialize`)
+
+  The :c:func:`Py_InitializeFromConfig` API should be used with
+  :c:type:`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be
+  used to get these options at runtime.
+
+* :c:type:`Py_UNICODE` which was deprecated by :pep:`393`.
index 50e1b126fd1346dbd2e76075557708b57d4ef4d4..0ac0a0289d5fd4093c402d7d3093d8cc7ff23977 100644 (file)
@@ -1,8 +1,6 @@
 Deprecations
 ============
 
-.. include:: pending-removal-in-3.15.rst
-
 .. include:: pending-removal-in-3.16.rst
 
 .. include:: pending-removal-in-3.17.rst
@@ -22,8 +20,6 @@ Deprecations
 C API deprecations
 ------------------
 
-.. include:: c-api-pending-removal-in-3.15.rst
-
 .. include:: c-api-pending-removal-in-3.16.rst
 
 .. include:: c-api-pending-removal-in-3.18.rst
index ac4014da52b9a483f20417386630604d466a5766..5c0e592f4caeda1e1bc9c7a9b01b64d6a5f9e524 100644 (file)
@@ -8,11 +8,6 @@ Pending removal in Python 3.15
     is deprecated. In Python 3.15, ``__cached__`` will cease to be set or
     take into consideration by the import system or standard library. (:gh:`97879`)
 
-  * Setting :attr:`~module.__package__` on a module while
-    failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
-    is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or
-    take into consideration by the import system or standard library. (:gh:`97879`)
-
 * :mod:`ctypes`:
 
   * The undocumented :func:`!ctypes.SetPointerType` function
index 7606daba16dcf82aa13390f52cfbbf431219c8ce..5a28cc766a959611d8ef8062efa26452083da08b 100644 (file)
@@ -8,6 +8,13 @@ Pending removal in Python 3.16
     is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or
     taken into consideration by the import system or the standard library.
 
+  * Setting :attr:`~module.__package__` on a module while
+    failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
+    is deprecated. In Python 3.16, :attr:`!__package__` will cease to be
+    taken into consideration by the import system or standard library. (:gh:`97879`)
+
+* The bundled copy of ``libmpdec``.
+
 * :mod:`array`:
 
   * The ``'u'`` format code (:c:type:`wchar_t`)
index dd8f3e33128a97fe3bf66b2228259a0e953b8fbb..8d1704a448e6394fcfac2b146a4f5544a232f50d 100644 (file)
@@ -1042,7 +1042,7 @@ this approach.
       Raise :exc:`DeprecationWarning` instead of :exc:`ImportWarning` when
       falling back to :attr:`!__package__` during import resolution.
 
-   .. deprecated-removed:: 3.13 3.15
+   .. deprecated-removed:: 3.13 3.16
       :attr:`!__package__` will cease to be set or taken into consideration
       by the import system or standard library.
 
index be00d48bf042f6360033350a4259e74a325e42c9..05fc89d9fe2d278d1e991b63a6d5e76addbbdf5f 100644 (file)
@@ -4,7 +4,10 @@
 c-api/allocation.html: deprecated-aliases
 c-api/file.html: deprecated-api
 
+# Removed sections
 library/asyncio-task.html: terminating-a-task-group
+deprecations/index.html: pending-removal-in-python-3-15
+deprecations/index.html: c-api-pending-removal-in-python-3-15
 
 # Removed libmpdec
 using/configure.html: cmdoption-with-system-libmpdec