Python 3.9.9 热修复更新已于上周发布,此版本是 3.9 系列的第八个维护版本。\

Monday, November 15, 2021

Python 3.9.9 hotfix release is now available

Get it here:


Python 3.9.9 is the eighth maintenance release of the legacy 3.9 series. Python 3.10 is now the latest feature release series of Python 3. Get the latest release of 3.10.x here.

3.9.9 was released out of schedule as a hotfix for an argparse regression in Python 3.9.8 which caused complex command-line tools to fail recognizing sub-commands properly. Details in BPO-45235. There are only three other bugfixes in this release compared to 3.9.8. See the changelog for details on what changed.

Upgrading to 3.9.9 is highly recommended if you’re running Python 3.9.8.

The next Python 3.9 maintenance release will be 3.9.10, currently scheduled for 2022-01-03.

We apologize for the inconvenience

…and still hope you’ll enjoy the new release!

Your friendly release team,
Ned Deily @nad
Steve Dower @steve.dower
Łukasz Langa @ambv

3.9.9 是作为 Python 3.9.8 中 argparse 回归的热修复更新而在发布日程之外推出的,此问题会导致复杂的命令行工具无法正确识别子命令。详情见 BPO-45235。

与 3.9.8 相比,这个版本中只有三个其他的错误修复。

bpo-45235:修复了一个 argparse 错误,此错误在处理子解析器的默认参数时引发了回归,使得叶级参数优先于根级参数

bpo-45765:在 importlib.metadata 中,修复对空路径的分布发现 (distribution discovery)

bpo-45644: In-place JSON 文件格式化使用python3 -m json.tool infile infile可正常运行,此前会导致文件为空


官方表示,如果正在使用的是 Python 3.9.8,强烈建议升级到 3.9.9。

Python 3.9.9 final

Release date: 2021-11-15
Core and Builtins

bpo-45738: Fix computation of error location for invalid continuation characters in the parser. Patch by Pablo Galindo.


bpo-45235: Reverted an argparse bugfix that caused regression in the handling of default arguments for subparsers. This prevented leaf level arguments from taking precedence over root level arguments.

bpo-45765: In importlib.metadata, fix distribution discovery for an empty path.

bpo-45644: In-place JSON file formatting using python3 -m json.tool infile infile now works correctly, previously it left the file empty. Patch by Chris Wesseling.


bpo-45772: socket.socket documentation is corrected to a class from a function.

bpo-45392: Update the docstring of the type built-in to remove a redundant line and to mention keyword arguments for the constructor.


bpo-45732: Updates bundled Tcl/Tk to 8.6.12.

bpo-45720: Internal reference to shlwapi.dll was dropped to help improve startup time. This DLL will no longer be loaded at the start of every Python process.