8000 Synchronise 'Pending Removal' with Python 3.12 · python/cpython@d90b9be · GitHub
[go: up one dir, main page]

Skip to content

Commit d90b9be

Browse files
committed
Synchronise 'Pending Removal' with Python 3.12
1 parent f29bc9c commit d90b9be

File tree

1 file changed

+89
-84
lines changed

1 file changed

+89
-84
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 89 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,95 @@ Deprecated
10491049
:c:func:`PyWeakref_GetRef` on Python 3.12 and older.
10501050
(Contributed by Victor Stinner in :gh:`105927`.)
10511051

1052+
Pending Removal in Python 3.14
1053+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1054+
1055+
* The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules
1056+
(:pep:`699`; :gh:`101193`).
1057+
1058+
* Global configuration variables:
1059+
1060+
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`
1061+
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`
1062+
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`
1063+
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`
1064+
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`
1065+
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`
1066+
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`
1067+
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`
1068+
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`
1069+
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`
1070+
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`
1071+
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`
1072+
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`
1073+
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
1074+
and :c:member:`PyConfig.hash_seed`
1075+
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`
1076+
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding`
1077+
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio`
1078+
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
1079+
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
1080+
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors`
1081+
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:`Py_PreInitialize`)
1082+
1083+
The :c:func:`Py_InitializeFromConfig` API should be used with
1084+
:c:type:`PyConfig` instead.
1085+
1086+
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
1087+
bases (:gh:`95388`).
1088+
1089+
Pending Removal in Python 3.15
1090+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1091+
1092+
* :c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`
1093+
* :c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef`
1094+
* :c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef`
1095+
* :c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t`
1096+
* :c:type:`Py_UNICODE` type: use :c:type:`wchar_t`
1097+
* Python initialization functions:
1098+
1099+
* :c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and
1100+
:data:`!warnings.filters`
1101+
* :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix`
1102+
* :c:func:`Py_GetPath`: get :data:`sys.path`
1103+
* :c:func:`Py_GetPrefix`: get :data:`sys.prefix`
1104+
* :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable`
1105+
* :c:func:`Py_GetProgramName`: get :data:`sys.executable`
1106+
* :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or
1107+
the :envvar:`PYTHONHOME` environment variable
1108+
1109+
Pending Removal in Future Versions
1110+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1111+
1112+
The following APIs are deprecated and will be removed,
1113+
although there is currently no date scheduled for their removal.
1114+
1115+
* :c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8
1116+
* :c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`
1117+
* :c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`
1118+
* :c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`
1119+
* :c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`
1120+
* :c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child`
1121+
* :c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`
1122+
* :c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode`
1123+
* :c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode`
1124+
* :c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode`
1125+
* :c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode`
1126+
* :c:func:`PyUnicode_READY`: unneeded since Python 3.12
1127+
* :c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException`
1128+
* :c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1``
1129+
* :c:member:`!PyBytesObject.ob_shash` member:
1130+
call :c:func:`PyObject_Hash` instead
1131+
* :c:member:`!PyDictObject.ma_version_tag` member
1132+
* Thread Local Storage (TLS) API:
1133+
1134+
* :c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`
1135+
* :c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`
1136+
* :c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`
1137+
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`
1138+
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`
1139+
* :c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7
1140+
10521141
Removed
10531142
-------
10541143

@@ -1183,87 +1272,3 @@ Removed
11831272
:c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions should
11841273
be used instead.
11851274
(Contributed by Serhiy Storchaka in :gh:`86493`.)
1186-
1187-
Pending Removal in Python 3.14
1188-
------------------------------
1189-
1190-
* Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable
1191-
bases using the C API.
1192-
* Global configuration variables:
1193 1E0A -
1194-
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`
1195-
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`
1196-
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`
1197-
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`
1198-
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`
1199-
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`
1200-
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`
1201-
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`
1202-
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`
1203-
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`
1204-
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`
1205-
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`
1206-
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`
1207-
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
1208-
and :c:member:`PyConfig.hash_seed`
1209-
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`
1210-
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding`
1211-
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio`
1212-
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
1213-
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding`
1214-
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors`
1215-
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:`Py_PreInitialize`)
1216-
1217-
The :c:func:`Py_InitializeFromConfig` API should be used with
1218-
:c:type:`PyConfig` instead.
1219-
1220-
Pending Removal in Python 3.15
1221-
------------------------------
1222-
1223-
* :c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`.
1224-
* :c:func:`PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead.
1225-
* :c:func:`PyWeakref_GetObject`: use :c:func:`PyWeakref_GetRef` instead.
1226-
* :c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead.
1227-
* :c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead.
1228-
* Python initialization functions:
1229-
1230-
* :c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and
1231-
:data:`!warnings.filters` instead.
1232-
* :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead.
1233-
* :c:func:`Py_GetPath`: get :data:`sys.path` instead.
1234-
* :c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead.
1235-
* :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead.
1236-
* :c:func:`Py_GetProgramName`: get :data:`sys.executable` instead.
1237-
* :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or
1238-
:envvar:`PYTHONHOME` environment variable instead.
1239-
1240-
Pending Removal in Future Versions
1241-
----------------------------------
1242-
1243-
The following APIs were deprecated in earlier Python versions and will be
1244-
removed, although there is currently no date scheduled for their removal.
1245-
1246-
* :c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: no needed since Python 3.8.
1247-
* :c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`.
1248-
* :c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`.
1249-
* :c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`.
1250-
* :c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`.
1251-
* :c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child()`.
1252-
* :c:func:`PySlice_GetIndicesEx`.
1253-
* :c:func:`!PyUnicode_AsDecodedObject`.
1254-
* :c:func:`!PyUnicode_AsDecodedUnicode`.
1255-
* :c:func:`!PyUnicode_AsEncodedObject`.
1256-
* :c:func:`!PyUnicode_AsEncodedUnicode`.
1257-
* :c:func:`PyUnicode_READY`: not needed since Python 3.12.
1258-
* :c:func:`!_PyErr_ChainExceptions`.
1259-
* :c:member:`!PyBytesObject.ob_shash` member:
1260-
call :c:func:`PyObject_Hash` instead.
1261-
* :c:member:`!PyDictObject.ma_version_tag` member.
1262-
* TLS API:
1263-
1264-
* :c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`.
1265-
* :c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`.
1266-
* :c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`.
1267-
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`.
1268-
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`.
1269-
* :c:func:`PyThread_ReInitTLS`: no longer needed.

0 commit comments

Comments
 (0)
0