Skip to content

Commit d5ab345

Browse files
Tidy up 3.15 pending removals
1 parent ebf6d9c commit d5ab345

4 files changed

Lines changed: 91 additions & 10 deletions

File tree

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,87 @@
11
Pending removal in Python 3.16
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

4-
* The bundled copy of ``libmpdec``.
4+
* Functions to configure Python's initialization, deprecated in Python 3.11:
5+
6+
* :c:func:`!PySys_SetArgvEx()`:
7+
Set :c:member:`PyConfig.argv` instead.
8+
* :c:func:`!PySys_SetArgv()`:
9+
Set :c:member:`PyConfig.argv` instead.
10+
* :c:func:`!Py_SetProgramName()`:
11+
Set :c:member:`PyConfig.program_name` instead.
12+
* :c:func:`!Py_SetPythonHome()`:
13+
Set :c:member:`PyConfig.home` instead.
14+
* :c:func:`!PySys_ResetWarnOptions`:
15+
Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead.
16+
17+
The :c:func:`Py_InitializeFromConfig` API should be used with
18+
:c:type:`PyConfig` instead.
19+
20+
* Global configuration variables:
21+
22+
* :c:var:`Py_DebugFlag`:
23+
Use :c:member:`PyConfig.parser_debug` or
24+
:c:func:`PyConfig_Get("parser_debug") <PyConfig_Get>` instead.
25+
* :c:var:`Py_VerboseFlag`:
26+
Use :c:member:`PyConfig.verbose` or
27+
:c:func:`PyConfig_Get("verbose") <PyConfig_Get>` instead.
28+
* :c:var:`Py_QuietFlag`:
29+
Use :c:member:`PyConfig.quiet` or
30+
:c:func:`PyConfig_Get("quiet") <PyConfig_Get>` instead.
31+
* :c:var:`Py_InteractiveFlag`:
32+
Use :c:member:`PyConfig.interactive` or
33+
:c:func:`PyConfig_Get("interactive") <PyConfig_Get>` instead.
34+
* :c:var:`Py_InspectFlag`:
35+
Use :c:member:`PyConfig.inspect` or
36+
:c:func:`PyConfig_Get("inspect") <PyConfig_Get>` instead.
37+
* :c:var:`Py_OptimizeFlag`:
38+
Use :c:member:`PyConfig.optimization_level` or
39+
:c:func:`PyConfig_Get("optimization_level") <PyConfig_Get>` instead.
40+
* :c:var:`Py_NoSiteFlag`:
41+
Use :c:member:`PyConfig.site_import` or
42+
:c:func:`PyConfig_Get("site_import") <PyConfig_Get>` instead.
43+
* :c:var:`Py_BytesWarningFlag`:
44+
Use :c:member:`PyConfig.bytes_warning` or
45+
:c:func:`PyConfig_Get("bytes_warning") <PyConfig_Get>` instead.
46+
* :c:var:`Py_FrozenFlag`:
47+
Use :c:member:`PyConfig.pathconfig_warnings` or
48+
:c:func:`PyConfig_Get("pathconfig_warnings") <PyConfig_Get>` instead.
49+
* :c:var:`Py_IgnoreEnvironmentFlag`:
50+
Use :c:member:`PyConfig.use_environment` or
51+
:c:func:`PyConfig_Get("use_environment") <PyConfig_Get>` instead.
52+
* :c:var:`Py_DontWriteBytecodeFlag`:
53+
Use :c:member:`PyConfig.write_bytecode` or
54+
:c:func:`PyConfig_Get("write_bytecode") <PyConfig_Get>` instead.
55+
* :c:var:`Py_NoUserSiteDirectory`:
56+
Use :c:member:`PyConfig.user_site_directory` or
57+
:c:func:`PyConfig_Get("user_site_directory") <PyConfig_Get>` instead.
58+
* :c:var:`Py_UnbufferedStdioFlag`:
59+
Use :c:member:`PyConfig.buffered_stdio` or
60+
:c:func:`PyConfig_Get("buffered_stdio") <PyConfig_Get>` instead.
61+
* :c:var:`Py_HashRandomizationFlag`:
62+
Use :c:member:`PyConfig.use_hash_seed`
63+
and :c:member:`PyConfig.hash_seed` or
64+
:c:func:`PyConfig_Get("hash_seed") <PyConfig_Get>` instead.
65+
* :c:var:`Py_IsolatedFlag`:
66+
Use :c:member:`PyConfig.isolated` or
67+
:c:func:`PyConfig_Get("isolated") <PyConfig_Get>` instead.
68+
* :c:var:`Py_LegacyWindowsFSEncodingFlag`:
69+
Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` or
70+
:c:func:`PyConfig_Get("legacy_windows_fs_encoding") <PyConfig_Get>` instead.
71+
* :c:var:`Py_LegacyWindowsStdioFlag`:
72+
Use :c:member:`PyConfig.legacy_windows_stdio` or
73+
:c:func:`PyConfig_Get("legacy_windows_stdio") <PyConfig_Get>` instead.
74+
* :c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!Py_HasFileSystemDefaultEncoding`:
75+
Use :c:member:`PyConfig.filesystem_encoding` or
76+
:c:func:`PyConfig_Get("filesystem_encoding") <PyConfig_Get>` instead.
77+
* :c:var:`!Py_FileSystemDefaultEncodeErrors`:
78+
Use :c:member:`PyConfig.filesystem_errors` or
79+
:c:func:`PyConfig_Get("filesystem_errors") <PyConfig_Get>` instead.
80+
* :c:var:`!Py_UTF8Mode`:
81+
Use :c:member:`PyPreConfig.utf8_mode` or
82+
:c:func:`PyConfig_Get("utf8_mode") <PyConfig_Get>` instead.
83+
(see :c:func:`Py_PreInitialize`)
84+
85+
The :c:func:`Py_InitializeFromConfig` API should be used with
86+
:c:type:`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be
87+
used to get these options at runtime.

Doc/deprecations/index.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Deprecations
22
============
33

4-
.. include:: pending-removal-in-3.15.rst
5-
64
.. include:: pending-removal-in-3.16.rst
75

86
.. include:: pending-removal-in-3.17.rst
@@ -20,8 +18,6 @@ Deprecations
2018
C API deprecations
2119
------------------
2220

23-
.. include:: c-api-pending-removal-in-3.15.rst
24-
2521
.. include:: c-api-pending-removal-in-3.16.rst
2622

2723
.. include:: c-api-pending-removal-in-3.18.rst

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ Pending removal in Python 3.15
88
is deprecated. In Python 3.15, ``__cached__`` will cease to be set or
99
take into consideration by the import system or standard library. (:gh:`97879`)
1010

11-
* Setting :attr:`~module.__package__` on a module while
12-
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
13-
is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or
14-
take into consideration by the import system or standard library. (:gh:`97879`)
15-
1611
* :mod:`ctypes`:
1712

1813
* The undocumented :func:`!ctypes.SetPointerType` function

Doc/deprecations/pending-removal-in-3.16.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Pending removal in Python 3.16
88
is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or
99
taken into consideration by the import system or the standard library.
1010

11+
* Setting :attr:`~module.__package__` on a module while
12+
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
13+
is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or
14+
take into consideration by the import system or standard library. (:gh:`97879`)
15+
16+
* The bundled copy of ``libmpdec``.
17+
1118
* :mod:`array`:
1219

1320
* The ``'u'`` format code (:c:type:`wchar_t`)

0 commit comments

Comments
 (0)