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

* The "PyImport_ImportModuleNoBlock()": Use "PyImport_ImportModule()"
  instead.

* "PyWeakref_GetObject()" and "PyWeakref_GET_OBJECT()": Use
  "PyWeakref_GetRef()" instead. The pythoncapi-compat project can be
  used to get "PyWeakref_GetRef()" on Python 3.12 and older.

* "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()": Use "PyConfig_Get("module_search_paths")"
    ("sys.path") instead.

  * "Py_GetPrefix()": Use "PyConfig_Get("base_prefix")"
    ("sys.base_prefix") instead. Use "PyConfig_Get("prefix")"
    ("sys.prefix") if virtual environments need to be handled.

  * "Py_GetExecPrefix()": Use "PyConfig_Get("base_exec_prefix")"
    ("sys.base_exec_prefix") instead. Use
    "PyConfig_Get("exec_prefix")" ("sys.exec_prefix") if virtual
    environments need to be handled.

  * "Py_GetProgramFullPath()": Use "PyConfig_Get("executable")"
    ("sys.executable") instead.

  * "Py_GetProgramName()": Use "PyConfig_Get("executable")"
    ("sys.executable") instead.

  * "Py_GetPythonHome()": Use "PyConfig_Get("home")" or the
    "PYTHONHOME" environment variable instead.

  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()": Clear "sys.warnoptions" and
    "warnings.filters" instead.

  應改用帶有 "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()" 在執行時取得這些選項。
