构建

(https://invisible-island.net/ncurses/NEWS.html#index-t20170401). The ncurses-devel package in CentOS 7 had a older version ncurses resulted in compilation error. For compiling ncurses with extended color support, we verify the version of the ncurses library >= 20170401.

Windows

macOS

IDLE

工具/示例

C API

Patch by Gabriele N. Tornetta

Removed functions:

  • PyTrashdeposit_object()

  • PyTrashdestroy_chain()

  • PyTrashthread_deposit_object()

  • PyTrashthread_destroy_chain()

The trashcan C API was never usable with the limited C API, since old trashcan macros accessed directly PyThreadState members like tstate->trashdelete_nesting, whereas the PyThreadState structure is opaque in the limited C API.

Exclude also the PyTrash_UNWIND_LEVEL constant from the C API.

Patch by Victor Stinner.

Use the new PyConfig API of the Python Initialization Configuration instead ( PEP 587 [https://peps.python.org/pep-0587/]).

Python 3.10.0 beta 1

发布日期: 2021-05-03

安全性

Following the controlling specification for URLs defined by WHATWG urllib.parse() now removes ASCII newlines and tabs from URLs, preventing such attacks.

核心与内置函数

inspect.signature(), inspect.from_callable(), and inspect.from_function() now call inspect.get_annotations() to retrieve annotations. This means inspect.signature() and inspect.from_callable() can now un-stringize stringized annotations, too.

Patch by Jelle Zijlstra.

pathlib.Path.expanduser() and home() now consistently raise RuntimeError exception when a home directory cannot be resolved. Previously a KeyError exception could be raised on Windows when the "USERNAME" environment variable was unset.

文档

测试

构建

Windows

macOS

IDLE

C API

Python 3.10.0 alpha 7

发布日期: 2021-04-05

安全性

Code that requires the former vulnerable behavior may set a trust_server_pasv_ipv4_address attribute on their ftplib.FTP instances to True to re-enable it.

核心与内置函数

It also has the advantage of eliminating the memory unsanitary behavior of the previous address_in_range(). The old address_in_range() was marked with the annotations PyNO_SANITIZE_ADDRESS, PyNO_SANITIZE_THREAD, and PyNO_SANITIZE_MEMORY. Those annotations are no longer needed.

To disable the radix tree map, set a preprocessor flag as follows: -DWITH_PYMALLOC_RADIX_TREE=0.

Co-authored-by: Tim Peters <tim.peters@gmail.com>

The cause is that SMTP.auth_login always returns a password if provided with a challenge string, thus non-compliant with the standard for AUTH LOGIN.

Also fixes bug with the test for smtpd.

entry_points only returns unique distributions.

Introduces new EntryPoints object for containing a set of entry points with convenience methods for selecting entry points by group or name. entry_points now returns this object if selection parameters are supplied but continues to return a dict object for compatibility. Users are encouraged to rely on the selection interface. The dict object result is likely to be deprecated in the future.

Added packages_distributions function to return a mapping of packages to the distributions that provide them.

文档

测试

构建

Windows

IDLE

C API

The limited C API is still not supported in the --with-trace-refs special build (Py_TRACE_REFS macro).

Patch by Victor Stinner.

These functions were undocumented, excluded from the limited C API, and were only used internally by the compiler. Patch by Victor Stinner.

  • bpo-43244 [https://bugs.python.org/issue?@action=redirect&bpo=43244]: Remove the compiler and parser functions using struct _mod type, because the public AST C API was removed:

    • PyAST_Compile()

    • PyAST_CompileEx()

    • PyAST_CompileObject()

    • PyFuture_FromAST()

    • PyFuture_FromASTObject()

    • PyParser_ASTFromFile()

    • PyParser_ASTFromFileObject()

    • PyParser_ASTFromFilename()

    • PyParser_ASTFromString()

    • PyParser_ASTFromStringObject()

These functions were undocumented and excluded from the limited C API. Patch by Victor Stinner.

Py_SymtableString() 函数误为稳定版 ABI 却无法使用,因为 symtable.h 头文件不属于受限 C API。

The Python symtable module remains available and is unchanged.

Patch by Victor Stinner.

Python 3.10.0 alpha 6

发布日期: 2021-03-01