Pending removal in Python 3.18
-
The following private functions are deprecated and planned for removal in Python 3.18:
!_PyBytes_Join: usePyBytes_Join.!_PyDict_GetItemStringWithError: usePyDict_GetItemStringRef.!_PyDict_Pop(): usePyDict_Pop.!_PyLong_Sign(): usePyLong_GetSign.!_PyLong_FromDigitsand!_PyLong_New: usePyLongWriter_Create.!_PyThreadState_UncheckedGet: usePyThreadState_GetUnchecked.!_PyUnicode_AsString: usePyUnicode_AsUTF8.!_PyUnicodeWriter_Init: replace_PyUnicodeWriter_Init(&writer)withwriter = PyUnicodeWriter_Create(0) <PyUnicodeWriter_Create>.!_PyUnicodeWriter_Finish: replace_PyUnicodeWriter_Finish(&writer)withPyUnicodeWriter_Finish(writer) <PyUnicodeWriter_Finish>.!_PyUnicodeWriter_Dealloc: replace_PyUnicodeWriter_Dealloc(&writer)withPyUnicodeWriter_Discard(writer) <PyUnicodeWriter_Discard>.!_PyUnicodeWriter_WriteChar: replace_PyUnicodeWriter_WriteChar(&writer, ch)withPyUnicodeWriter_WriteChar(writer, ch) <PyUnicodeWriter_WriteChar>.!_PyUnicodeWriter_WriteStr: replace_PyUnicodeWriter_WriteStr(&writer, str)withPyUnicodeWriter_WriteStr(writer, str) <PyUnicodeWriter_WriteStr>.!_PyUnicodeWriter_WriteSubstring: replace_PyUnicodeWriter_WriteSubstring(&writer, str, start, end)withPyUnicodeWriter_WriteSubstring(writer, str, start, end) <PyUnicodeWriter_WriteSubstring>.!_PyUnicodeWriter_WriteASCIIString: replace_PyUnicodeWriter_WriteASCIIString(&writer, str, size)withPyUnicodeWriter_WriteASCII(writer, str, size) <PyUnicodeWriter_WriteASCII>.!_PyUnicodeWriter_WriteLatin1String: replace_PyUnicodeWriter_WriteLatin1String(&writer, str, size)by decoding the string withPyUnicode_DecodeLatin1, writing the result withPyUnicodeWriter_WriteStr, and releasing the result withPy_DECREF.!_PyUnicodeWriter_Prepare: (no replacement).!_PyUnicodeWriter_PrepareKind: (no replacement).!_Py_HashPointer: usePy_HashPointer.!_Py_fopen_obj: usePy_fopen.PyGen_New: (no replacement).PyGen_NewWithQualName: (no replacement).PyCoro_New: (no replacement).PyAsyncGen_New: (no replacement).
The pythoncapi-compat project can be used to get these new public functions on Python 3.13 and older. (Contributed by Victor Stinner in
128863.)
这篇文档对你有帮助吗?
谢谢你的反馈!