注意: 雖然 JavaScript 對於本網站並非必不可少,但您與內容的互動將受到限制。請開啟 JavaScript 以獲得完整體驗。

Python 3.13.1

釋出日期: 2024 年 12 月 3 日

這是 Python 3.13 的第一個維護版本

Python 3.13 是 Python 程式語言的最新主要版本,與 Python 3.12 相比,它包含許多新功能和最佳化。3.13.1 是最新的維護版本,自 3.13.0 以來包含了近 400 個錯誤修復、構建改進和文件更改。

此版本中的安全內容

  • gh-126623: 將 libexpat 升級到 2.6.4 以修復 CVE-2024-50602
  • gh-122792: 更改了 IPv4 對映的 ipaddress.IPv6Address,使其始終使用對映的 IPv4 地址值來決定屬性。已修復行為的屬性包括 is_multicastis_reservedis_link_localis_globalis_unspecified
  • gh-124651: 在 venv 啟用指令碼中正確引用模板字串。
  • gh-125140: 使用 PyREPL 時,從 sys.path 中刪除當前目錄。

與 3.12 相比,3.13 系列的主要新功能

Python 3.13 中的一些主要新功能和更改包括

新功能

型別提示

刪除和新的棄用

  • PEP 594(從標準庫中刪除無用模組)計劃刪除許多已棄用的模組:aifcaudioopchunkcgicgitbcryptimghdrmailcapmsilibnisnntplibossaudiodevpipessndhdrspwdsunautelnetlibuuxdrliblib2to3
  • 許多其他刪除了各種標準庫模組中已棄用的類、函式和方法。
  • C API 刪除棄用。(alpha 1 中存在的一些刪除在 alpha 2 中被撤銷,因為刪除被認為在此時具有太大的破壞性。)
  • 新的棄用,其中大多數計劃從 Python 3.15 或 3.16 中刪除。

有關 Python 3.13 更改的更多詳細資訊,請參閱Python 3.13 的新功能

更多資源

完整變更日誌

檔案

版本 作業系統 描述 MD5 校驗和 檔案大小 GPG Sigstore SBOM
Gzip 壓縮原始碼 tarball 原始碼釋出 6820ac52d77af870f795dabc64583234 27.9 MB SIG .sigstore SPDX
XZ 壓縮原始碼 tarball 原始碼釋出 80c16badb94ffe235280d4d9a099b8bc 21.5 MB SIG .sigstore SPDX
macOS 64 位 universal2 安裝程式 macOS 適用於 macOS 10.13 及更高版本 19e5a1d9e8264c88706ac9604c526e9b 68.2 MB SIG .sigstore
Windows 安裝程式 (64 位) Windows 推薦 90176c0cfa29327ab08c6083dcdcc210 27.4 MB SIG .sigstore SPDX
Windows 安裝程式 (32 位) Windows 12455257e0eaf8c7a3b0af6522647638 26.1 MB SIG .sigstore SPDX
Windows 安裝程式 (ARM64) Windows 實驗性 f35c98b7b0924865021e89160f208cdb 26.7 MB SIG .sigstore SPDX
Windows 可嵌入包 (64 位) Windows d5c8030976b5eaf55ed6b321c073dda7 10.3 MB SIG .sigstore SPDX
Windows 可嵌入包 (32 位) Windows 87e2f278da8ddb60e681ad1b5bb9e555 9.2 MB SIG .sigstore SPDX
Windows 可嵌入包 (ARM64) Windows 7848dbb812b79e61146a592bb19075ee 9.6 MB SIG .sigstore SPDX