파이썬 3.15에서 제거 예정임¶
PyImport_ImportModuleNoBlock()대신 :c:func:`PyImport_ImportModule`을(를) 사용하십시오.PyWeakref_GetObject()및PyWeakref_GET_OBJECT(): 대신 :c:func:`PyWeakref_GetRef`를 사용하십시오. Python 3.12 이하 버전에서 :c:func:`PyWeakref_GetRef`를 얻으려면 `pythoncapi-compat 프로젝트 <https://github.com/python/pythoncapi-compat/>`__를 사용할 수 있습니다.PyUnicode_AsDecodedObject(): 대신PyCodec_Decode()를 사용하십시오.PyUnicode_AsDecodedUnicode(): UsePyCodec_Decode()instead; Note that some codecs (for example, “base64”) may return a type other thanstr, such asbytes.PyUnicode_AsEncodedObject(): 대신PyCodec_Encode()를 사용하십시오.PyUnicode_AsEncodedUnicode(): UsePyCodec_Encode()instead; Note that some codecs (for example, “base64”) may return a type other thanbytes, such asstr.Python 3.13에서 사용이 중단된(deprecated) 파이썬 초기화 함수들:
Py_GetPath()대신PyConfig_Get("module_search_paths")(sys.path)를(를) 사용하십시오.Py_GetPrefix(): 대신PyConfig_Get("base_prefix")(sys.base_prefix)를 사용하십시오. 가상 환경 처리가 필요한 경우에는PyConfig_Get("prefix")(sys.prefix)를 사용하십시오.Py_GetExecPrefix(): 대신PyConfig_Get("base_exec_prefix")(sys.base_exec_prefix)를 사용하십시오. 가상 환경 처리가 필요한 경우에는PyConfig_Get("exec_prefix")(sys.exec_prefix)를 사용하십시오.Py_GetProgramFullPath(): 대신PyConfig_Get("executable")(sys.executable)를 사용하십시오.Py_GetProgramName(): 대신PyConfig_Get("executable")(sys.executable)를 사용하십시오.Py_GetPythonHome(): 대신PyConfig_Get("home")또는PYTHONHOME환경 변수를 사용하십시오.
The pythoncapi-compat project can be used to get
PyConfig_Get()on Python 3.13 and older.