注意: 虽然 JavaScript 对于本网站不是必需的,但您与内容的互动将受到限制。请开启 JavaScript 以获得完整的体验。

Python 3.12.0a6

发布日期:2023 年 3 月 8 日

这是 Python 3.12 的早期开发者预览版.

与 3.11 相比,3.12 系列的主要新功能

Python 3.12 仍在开发中。此版本 3.12.0a6 是七个计划中的 Alpha 版本中的第六个。

Alpha 版本的目的是为了更容易地测试新功能和错误修复的当前状态,并测试发布过程。

在 Alpha 阶段,功能可能会在 Beta 阶段开始(2023 年 5 月 8 日)之前添加,并且如有必要,可能会在发布候选阶段(2023 年 7 月 31 日)之前进行修改或删除。请记住,这是一个预览版本,建议在生产环境中使用。

Python 3.12 的许多新功能仍在规划和编写中。迄今为止,主要的新功能和更改包括:

  • 更进一步改进的错误消息。现在更多可能由拼写错误引起的异常会向用户提供建议。
  • 支持 Linux `perf` 性能分析器在跟踪中报告 Python 函数名。
  • 根据 PEP 623,unicode 对象的 C 实现中已弃用的 wstrwstr_length 成员已被移除。
  • unittest 模块中,一些长期弃用的方法和类已被移除。(它们自 Python 3.1 或 3.2 起就已被弃用)。
  • 已移除弃用的 smtpddistutils 模块(参见 PEP 594PEP 632)。setuptools 包(默认安装在虚拟环境和许多其他地方)继续提供 distutils 模块。
  • 许多其他旧的、损坏的和已弃用的函数、类和方法已被移除。
  • 字符串中无效的反斜杠转义序列现在会发出 SyntaxWarning 警告,而不是 DeprecationWarning,使其更加显眼。(它们将来会成为语法错误。)
  • 为准备性能增强,整数的内部表示已发生变化。(这不应影响大多数用户,因为它是一个内部细节,但可能会给 Cython 生成的代码带来问题。)
  • (嘿,核心开发者们,如果你们认为重要的功能没有出现在这个列表中,请告知 Thomas。)

有关 Python 3.12 更改的更多详细信息,请参阅Python 3.12 的新增功能。Python 3.12 的下一个预发布版本将是 3.12.0a7,目前定于 2023 年 4 月 3 日发布。

更多资源

接下来是些完全不一样的内容

Let me not to the marriage of true minds
Admit impediments. Love is not love
Which alters when it alteration finds,
Or bends with the remover to remove:
O, no! it is an ever-fixed mark,
That looks on tempests and is never shaken;
It is the star to every wandering bark,
Whose worths unknown, although his height be taken.
Loves not Times fool, though rosy lips and cheeks
Within his bending sickles compass come;
Love alters not with his brief hours and weeks,
But bears it out even to the edge of doom.

If this be error, and upon me provd,
I never writ, nor no man ever lovd.

十四行诗 116,威廉·莎士比亚。

文件

版本 操作系统 描述 MD5 校验和 文件大小 Sigstore GPG
Gzip 压缩的源码包 源码发布版 8b5986524d06b208b8cdca8d0411801b 25.2 MB CRT SIG SIG
XZ 压缩的源码包 源码发布版 832b1c175bb9982a75dd4a1f8b899675 18.9 MB CRT SIG SIG
macOS 64 位 universal2 安装程序 macOS 适用于 macOS 10.9 及更高版本 e5dd31509889c630bfecf0a9b70bb3b8 40.6 MB CRT SIG SIG
Windows 安装程序 (64位) Windows 推荐 171a0ae8f7fb92caaa1ac07312f36815 24.1 MB CRT SIG SIG
Windows 安装程序 (32位) Windows 337efcc2b41b7d52c5d95b99c0ed3ce8 23.0 MB CRT SIG SIG
Windows 安装程序 (ARM64) Windows 实验性 9ce06807e2c96d2b50f4d70be2d04334 23.4 MB CRT SIG SIG
Windows 可嵌入包 (64位) Windows dd8436303ec5bf6f6179fa6d34b23c5d 9.7 MB CRT SIG SIG
Windows 可嵌入包 (32位) Windows b743a93fb98b8509d7823a34a38a4897 8.7 MB CRT SIG SIG
Windows 可嵌入包 (ARM64) Windows 7d58b2d9779bae73e8945858a491c9c7 9.1 MB CRT SIG SIG