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