diff --git a/Doc/c-api/interp-lifecycle.rst b/Doc/c-api/interp-lifecycle.rst
index 8dee601d04876b..46f5b1dd33963c 100644
--- a/Doc/c-api/interp-lifecycle.rst
+++ b/Doc/c-api/interp-lifecycle.rst
@@ -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
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 059a7ef399ae0f..6db179d9ecefe8 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -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)
diff --git a/Doc/deprecations/c-api-pending-removal-in-3.15.rst b/Doc/deprecations/c-api-pending-removal-in-3.15.rst
index 789ec83d2d957a..6d0d47403ff2ed 100644
--- a/Doc/deprecations/c-api-pending-removal-in-3.15.rst
+++ b/Doc/deprecations/c-api-pending-removal-in-3.15.rst
@@ -46,88 +46,3 @@ Pending removal in Python 3.15
The `pythoncapi-compat project
`__ 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") ` instead.
- * :c:var:`Py_VerboseFlag`:
- Use :c:member:`PyConfig.verbose` or
- :c:func:`PyConfig_Get("verbose") ` instead.
- * :c:var:`Py_QuietFlag`:
- Use :c:member:`PyConfig.quiet` or
- :c:func:`PyConfig_Get("quiet") ` instead.
- * :c:var:`Py_InteractiveFlag`:
- Use :c:member:`PyConfig.interactive` or
- :c:func:`PyConfig_Get("interactive") ` instead.
- * :c:var:`Py_InspectFlag`:
- Use :c:member:`PyConfig.inspect` or
- :c:func:`PyConfig_Get("inspect") ` instead.
- * :c:var:`Py_OptimizeFlag`:
- Use :c:member:`PyConfig.optimization_level` or
- :c:func:`PyConfig_Get("optimization_level") ` instead.
- * :c:var:`Py_NoSiteFlag`:
- Use :c:member:`PyConfig.site_import` or
- :c:func:`PyConfig_Get("site_import") ` instead.
- * :c:var:`Py_BytesWarningFlag`:
- Use :c:member:`PyConfig.bytes_warning` or
- :c:func:`PyConfig_Get("bytes_warning") ` instead.
- * :c:var:`Py_FrozenFlag`:
- Use :c:member:`PyConfig.pathconfig_warnings` or
- :c:func:`PyConfig_Get("pathconfig_warnings") ` instead.
- * :c:var:`Py_IgnoreEnvironmentFlag`:
- Use :c:member:`PyConfig.use_environment` or
- :c:func:`PyConfig_Get("use_environment") ` instead.
- * :c:var:`Py_DontWriteBytecodeFlag`:
- Use :c:member:`PyConfig.write_bytecode` or
- :c:func:`PyConfig_Get("write_bytecode") ` instead.
- * :c:var:`Py_NoUserSiteDirectory`:
- Use :c:member:`PyConfig.user_site_directory` or
- :c:func:`PyConfig_Get("user_site_directory") ` instead.
- * :c:var:`Py_UnbufferedStdioFlag`:
- Use :c:member:`PyConfig.buffered_stdio` or
- :c:func:`PyConfig_Get("buffered_stdio") ` 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") ` instead.
- * :c:var:`Py_IsolatedFlag`:
- Use :c:member:`PyConfig.isolated` or
- :c:func:`PyConfig_Get("isolated") ` instead.
- * :c:var:`Py_LegacyWindowsFSEncodingFlag`:
- Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` or
- :c:func:`PyConfig_Get("legacy_windows_fs_encoding") ` instead.
- * :c:var:`Py_LegacyWindowsStdioFlag`:
- Use :c:member:`PyConfig.legacy_windows_stdio` or
- :c:func:`PyConfig_Get("legacy_windows_stdio") ` instead.
- * :c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!Py_HasFileSystemDefaultEncoding`:
- Use :c:member:`PyConfig.filesystem_encoding` or
- :c:func:`PyConfig_Get("filesystem_encoding") ` instead.
- * :c:var:`!Py_FileSystemDefaultEncodeErrors`:
- Use :c:member:`PyConfig.filesystem_errors` or
- :c:func:`PyConfig_Get("filesystem_errors") ` instead.
- * :c:var:`!Py_UTF8Mode`:
- Use :c:member:`PyPreConfig.utf8_mode` or
- :c:func:`PyConfig_Get("utf8_mode") ` 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.
diff --git a/Doc/deprecations/c-api-pending-removal-in-3.16.rst b/Doc/deprecations/c-api-pending-removal-in-3.16.rst
index 9453f83799c43d..fe2d91cf316b18 100644
--- a/Doc/deprecations/c-api-pending-removal-in-3.16.rst
+++ b/Doc/deprecations/c-api-pending-removal-in-3.16.rst
@@ -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") ` instead.
+ * :c:var:`Py_VerboseFlag`:
+ Use :c:member:`PyConfig.verbose` or
+ :c:func:`PyConfig_Get("verbose") ` instead.
+ * :c:var:`Py_QuietFlag`:
+ Use :c:member:`PyConfig.quiet` or
+ :c:func:`PyConfig_Get("quiet") ` instead.
+ * :c:var:`Py_InteractiveFlag`:
+ Use :c:member:`PyConfig.interactive` or
+ :c:func:`PyConfig_Get("interactive") ` instead.
+ * :c:var:`Py_InspectFlag`:
+ Use :c:member:`PyConfig.inspect` or
+ :c:func:`PyConfig_Get("inspect") ` instead.
+ * :c:var:`Py_OptimizeFlag`:
+ Use :c:member:`PyConfig.optimization_level` or
+ :c:func:`PyConfig_Get("optimization_level") ` instead.
+ * :c:var:`Py_NoSiteFlag`:
+ Use :c:member:`PyConfig.site_import` or
+ :c:func:`PyConfig_Get("site_import") ` instead.
+ * :c:var:`Py_BytesWarningFlag`:
+ Use :c:member:`PyConfig.bytes_warning` or
+ :c:func:`PyConfig_Get("bytes_warning") ` instead.
+ * :c:var:`Py_FrozenFlag`:
+ Use :c:member:`PyConfig.pathconfig_warnings` or
+ :c:func:`PyConfig_Get("pathconfig_warnings") ` instead.
+ * :c:var:`Py_IgnoreEnvironmentFlag`:
+ Use :c:member:`PyConfig.use_environment` or
+ :c:func:`PyConfig_Get("use_environment") ` instead.
+ * :c:var:`Py_DontWriteBytecodeFlag`:
+ Use :c:member:`PyConfig.write_bytecode` or
+ :c:func:`PyConfig_Get("write_bytecode") ` instead.
+ * :c:var:`Py_NoUserSiteDirectory`:
+ Use :c:member:`PyConfig.user_site_directory` or
+ :c:func:`PyConfig_Get("user_site_directory") ` instead.
+ * :c:var:`Py_UnbufferedStdioFlag`:
+ Use :c:member:`PyConfig.buffered_stdio` or
+ :c:func:`PyConfig_Get("buffered_stdio") ` 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") ` instead.
+ * :c:var:`Py_IsolatedFlag`:
+ Use :c:member:`PyConfig.isolated` or
+ :c:func:`PyConfig_Get("isolated") ` instead.
+ * :c:var:`Py_LegacyWindowsFSEncodingFlag`:
+ Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` or
+ :c:func:`PyConfig_Get("legacy_windows_fs_encoding") ` instead.
+ * :c:var:`Py_LegacyWindowsStdioFlag`:
+ Use :c:member:`PyConfig.legacy_windows_stdio` or
+ :c:func:`PyConfig_Get("legacy_windows_stdio") ` instead.
+ * :c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!Py_HasFileSystemDefaultEncoding`:
+ Use :c:member:`PyConfig.filesystem_encoding` or
+ :c:func:`PyConfig_Get("filesystem_encoding") ` instead.
+ * :c:var:`!Py_FileSystemDefaultEncodeErrors`:
+ Use :c:member:`PyConfig.filesystem_errors` or
+ :c:func:`PyConfig_Get("filesystem_errors") ` instead.
+ * :c:var:`!Py_UTF8Mode`:
+ Use :c:member:`PyPreConfig.utf8_mode` or
+ :c:func:`PyConfig_Get("utf8_mode") ` 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`.
diff --git a/Doc/deprecations/index.rst b/Doc/deprecations/index.rst
index eedcd2e9c9dd42..4ecf35aa5c1062 100644
--- a/Doc/deprecations/index.rst
+++ b/Doc/deprecations/index.rst
@@ -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
@@ -20,8 +18,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
diff --git a/Doc/deprecations/pending-removal-in-3.15.rst b/Doc/deprecations/pending-removal-in-3.15.rst
index 1d9a3095813a6d..95d39a585d4c47 100644
--- a/Doc/deprecations/pending-removal-in-3.15.rst
+++ b/Doc/deprecations/pending-removal-in-3.15.rst
@@ -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 `
- 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
diff --git a/Doc/deprecations/pending-removal-in-3.16.rst b/Doc/deprecations/pending-removal-in-3.16.rst
index a64212e38e61cb..8301c5179529a5 100644
--- a/Doc/deprecations/pending-removal-in-3.16.rst
+++ b/Doc/deprecations/pending-removal-in-3.16.rst
@@ -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 `
+ 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`)
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index aef5bbe151cfeb..789f635a4e4e17 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1028,7 +1028,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.
diff --git a/Doc/tools/removed-ids.txt b/Doc/tools/removed-ids.txt
index adac1b993047bc..36182cede761f7 100644
--- a/Doc/tools/removed-ids.txt
+++ b/Doc/tools/removed-ids.txt
@@ -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 APIs
-library/symtable.html: symtable.Class.get_methods
\ No newline at end of file
+library/symtable.html: symtable.Class.get_methods