Python 3.15 中待移除的項目
**************************

* "PyImport_ImportModuleNoBlock()"：請改用 "PyImport_ImportModule()"。

* "PyWeakref_GetObject()" 和 "PyWeakref_GET_OBJECT()"：請改用
  "PyWeakref_GetRef()"。可以使用 pythoncapi-compat 專案來為 Python
  3.12 和更早版本取得 "PyWeakref_GetRef()"。

* "Py_UNICODE" 型別與 "Py_UNICODE_WIDE" 巨集：請改用 "wchar_t"。

* "PyUnicode_AsDecodedObject()"：請改用 "PyCodec_Decode()"。

* "PyUnicode_AsDecodedUnicode()"：請改用 "PyCodec_Decode()"；請注意某
  些編解碼器（例如 "base64"）可能會回傳非 "str" 的型別，例如 "bytes"。

* "PyUnicode_AsEncodedObject()"：請改用 "PyCodec_Encode()"。

* "PyUnicode_AsEncodedUnicode()"：請改用 "PyCodec_Encode()"；請注意某
  些編解碼器（例如 "base64"）可能會回傳非 "bytes" 的型別，例如 "str"。

* Python 初始化函式，自 Python 3.13 起已被棄用：

  * "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" 環境變數。

  pythoncapi-compat 專案 可以用來為 Python 3.13 和更早版本取得
  "PyConfig_Get()"。

* 用於配置 Python 初始化的函式，自 Python 3.11 起已被棄用：

  * "PySys_SetArgvEx()"：請改用 "PyConfig.argv"。

  * "PySys_SetArgv()"：請改用 "PyConfig.argv"。

  * "Py_SetProgramName()"：請改用 "PyConfig.program_name"。

  * "Py_SetPythonHome()"：請改用 "PyConfig.home"。

  * "PySys_ResetWarnOptions()"：請改為清除 "sys.warnoptions" 和
    "warnings.filters"。

  應改用帶有 "PyConfig" 的 "Py_InitializeFromConfig()" API。

* 全域配置變數：

  * "Py_DebugFlag"：請改用 "PyConfig.parser_debug" 或
    "PyConfig_Get("parser_debug")"。

  * "Py_VerboseFlag"：請改用 "PyConfig.verbose" 或
    "PyConfig_Get("verbose")"。

  * "Py_QuietFlag"：請改用 "PyConfig.quiet" 或 "PyConfig_Get("quiet")"
    。

  * "Py_InteractiveFlag"：請改用 "PyConfig.interactive" 或
    "PyConfig_Get("interactive")"。

  * "Py_InspectFlag"：請改用 "PyConfig.inspect" 或
    "PyConfig_Get("inspect")"。

  * "Py_OptimizeFlag"：請改用 "PyConfig.optimization_level" 或
    "PyConfig_Get("optimization_level")"。

  * "Py_NoSiteFlag"：請改用 "PyConfig.site_import" 或
    "PyConfig_Get("site_import")"。

  * "Py_BytesWarningFlag"：請改用 "PyConfig.bytes_warning" 或
    "PyConfig_Get("bytes_warning")"。

  * "Py_FrozenFlag"：請改用 "PyConfig.pathconfig_warnings" 或
    "PyConfig_Get("pathconfig_warnings")"。

  * "Py_IgnoreEnvironmentFlag"：請改用 "PyConfig.use_environment" 或
    "PyConfig_Get("use_environment")"。

  * "Py_DontWriteBytecodeFlag"：請改用 "PyConfig.write_bytecode" 或
    "PyConfig_Get("write_bytecode")"。

  * "Py_NoUserSiteDirectory"：請改用 "PyConfig.user_site_directory" 或
    "PyConfig_Get("user_site_directory")"。

  * "Py_UnbufferedStdioFlag"：請改用 "PyConfig.buffered_stdio" 或
    "PyConfig_Get("buffered_stdio")"。

  * "Py_HashRandomizationFlag"：請改用 "PyConfig.use_hash_seed" 和
    "PyConfig.hash_seed" 或 "PyConfig_Get("hash_seed")"。

  * "Py_IsolatedFlag"：請改用 "PyConfig.isolated" 或
    "PyConfig_Get("isolated")"。

  * "Py_LegacyWindowsFSEncodingFlag"：請改用
    "PyPreConfig.legacy_windows_fs_encoding" 或
    "PyConfig_Get("legacy_windows_fs_encoding")"。

  * "Py_LegacyWindowsStdioFlag"：請改用
    "PyConfig.legacy_windows_stdio" 或
    "PyConfig_Get("legacy_windows_stdio")"。

  * "Py_FileSystemDefaultEncoding"、"Py_HasFileSystemDefaultEncoding"
    ：請改用 "PyConfig.filesystem_encoding" 或
    "PyConfig_Get("filesystem_encoding")"。

  * "Py_FileSystemDefaultEncodeErrors"：請改用
    "PyConfig.filesystem_errors" 或
    "PyConfig_Get("filesystem_errors")"。

  * "Py_UTF8Mode"：請改用 "PyPreConfig.utf8_mode" 或
    "PyConfig_Get("utf8_mode")"。（請參閱 "Py_PreInitialize()"）

  應改用帶有 "PyConfig" 的 "Py_InitializeFromConfig()" API 來設定這些
  選項。或者也可以使用 "PyConfig_Get()" 在執行時取得這些選項。
