This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation.

In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain.

Original patch by Giampaolo Rodola, updated by Ying Wang.

文档

Add a few tests to verify that the various values passed to the std* arguments actually work.

测试

构建

  • bpo-36721 [https://bugs.python.org/issue?@action=redirect&bpo=36721]: To embed Python into an application, a new --embed option must be passed to python3-config --libs --embed to get -lpython3.8 (link the application to libpython). To support both 3.8 and older, try python3-config --libs --embed first and fallback to python3-config --libs (without --embed) if the previous command fails.

增加一个 pkg-config python3.8-embed 模块用来将 Python 嵌入到一个应用中: pkg-config python3.8-embed --libs 包含 -lpython3.8。 要同时支持 3.8 和旧版本,请先尝试 pkg-config pythonX.Y-embed --libs 并在此命令失败时回退到 pkg-config pythonX.Y --libs (即不带 --embed) (请将 X.Y 替换为 Python 版本号)。

On the other hand, pkg-config python3.8 --libs no longer contains -lpython3.8. C extensions must not be linked to libpython (except on Android, case handled by the script); this change is backward incompatible on purpose.

Windows

macOS

IDLE

工具/示例

C API

Python 3.8.0 alpha 4

发布日期: 2019-05-06

安全性

核心与内置函数

文档

测试

构建

通过共享库的 Python 构建的 C 扩展现在可以被静态链接的 Python 加载了。

When Python is embedded, libpython must not be loaded with RTLD_LOCAL, but RTLD_GLOBAL instead. Previously, using RTLD_LOCAL, it was already not possible to load C extensions which were not linked to libpython, such as C extensions of the standard library built by the shared section of Modules/Setup.

distutils,python-config 和 python-config.py 已被修改。

Windows

macOS

IDLE

工具/示例

C API

Python 3.8.0 alpha 3

发布日期: 2019-03-25

安全性

核心与内置函数

文档

测试

构建