Pending removal in Python 3.15
-
The
!PyImport_ImportModuleNoBlock: UsePyImport_ImportModuleinstead. -
!PyWeakref_GetObjectand!PyWeakref_GET_OBJECT: UsePyWeakref_GetRefinstead. The pythoncapi-compat project can be used to getPyWeakref_GetRefon Python 3.12 and older. -
!PyUnicode_AsDecodedObject: UsePyCodec_Decodeinstead. -
!PyUnicode_AsDecodedUnicode: UsePyCodec_Decodeinstead; Note that some codecs (for example, "base64") may return a type other thanstr, such asbytes. -
!PyUnicode_AsEncodedObject: UsePyCodec_Encodeinstead. -
!PyUnicode_AsEncodedUnicode: UsePyCodec_Encodeinstead; Note that some codecs (for example, "base64") may return a type other thanbytes, such asstr. -
Python initialization functions, deprecated in Python 3.13:
!Py_GetPath: UsePyConfig_Get("module_search_paths") <PyConfig_Get>(sys.path) instead.!Py_GetPrefix: UsePyConfig_Get("base_prefix") <PyConfig_Get>(sys.base_prefix) instead. UsePyConfig_Get("prefix") <PyConfig_Get>(sys.prefix) ifvirtual environments <venv-def>need to be handled.!Py_GetExecPrefix: UsePyConfig_Get("base_exec_prefix") <PyConfig_Get>(sys.base_exec_prefix) instead. UsePyConfig_Get("exec_prefix") <PyConfig_Get>(sys.exec_prefix) ifvirtual environments <venv-def>need to be handled.!Py_GetProgramFullPath: UsePyConfig_Get("executable") <PyConfig_Get>(sys.executable) instead.!Py_GetProgramName: UsePyConfig_Get("executable") <PyConfig_Get>(sys.executable) instead.!Py_GetPythonHome: UsePyConfig_Get("home") <PyConfig_Get>or thePYTHONHOMEenvironment variable instead.
The pythoncapi-compat project can be used to get
PyConfig_Geton Python 3.13 and older.
谢谢你的反馈!