파이썬 3.15에서 제거 예정임¶
PyImport_ImportModuleNoBlock(): 대신 :c:func:`PyImport_ImportModule`을(를) 사용해주시기를 부탁드립니다.PyWeakref_GetObject()및PyWeakref_GET_OBJECT(): 대신 :c:func:`PyWeakref_GetRef`를 사용해주시기를 부탁드립니다. 파이썬 3.12 및 그 이전 버전에서 :c:func:`PyWeakref_GetRef`를 사용하려면 `pythoncapi-compat 프로젝트 <https://github.com/python/pythoncapi-compat/>`__를 활용할 수 있습니다.PyUnicode_AsDecodedObject(): 대신 :c:func:`PyCodec_Decode`를 사용해주시기를 부탁드립니다.PyUnicode_AsDecodedUnicode(): 대신 :c:func:`PyCodec_Decode`를 사용해주시기를 부탁드립니다. 다만, 일부 코덱(예를 들어, “base64”)은 :class:`str`이 아닌 :class:`bytes`와 같은 다른 타입을 반환할 수 있음을 주의해주시기를 부탁드립니다.PyUnicode_AsEncodedObject(): 대신 :c:func:`PyCodec_Encode`를 사용해주시기를 부탁드립니다.PyUnicode_AsEncodedUnicode(): 대신 :c:func:`PyCodec_Encode`를 사용해주시기를 부탁드립니다. 일부 코덱(예를 들어, “base64”)은 :class:`bytes`가 아닌 :class:`str`과 같은 다른 타입을 반환할 수 있음을 주의해주시기를 부탁드립니다.파이썬 3.13에서 사용 지원이 중단(deprecated)된 파이썬 초기화 함수들은 다음과 같습니다:
Py_GetPath(): 대신PyConfig_Get("module_search_paths")(sys.path)를 사용해주시기를 부탁드립니다.Py_GetPrefix(): UsePyConfig_Get("base_prefix")(sys.base_prefix) instead. UsePyConfig_Get("prefix")(sys.prefix) if virtual environments need to be handled.Py_GetExecPrefix(): UsePyConfig_Get("base_exec_prefix")(sys.base_exec_prefix) instead. UsePyConfig_Get("exec_prefix")(sys.exec_prefix) if virtual environments need to be handled.Py_GetProgramFullPath(): UsePyConfig_Get("executable")(sys.executable) instead.Py_GetProgramName(): UsePyConfig_Get("executable")(sys.executable) instead.Py_GetPythonHome(): UsePyConfig_Get("home")or thePYTHONHOMEenvironment variable instead.
The pythoncapi-compat project can be used to get
PyConfig_Get()on Python 3.13 and older.