@@ -1126,11 +1126,6 @@ Deprecated
1126
1126
:exc: `ImportWarning `).
1127
1127
(Contributed by Brett Cannon in :gh: `65961 `.)
1128
1128
1129
- * In accordance with :pep: `699 `, the ``ma_version_tag `` field in :c:type: `PyDictObject `
1130
- is deprecated for extension modules. Accessing this field will generate a compiler
1131
- warning at compile time. This field will be removed in Python 3.14.
1132
- (Contributed by Ramvikrams and Kumar Aditya in :gh: `101193 `. PEP by Ken Jin.)
1133
-
1134
1129
* The bitwise inversion operator (``~ ``) on bool is deprecated. It will throw an
1135
1130
error in Python 3.14. Use ``not `` for logical negation of bools instead.
1136
1131
In the rare case that you really need the bitwise inversion of the underlying
@@ -1261,9 +1256,6 @@ Pending Removal in Python 3.14
1261
1256
* :mod: `xml.etree.ElementTree `: Testing the truth value of an :class: `xml.etree.ElementTree.Element `
1262
1257
is deprecated and will raise an exception in Python 3.14.
1263
1258
1264
- * Creating immutable types (:c:macro: `Py_TPFLAGS_IMMUTABLETYPE `) with mutable
1265
- bases using the C API (:gh: `95388 `).
1266
-
1267
1259
* ``__package__ `` and ``__cached__ `` will cease to be set or taken
1268
1260
into consideration by the import system (:gh: `97879 `).
1269
1261
@@ -1273,9 +1265,6 @@ Pending Removal in Python 3.14
1273
1265
May be removed in 3.14.
1274
1266
(Contributed by Nikita Sobolev in :gh: `101866 `.)
1275
1267
1276
- * Creating :c:data: `immutable types <Py_TPFLAGS_IMMUTABLETYPE> ` with mutable
1277
- bases using the C API (:gh: `95388 `)
1278
-
1279
1268
Pending Removal in Future Versions
1280
1269
----------------------------------
1281
1270
@@ -2058,6 +2047,11 @@ Porting to Python 3.12
2058
2047
Deprecated
2059
2048
----------
2060
2049
2050
+ * In accordance with :pep: `699 `, the ``ma_version_tag `` field in :c:type: `PyDictObject `
2051
+ is deprecated for extension modules. Accessing this field will generate a compiler
2052
+ warning at compile time. This field will be removed in Python 3.14.
2053
+ (Contributed by Ramvikrams and Kumar Aditya in :gh: `101193 `. PEP by Ken Jin.)
2054
+
2061
2055
* Deprecate global configuration variable:
2062
2056
2063
2057
* :c:var: `Py_DebugFlag `: use :c:member: `PyConfig.parser_debug `
@@ -2087,8 +2081,8 @@ Deprecated
2087
2081
:c:type: `PyConfig ` instead.
2088
2082
(Contributed by Victor Stinner in :gh: `77782 `.)
2089
2083
2090
- * Creating immutable types ( :c:macro: ` Py_TPFLAGS_IMMUTABLETYPE `) with mutable
2091
- bases is deprecated and will be disabled in Python 3.14.
2084
+ * Creating :c:data: ` immutable types < Py_TPFLAGS_IMMUTABLETYPE> ` with mutable
2085
+ bases is deprecated and will be disabled in Python 3.14. ( :gh: ` 95388 `)
2092
2086
2093
2087
* The :file: `structmember.h ` header is deprecated, though it continues to be
2094
2088
available and there are no plans to remove it.
@@ -2137,6 +2131,95 @@ Deprecated
2137
2131
overrides :c:member: `~PyTypeObject.tp_new ` is deprecated.
2138
2132
Call the metaclass instead.
2139
2133
2134
+ Pending Removal in Python 3.14
2135
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2136
+
2137
+ * The ``ma_version_tag `` field in :c:type: `PyDictObject ` for extension modules
2138
+ (:pep: `699 `; :gh: `101193 `).
2139
+
2140
+ * Global configuration variables:
2141
+
2142
+ * :c:var: `Py_DebugFlag `: use :c:member: `PyConfig.parser_debug `
2143
+ * :c:var: `Py_VerboseFlag `: use :c:member: `PyConfig.verbose `
2144
+ * :c:var: `Py_QuietFlag `: use :c:member: `PyConfig.quiet `
2145
+ * :c:var: `Py_InteractiveFlag `: use :c:member: `PyConfig.interactive `
2146
+ * :c:var: `Py_InspectFlag `: use :c:member: `PyConfig.inspect `
2147
+ * :c:var: `Py_OptimizeFlag `: use :c:member: `PyConfig.optimization_level `
2148
+ * :c:var: `Py_NoSiteFlag `: use :c:member: `PyConfig.site_import `
2149
+ * :c:var: `Py_BytesWarningFlag `: use :c:member: `PyConfig.bytes_warning `
2150
+ * :c:var: `Py_FrozenFlag `: use :c:member: `PyConfig.pathconfig_warnings `
2151
+ * :c:var: `Py_IgnoreEnvironmentFlag `: use :c:member: `PyConfig.use_environment `
2152
+ * :c:var: `Py_DontWriteBytecodeFlag `: use :c:member: `PyConfig.write_bytecode `
2153
+ * :c:var: `Py_NoUserSiteDirectory `: use :c:member: `PyConfig.user_site_directory `
2154
+ * :c:var: `Py_UnbufferedStdioFlag `: use :c:member: `PyConfig.buffered_stdio `
2155
+ * :c:var: `Py_HashRandomizationFlag `: use :c:member: `PyConfig.use_hash_seed `
2156
+ and :c:member: `PyConfig.hash_seed `
2157
+ * :c:var: `Py_IsolatedFlag `: use :c:member: `PyConfig.isolated `
2158
+ * :c:var: `Py_LegacyWindowsFSEncodingFlag `: use :c:member: `PyPreConfig.legacy_windows_fs_encoding `
2159
+ * :c:var: `Py_LegacyWindowsStdioFlag `: use :c:member: `PyConfig.legacy_windows_stdio `
2160
+ * :c:var: `!Py_FileSystemDefaultEncoding `: use :c:member: `PyConfig.filesystem_encoding `
2161
+ * :c:var: `!Py_HasFileSystemDefaultEncoding `: use :c:member: `PyConfig.filesystem_encoding `
2162
+ * :c:var: `!Py_FileSystemDefaultEncodeErrors `: use :c:member: `PyConfig.filesystem_errors `
2163
+ * :c:var: `!Py_UTF8Mode `: use :c:member: `PyPreConfig.utf8_mode ` (see :c:func: `Py_PreInitialize `)
2164
+
2165
+ The :c:func: `Py_InitializeFromConfig ` API should be used with
2166
+ :c:type: `PyConfig ` instead.
2167
+
2168
+ * Creating :c:data: `immutable types <Py_TPFLAGS_IMMUTABLETYPE> ` with mutable
2169
+ bases (:gh: `95388 `).
2170
+
2171
+ Pending Removal in Python 3.15
2172
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2173
+
2174
+ * :c:func: `PyImport_ImportModuleNoBlock `: use :c:func: `PyImport_ImportModule `
2175
+ * :c:func: `PyWeakref_GET_OBJECT `: use :c:func: `PyWeakref_GetRef `
2176
+ * :c:func: `PyWeakref_GetObject `: use :c:func: `PyWeakref_GetRef `
2177
+ * :c:type: `!Py_UNICODE_WIDE ` type: use :c:type: `wchar_t `
2178
+ * :c:type: `Py_UNICODE ` type: use :c:type: `wchar_t `
2179
+ * Python initialization functions:
2180
+
2181
+ * :c:func: `PySys_ResetWarnOptions `: clear :data: `sys.warnoptions ` and
2182
+ :data: `!warnings.filters `
2183
+ * :c:func: `Py_GetExecPrefix `: get :data: `sys.exec_prefix `
2184
+ * :c:func: `Py_GetPath `: get :data: `sys.path `
2185
+ * :c:func: `Py_GetPrefix `: get :data: `sys.prefix `
2186
+ * :c:func: `Py_GetProgramFullPath `: get :data: `sys.executable `
2187
+ * :c:func: `Py_GetProgramName `: get :data: `sys.executable `
2188
+ * :c:func: `Py_GetPythonHome `: get :c:member: `PyConfig.home ` or
2189
+ the :envvar: `PYTHONHOME ` environment variable
2190
+
2191
+ Pending Removal in Future Versions
2192
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2193
+
2194
+ The following APIs are deprecated and will be removed,
2195
+ although there is currently no date scheduled for their removal.
2196
+
2197
+ * :c:macro: `Py_TPFLAGS_HAVE_FINALIZE `: unneeded since Python 3.8
2198
+ * :c:func: `PyErr_Fetch `: use :c:func: `PyErr_GetRaisedException `
2199
+ * :c:func: `PyErr_NormalizeException `: use :c:func: `PyErr_GetRaisedException `
2200
+ * :c:func: `PyErr_Restore `: use :c:func: `PyErr_SetRaisedException `
2201
+ * :c:func: `PyModule_GetFilename `: use :c:func: `PyModule_GetFilenameObject `
2202
+ * :c:func: `PyOS_AfterFork `: use :c:func: `PyOS_AfterFork_Child `
2203
+ * :c:func: `PySlice_GetIndicesEx `: use :c:func: `PySlice_Unpack ` and :c:func: `PySlice_AdjustIndices `
2204
+ * :c:func: `!PyUnicode_AsDecodedObject `: use :c:func: `PyCodec_Decode `
2205
+ * :c:func: `!PyUnicode_AsDecodedUnicode `: use :c:func: `PyCodec_Decode `
2206
+ * :c:func: `!PyUnicode_AsEncodedObject `: use :c:func: `PyCodec_Encode `
2207
+ * :c:func: `!PyUnicode_AsEncodedUnicode `: use :c:func: `PyCodec_Encode `
2208
+ * :c:func: `PyUnicode_READY `: unneeded since Python 3.12
2209
+ * :c:func: `!PyErr_Display `: use :c:func: `PyErr_DisplayException `
2210
+ * :c:func: `!_PyErr_ChainExceptions `: use ``_PyErr_ChainExceptions1 ``
2211
+ * :c:member: `!PyBytesObject.ob_shash ` member:
2212
+ call :c:func: `PyObject_Hash ` instead
2213
+ * :c:member: `!PyDictObject.ma_version_tag ` member
2214
+ * Thread Local Storage (TLS) API:
2215
+
2216
+ * :c:func: `PyThread_create_key `: use :c:func: `PyThread_tss_alloc `
2217
+ * :c:func: `PyThread_delete_key `: use :c:func: `PyThread_tss_free `
2218
+ * :c:func: `PyThread_set_key_value `: use :c:func: `PyThread_tss_set `
2219
+ * :c:func: `PyThread_get_key_value `: use :c:func: `PyThread_tss_get `
2220
+ * :c:func: `PyThread_delete_key_value `: use :c:func: `PyThread_tss_delete `
2221
+ * :c:func: `PyThread_ReInitTLS `: unneeded since Python 3.7
2222
+
2140
2223
Removed
2141
2224
-------
2142
2225
0 commit comments