文档
bpo-41428 [https://bugs.python.org/issue?@action=redirect&bpo=41428]: Add documentation for PEP 604 [https://peps.python.org/pep-0604/] (Allow writing union types as
X | Y
).bpo-41774 [https://bugs.python.org/issue?@action=redirect&bpo=41774]: In Programming FAQ "Sequences (Tuples/Lists)" section, add "How do you remove multiple items from a list".
bpo-35293 [https://bugs.python.org/issue?@action=redirect&bpo=35293]: Fix RemovedInSphinx40Warning when building the documentation. Patch by Donghee Na.
bpo-37149 [https://bugs.python.org/issue?@action=redirect&bpo=37149]: Change Shipman tkinter doc link from archive.org to TkDocs. (The doc has been removed from the NMT server.) The new link responds much faster and includes a short explanatory note.
bpo-41726 [https://bugs.python.org/issue?@action=redirect&bpo=41726]: Update the refcounts info of
PyType_FromModuleAndSpec
.bpo-41624 [https://bugs.python.org/issue?@action=redirect&bpo=41624]: Fix the signature of
typing.Coroutine
.bpo-40204 [https://bugs.python.org/issue?@action=redirect&bpo=40204]: Enable Sphinx 3.2
c_allow_pre_v3
option and disablec_warn_on_allowed_pre_v3
option to make the documentation compatible with Sphinx 2 and Sphinx 3.bpo-41045 [https://bugs.python.org/issue?@action=redirect&bpo=41045]: Add documentation for debug feature of fstrings.
bpo-41314 [https://bugs.python.org/issue?@action=redirect&bpo=41314]: Changed the release when
from __future__ import annotations
becomes the default from4.0
to3.10
(following a change in PEP 563).bpo-40979 [https://bugs.python.org/issue?@action=redirect&bpo=40979]: Refactored typing.rst, arranging more than 70 classes, functions, and decorators into new subsections.
bpo-40552 [https://bugs.python.org/issue?@action=redirect&bpo=40552]: Fix in tutorial section 4.2. Code snippet is now correct.
bpo-39883 [https://bugs.python.org/issue?@action=redirect&bpo=39883]: Make code, examples, and recipes in the Python documentation be licensed under the more permissive BSD0 license in addition to the existing Python 2.0 license.
bpo-37703 [https://bugs.python.org/issue?@action=redirect&bpo=37703]: Updated Documentation to comprehensively elaborate on the behaviour of gather.cancel()
测试
bpo-41939 [https://bugs.python.org/issue?@action=redirect&bpo=41939]: Fix test_site.test_license_existsaturl(): call
urllib.request.urlcleanup()
to reset the globalurllib.request._opener
. Patch by Victor Stinner.bpo-41731 [https://bugs.python.org/issue?@action=redirect&bpo=41731]: Make test_cmd_line_script pass with option '-vv'.
bpo-41602 [https://bugs.python.org/issue?@action=redirect&bpo=41602]: Add tests for SIGINT handling in the runpy module.
bpo-41521 [https://bugs.python.org/issue?@action=redirect&bpo=41521]:
test.support
: Renameblacklist
parameter ofcheck__all__()
tonot_exported
.bpo-41477 [https://bugs.python.org/issue?@action=redirect&bpo=41477]: Make ctypes optional in test_genericalias.
bpo-41085 [https://bugs.python.org/issue?@action=redirect&bpo=41085]: Fix integer overflow in the
array.array.index()
method on 64-bit Windows for index larger than2**31
.bpo-41069 [https://bugs.python.org/issue?@action=redirect&bpo=41069]:
test.support.TESTFN
and the current directory for tests when run viatest.regrtest
contain now nonascii characters if possible.bpo-38377 [https://bugs.python.org/issue?@action=redirect&bpo=38377]: On Linux, skip tests using multiprocessing if the current user cannot create a file in
devshm/
directory. Add theskip_if_broken_multiprocessing_synchronize()
function to thetest.support
module.bpo-41009 [https://bugs.python.org/issue?@action=redirect&bpo=41009]: Fix use of
support.require_{linux|mac|freebsd}_version()
decorators as class decorator.bpo-41003 [https://bugs.python.org/issue?@action=redirect&bpo=41003]: Fix
test_copyreg
whennumpy
is installed:test.pickletester
now saves/restores warnings filters when importingnumpy
, to ignore filters installed bynumpy
.bpo-40964 [https://bugs.python.org/issue?@action=redirect&bpo=40964]: Disable remote
imaplib
tests, host cyrus.andrew.cmu.edu is blocking incoming connections.bpo-40927 [https://bugs.python.org/issue?@action=redirect&bpo=40927]: Fix test_binhex when run twice: it now uses import_fresh_module() to ensure that it raises DeprecationWarning each time.
bpo-17258 [https://bugs.python.org/issue?@action=redirect&bpo=17258]: Skip some
multiprocessing
tests when MD5 hash digest is blocked.bpo-31904 [https://bugs.python.org/issue?@action=redirect&bpo=31904]: Increase LOOPBACK_TIMEOUT to 10 for VxWorks RTOS.
bpo-38169 [https://bugs.python.org/issue?@action=redirect&bpo=38169]: Increase code coverage for SharedMemory and ShareableList
bpo-34401 [https://bugs.python.org/issue?@action=redirect&bpo=34401]: Make test_gdb properly run on HP-UX. Patch by Michael Osipov.
构建
bpo-38249 [https://bugs.python.org/issue?@action=redirect&bpo=38249]: Update
Py_UNREACHABLE
to use __builtin_unreachable() if only the compiler is able to use it. Patch by Donghee Na.bpo-41617 [https://bugs.python.org/issue?@action=redirect&bpo=41617]: Fix
pycore_bitutils.h
header file to support old clang versions:__builtin_bswap16()
is not available in LLVM clang 3.0.bpo-40204 [https://bugs.python.org/issue?@action=redirect&bpo=40204]: Pin Sphinx version to 2.3.1 in
Doc/Makefile
.bpo-36020 [https://bugs.python.org/issue?@action=redirect&bpo=36020]: The C99 functions
snprintf()
andvsnprintf()
are now required to build Python.bpo-40684 [https://bugs.python.org/issue?@action=redirect&bpo=40684]:
make install
now uses thePLATLIBDIR
variable for the destinationlib-dynload/
directory when./configure --with-platlibdir
is used.bpo-40683 [https://bugs.python.org/issue?@action=redirect&bpo=40683]: Fixed an issue where the
zoneinfo
module and its tests were not included when Python is installed withmake
.
Windows
bpo-41744 [https://bugs.python.org/issue?@action=redirect&bpo=41744]: Fixes automatic import of props file when using the Nuget package.
bpo-41627 [https://bugs.python.org/issue?@action=redirect&bpo=41627]: The user site directory for 32-bit now includes a
-32
suffix to distinguish it from the 64-bit interpreter's directory.bpo-41526 [https://bugs.python.org/issue?@action=redirect&bpo=41526]: Fixed layout of final page of the installer by removing the special thanks to Mark Hammond (with his permission).
bpo-41492 [https://bugs.python.org/issue?@action=redirect&bpo=41492]: Fixes the description that appears in UAC prompts.
bpo-40948 [https://bugs.python.org/issue?@action=redirect&bpo=40948]: Improve post-install message to direct people to the "py" command.
bpo-41412 [https://bugs.python.org/issue?@action=redirect&bpo=41412]: The installer will now fail to install on Windows 7 and Windows 8. Further, the UCRT dependency is now always downloaded on demand.
bpo-40741 [https://bugs.python.org/issue?@action=redirect&bpo=40741]: Update Windows release to include SQLite 3.32.3.
bpo-41142 [https://bugs.python.org/issue?@action=redirect&bpo=41142]:
msilib
now supports creating CAB files with nonASCII file path and adding files with nonASCII file path to them.bpo-41074 [https://bugs.python.org/issue?@action=redirect&bpo=41074]: Fixed support of nonASCII names in functions
msilib.OpenDatabase()
andmsilib.init_database()
and nonASCII SQL in methodmsilib.Database.OpenView()
.bpo-41039 [https://bugs.python.org/issue?@action=redirect&bpo=41039]: Stable ABI redirection DLL (python3.dll) now uses
#pragma comment(linker)
for reexporting.bpo-40164 [https://bugs.python.org/issue?@action=redirect&bpo=40164]: Updates Windows OpenSSL to 1.1.1g
bpo-39631 [https://bugs.python.org/issue?@action=redirect&bpo=39631]: Changes the registered MIME type for
.py
files on Windows totext/x-python
instead oftext/plain
.bpo-40677 [https://bugs.python.org/issue?@action=redirect&bpo=40677]: Manually define IO_REPARSE_TAG_APPEXECLINK in case some old Windows SDK doesn't have it.
bpo-37556 [https://bugs.python.org/issue?@action=redirect&bpo=37556]: Extend py.exe help to mention overrides via venv, shebang, environmental variables & ini files.
macOS
bpo-41557 [https://bugs.python.org/issue?@action=redirect&bpo=41557]: Update macOS installer to use SQLite 3.33.0.
bpo-39580 [https://bugs.python.org/issue?@action=redirect&bpo=39580]: Avoid opening Finder window if running installer from the command line. Patch contributed by Rick Heil.
bpo-41100 [https://bugs.python.org/issue?@action=redirect&bpo=41100]: Fix configure error when building on macOS 11. Note that the current Python release was released shortly after the first developer preview of macOS 11 (Big Sur); there are other known issues with building and running on the developer preview. Big Sur is expected to be fully supported in a future bugfix release of Python 3.8.x and with 3.9.0.
bpo-40741 [https://bugs.python.org/issue?@action=redirect&bpo=40741]: Update macOS installer to use SQLite 3.32.3.
bpo-41005 [https://bugs.python.org/issue?@action=redirect&bpo=41005]: fixed an XDG settings issue not allowing macos to open browser in webbrowser.py
bpo-40741 [https://bugs.python.org/issue?@action=redirect&bpo=40741]: Update macOS installer to use SQLite 3.32.2.
IDLE
bpo-41775 [https://bugs.python.org/issue?@action=redirect&bpo=41775]: Use 'IDLE Shell' as shell title
bpo-35764 [https://bugs.python.org/issue?@action=redirect&bpo=35764]: Rewrite the Calltips doc section.
bpo-40181 [https://bugs.python.org/issue?@action=redirect&bpo=40181]: In calltips, stop reminding that '/' marks the end of positional-only arguments.
bpo-41468 [https://bugs.python.org/issue?@action=redirect&bpo=41468]: Improve IDLE run crash error message (which users should never see).
bpo-41373 [https://bugs.python.org/issue?@action=redirect&bpo=41373]: Save files loaded with no line ending, as when blank, or different line endings, by setting its line ending to the system default. Fix regression in 3.8.4 and 3.9.0b4.
bpo-41300 [https://bugs.python.org/issue?@action=redirect&bpo=41300]: Save files with nonascii chars. Fix regression released in 3.9.0b4 and 3.8.4.
bpo-37765 [https://bugs.python.org/issue?@action=redirect&bpo=37765]: Add keywords to module name completion list. Rewrite Completions section of IDLE doc.
bpo-41152 [https://bugs.python.org/issue?@action=redirect&bpo=41152]: The encoding of
stdin
,stdout
andstderr
in IDLE is now always UTF-8.bpo-41144 [https://bugs.python.org/issue?@action=redirect&bpo=41144]: Make Open Module open a special module such as os.path.
bpo-39885 [https://bugs.python.org/issue?@action=redirect&bpo=39885]: Make context menu Cut and Copy work again when right-clicking within a selection.
bpo-40723 [https://bugs.python.org/issue?@action=redirect&bpo=40723]: Make test_idle pass when run after import.
C API
bpo-41936 [https://bugs.python.org/issue?@action=redirect&bpo=41936]: Removed undocumented macros
Py_ALLOW_RECURSION
andPy_END_ALLOW_RECURSION
and therecursion_critical
field of thePyInterpreterState
structure.bpo-41692 [https://bugs.python.org/issue?@action=redirect&bpo=41692]: The
PyUnicode_InternImmortal()
function is now deprecated and will be removed in Python 3.12: usePyUnicode_InternInPlace()
instead. Patch by Victor Stinner.bpo-41842 [https://bugs.python.org/issue?@action=redirect&bpo=41842]: Add
PyCodec_Unregister()
function to unregister a codec search function.bpo-41834 [https://bugs.python.org/issue?@action=redirect&bpo=41834]: Remove the
PyCheckRecursionLimit
variable: it has been replaced byceval.recursion_limit
of thePyInterpreterState
structure. Patch by Victor Stinner.bpo-41689 [https://bugs.python.org/issue?@action=redirect&bpo=41689]: Types created with
PyType_FromSpec()
now make any signature in theirtp_doc
slot accessible from__textsignature_
.bpo-41524 [https://bugs.python.org/issue?@action=redirect&bpo=41524]: Fix bug in PyOS_mystrnicmp and PyOS_mystricmp that incremented pointers beyond the end of a string.
bpo-41324 [https://bugs.python.org/issue?@action=redirect&bpo=41324]: Add a minimal decimal capsule API. The API supports fast conversions between Decimals up to 38 digits and their triple representation as a C struct.
bpo-30155 [https://bugs.python.org/issue?@action=redirect&bpo=30155]: Add
PyDateTime_DATE_GET_TZINFO()
andPyDateTime_TIME_GET_TZINFO()
macros for accessing thetzinfo
attributes ofdatetime.datetime
anddatetime.time
objects.bpo-40170 [https://bugs.python.org/issue?@action=redirect&bpo=40170]: Revert
PyType_HasFeature()
change: it reads again directly thePyTypeObject.tp_flags
member when the limited C API is not used, rather than always callingPyType_GetFlags()
which hides implementation details.bpo-41123 [https://bugs.python.org/issue?@action=redirect&bpo=41123]: Remove
PyUnicode_AsUnicodeCopy
.bpo-41123 [https://bugs.python.org/issue?@action=redirect&bpo=41123]: Removed
PyLong_FromUnicode()
.bpo-41123 [https://bugs.python.org/issue?@action=redirect&bpo=41123]: Removed
PyUnicode_GetMax()
.bpo-41123 [https://bugs.python.org/issue?@action=redirect&bpo=41123]: Removed
Py_UNICODE_str*
functions manipulatingPy_UNICODE*
strings.bpo-41103 [https://bugs.python.org/issue?@action=redirect&bpo=41103]:
PyObject_AsCharBuffer()
,PyObject_AsReadBuffer()
,PyObject_CheckReadBuffer()
, andPyObject_AsWriteBuffer()
are removed. Please migrate to new buffer protocol;PyObject_GetBuffer()
andPyBuffer_Release()
.bpo-36346 [https://bugs.python.org/issue?@action=redirect&bpo=36346]: Raises DeprecationWarning for
PyUnicode_FromUnicode(NULL, size)
andPyUnicode_FromStringAndSize(NULL, size)
withsize > 0
.bpo-36346 [https://bugs.python.org/issue?@action=redirect&bpo=36346]: Mark
Py_UNICODE_COPY
,Py_UNICODE_FILL
,PyUnicode_WSTR_LENGTH
,PyUnicode_FromUnicode
,PyUnicode_AsUnicode
, andPyUnicode_AsUnicodeAndSize
as deprecated in C. RemovePy_UNICODE_MATCH
which was deprecated and broken since Python 3.3.bpo-40989 [https://bugs.python.org/issue?@action=redirect&bpo=40989]: The
PyObject_INIT()
andPyObject_INIT_VAR()
macros become aliases to, respectively,PyObject_Init()
andPyObject_InitVar()
functions.bpo-36020 [https://bugs.python.org/issue?@action=redirect&bpo=36020]: On Windows,
#include "pyerrors.h"
no longer definessnprintf
andvsnprintf
macros.bpo-40943 [https://bugs.python.org/issue?@action=redirect&bpo=40943]: The
PY_SSIZE_T_CLEAN
macro must now be defined to usePyArg_ParseTuple()
andPy_BuildValue()
formats which use#
:es#
,et#
,s#
,u#
,y#
,z#
,U#
andZ#
. See Parsing arguments and building values and the PEP 353 [https://peps.python.org/pep-0353/].bpo-40910 [https://bugs.python.org/issue?@action=redirect&bpo=40910]: Export explicitly the
Py_GetArgcArgv()
function to the C API and document the function. Previously, it was exported implicitly which no longer works since Python is built with-fvisibility=hidden
.bpo-40724 [https://bugs.python.org/issue?@action=redirect&bpo=40724]: Allow defining buffer slots in type specs.
bpo-40679 [https://bugs.python.org/issue?@action=redirect&bpo=40679]: Fix a
PyEvalEvalCode()
crash if qualname argument is NULL.bpo-40839 [https://bugs.python.org/issue?@action=redirect&bpo=40839]: Calling
PyDict_GetItem()
without GIL held had been allowed for historical reason. It is no longer allowed.bpo-40826 [https://bugs.python.org/issue?@action=redirect&bpo=40826]:
PyOS_InterruptOccurred()
now fails with a fatal error if it is called with the GIL released.bpo-40792 [https://bugs.python.org/issue?@action=redirect&bpo=40792]: The result of
PyNumber_Index()
now always has exact typeint
. Previously, the result could have been an instance of a subclass ofint
.bpo-39573 [https://bugs.python.org/issue?@action=redirect&bpo=39573]: Convert
Py_REFCNT()
andPy_SIZE()
macros to static inline functions. They cannot be used as l-value anymore: usePy_SET_REFCNT()
andPy_SET_SIZE()
to set an object reference count and size. This change is backward incompatible on purpose, to prepare the C API for an opaquePyObject
structure.bpo-40703 [https://bugs.python.org/issue?@action=redirect&bpo=40703]: The PyTypeFromSpec*() functions no longer overwrite the type's "_module" attribute if it is set via "Py_tp_members" or "Py_tp_getset".
bpo-39583 [https://bugs.python.org/issue?@action=redirect&bpo=39583]: Remove superfluous "extern C" declarations from
Include/cpython/*.h
.
Python 3.9.0 beta 1
发布日期: 2020-05-19
安全性
- bpo-40501 [https://bugs.python.org/issue?@action=redirect&bpo=40501]:
uuid
no longer usesctypes
to loadlibuuid
orrpcrt4.dll
at runtime.
核心与内置函数
bpo-40663 [https://bugs.python.org/issue?@action=redirect&bpo=40663]: Correctly generate annotations where parentheses are omitted but required (e.g:
Type[(str, int, *other))]
.bpo-40596 [https://bugs.python.org/issue?@action=redirect&bpo=40596]: Fixed
str.isidentifier()
for non-canonicalized strings containing non-BMP characters on Windows.bpo-40593 [https://bugs.python.org/issue?@action=redirect&bpo=40593]: Improved syntax errors for invalid characters in source code.
bpo-40585 [https://bugs.python.org/issue?@action=redirect&bpo=40585]: Fixed a bug when using
codeop.compile_command()
that was causing exceptions to be swallowed with the new parser. Patch by Pablo Galindobpo-40566 [https://bugs.python.org/issue?@action=redirect&bpo=40566]: Apply PEP 573 [https://peps.python.org/pep-0573/] to
abc
.bpo-40502 [https://bugs.python.org/issue?@action=redirect&bpo=40502]: Initialize
n->n_col_offset
. (Patch by Joannah Nanjekye)bpo-40527 [https://bugs.python.org/issue?@action=redirect&bpo=40527]: Fix command line argument parsing: no longer write errors multiple times into stderr.
bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port
errno
to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).bpo-40523 [https://bugs.python.org/issue?@action=redirect&bpo=40523]: Add pass-throughs for
hash()
andreversed()
toweakref.proxy
objects. Patch by Pablo Galindo.bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port
syslog
to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).bpo-40246 [https://bugs.python.org/issue?@action=redirect&bpo=40246]: Reporting a specialised error message for invalid string prefixes, which was introduced in bpo-40246 [https://bugs.python.org/issue?@action=redirect&bpo=40246], is being reverted due to backwards compatibility concerns for strings that immediately follow a reserved keyword without whitespace between them. Constructs like
bg="#d00" if clear else"#fca"
were failing to parse, which is not an acceptable breakage on such short notice.bpo-40417 [https://bugs.python.org/issue?@action=redirect&bpo=40417]: Fix imp module deprecation warning when PyImport_ReloadModule is called. Patch by Robert Rouhani.
bpo-40408 [https://bugs.python.org/issue?@action=redirect&bpo=40408]: Fixed support of nested type variables in GenericAlias (e.g.
list[list[T]]
).bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port _stat module to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).
bpo-29587 [https://bugs.python.org/issue?@action=redirect&bpo=29587]: Enable implicit exception chaining when calling
generator.throw()
.bpo-40328 [https://bugs.python.org/issue?@action=redirect&bpo=40328]: Add tools for generating mappings headers for CJKCodecs.
bpo-40228 [https://bugs.python.org/issue?@action=redirect&bpo=40228]: Setting frame.f_lineno is now robust w.r.t. changes in the source-to-bytecode compiler
bpo-38880 [https://bugs.python.org/issue?@action=redirect&bpo=38880]: Added the ability to list interpreters associated with channel ends in the internal subinterpreters module.
bpo-37986 [https://bugs.python.org/issue?@action=redirect&bpo=37986]: Improve performance of
PyLong_FromDouble()
for values that fit into long.
库
bpo-40662 [https://bugs.python.org/issue?@action=redirect&bpo=40662]: Fixed
ast.get_source_segment()
for ast nodes that have incomplete location information. Patch by Irit Katriel.bpo-40665 [https://bugs.python.org/issue?@action=redirect&bpo=40665]: Convert
bisect
to use Argument Clinic.bpo-40536 [https://bugs.python.org/issue?@action=redirect&bpo=40536]: Added the
available_timezones()
function to thezoneinfo
module. Patch by Paul Ganssle.bpo-40645 [https://bugs.python.org/issue?@action=redirect&bpo=40645]: The
hmac.HMAC
exposes internal implementation details. The attributesdigest_cons
,inner
, andouter
are deprecated and will be removed in the future.bpo-40645 [https://bugs.python.org/issue?@action=redirect&bpo=40645]: The internal module
_hashlib
wraps and exposes OpenSSL's HMAC API. The new code will be used in Python 3.10 after the internal implementation details of the pure Python HMAC module are no longer part of the public API.bpo-40637 [https://bugs.python.org/issue?@action=redirect&bpo=40637]: Builtin hash modules can now be disabled or selectively enabled with
configure --with-builtin-hashlib-hashes=sha3,blake1
or--without-builtin-hashlib-hashes
.bpo-37630 [https://bugs.python.org/issue?@action=redirect&bpo=37630]: The
hashlib
module can now use SHA3 hashes and SHAKE XOF from OpenSSL when available.bpo-40479 [https://bugs.python.org/issue?@action=redirect&bpo=40479]: The
hashlib
now compiles with OpenSSL 3.0.0-alpha2.bpo-40257 [https://bugs.python.org/issue?@action=redirect&bpo=40257]: Revert changes to
inspect.getdoc()
.bpo-40607 [https://bugs.python.org/issue?@action=redirect&bpo=40607]: When cancelling a task due to timeout,
asyncio.wait_for()
will now propagate the exception if an error happens during cancellation. Patch by Roman Skurikhin.bpo-40612 [https://bugs.python.org/issue?@action=redirect&bpo=40612]: Fix edge cases in SyntaxError formatting. If the offset is <= 0, no caret is printed. If the offset is > line length, the caret is printed pointing just after the last character.
bpo-40597 [https://bugs.python.org/issue?@action=redirect&bpo=40597]: If text content lines are longer than policy.max_line_length, always use a content-encoding to make sure they are wrapped.
bpo-40571 [https://bugs.python.org/issue?@action=redirect&bpo=40571]: Added functools.cache() as a simpler, more discoverable way to access the unbounded cache variant of lru_cache(maxsize=None).
bpo-40503 [https://bugs.python.org/issue?@action=redirect&bpo=40503]: PEP 615 [https://peps.python.org/pep-0615/], the
zoneinfo
module. Adds support for the IANA time zone database.bpo-40397 [https://bugs.python.org/issue?@action=redirect&bpo=40397]: Removed attributes
__args__
and__parameters__
from special generic aliases liketyping.List
(not subscripted).bpo-40549 [https://bugs.python.org/issue?@action=redirect&bpo=40549]: Convert posixmodule.c ("posix" or "nt" module) to the multiphase initialization (PEP 489).
bpo-31033 [https://bugs.python.org/issue?@action=redirect&bpo=31033]: Add a
msg
argument toFuture.cancel()
andTask.cancel()
.bpo-40541 [https://bugs.python.org/issue?@action=redirect&bpo=40541]: Added an optional counts parameter to random.sample().
bpo-40515 [https://bugs.python.org/issue?@action=redirect&bpo=40515]: The
ssl
andhashlib
modules now actively check that OpenSSL is build with thread support. Python 3.7.0 made thread support mandatory and no longer works safely with a no-thread builds.bpo-31033 [https://bugs.python.org/issue?@action=redirect&bpo=31033]: When a
asyncio.Task
is cancelled, the exception traceback now chains all the way back to where the task was first interrupted.bpo-40504 [https://bugs.python.org/issue?@action=redirect&bpo=40504]:
functools.lru_cache()
objects can now be the targets of weakrefs.bpo-40559 [https://bugs.python.org/issue?@action=redirect&bpo=40559]: Fix possible memory leak in the C implementation of
asyncio.Task
.bpo-40480 [https://bugs.python.org/issue?@action=redirect&bpo=40480]:
fnmatch.fnmatch()
could take exponential time in the presence of multiple*
pattern characters. This was repaired by generating more elaborate regular expressions to avoid futile backtracking.bpo-40495 [https://bugs.python.org/issue?@action=redirect&bpo=40495]:
compileall
is now able to use hardlinks to prevent duplicates in a case when.pyc
files for different optimization levels have the same content.bpo-40457 [https://bugs.python.org/issue?@action=redirect&bpo=40457]: The ssl module now support OpenSSL builds without TLS 1.0 and 1.1 methods.
bpo-40355 [https://bugs.python.org/issue?@action=redirect&bpo=40355]: Improve error reporting in
ast.literal_eval()
in the presence of malformedast.Dict
nodes instead of silently ignoring any non-conforming elements. Patch by Curtis Bucher.bpo-40465 [https://bugs.python.org/issue?@action=redirect&bpo=40465]: Deprecated the optional random argument to random.shuffle().
bpo-40459 [https://bugs.python.org/issue?@action=redirect&bpo=40459]:
platform.win32_ver()
now produces correct ptype strings instead of empty strings.bpo-39435 [https://bugs.python.org/issue?@action=redirect&bpo=39435]: The first argument of
pickle.loads()
is now positional-only.bpo-39305 [https://bugs.python.org/issue?@action=redirect&bpo=39305]: Update
nntplib
to mergenntplib.NNTP
andnntplib._NNTPBase
. Patch by Donghee Na.bpo-32494 [https://bugs.python.org/issue?@action=redirect&bpo=32494]: Update
dbm.gnu
to use gdbm_count if possible when callinglen()
. Patch by Donghee Na.bpo-40453 [https://bugs.python.org/issue?@action=redirect&bpo=40453]: Add
isolated=True
keyword-only parameter to_xxsubinterpreters.create()
. An isolated subinterpreter cannot spawn threads, spawn a child process or callos.fork()
.bpo-40286 [https://bugs.python.org/issue?@action=redirect&bpo=40286]: Remove
_random.Random.randbytes()
: the C implementation ofrandbytes()
. Implement the method in Python to ease subclassing:randbytes()
now directly reusesgetrandbits()
.bpo-40394 [https://bugs.python.org/issue?@action=redirect&bpo=40394]: Added default arguments to
difflib.SequenceMatcher.find_longest_match()
.bpo-39995 [https://bugs.python.org/issue?@action=redirect&bpo=39995]: Fix a race condition in concurrent.futures._ThreadWakeup: access to _ThreadWakeup is now protected with the shutdown lock.
bpo-30966 [https://bugs.python.org/issue?@action=redirect&bpo=30966]:
Process.shutdown(wait=True)
ofconcurrent.futures
now closes explicitly the result queue.bpo-30966 [https://bugs.python.org/issue?@action=redirect&bpo=30966]: Add a new
close()
method to theSimpleQueue
class to explicitly close the queue.bpo-39966 [https://bugs.python.org/issue?@action=redirect&bpo=39966]: Revert bpo-25597 [https://bugs.python.org/issue?@action=redirect&bpo=25597].
unittest.mock.MagicMock
with wraps' set uses default return values for magic methods.bpo-39791 [https://bugs.python.org/issue?@action=redirect&bpo=39791]: Added
files()
function to importlib.resources with support for subdirectories in package data, matching backport in importlib_resources 1.5.bpo-40375 [https://bugs.python.org/issue?@action=redirect&bpo=40375]:
imaplib.IMAP4.unselect()
is added. Patch by Donghee Na.bpo-40389 [https://bugs.python.org/issue?@action=redirect&bpo=40389]:
repr()
now returnstyping.Optional[T]
when called fortyping.Union
of two types, one of which isNoneType
.bpo-40291 [https://bugs.python.org/issue?@action=redirect&bpo=40291]: Add support for CAN_J1939 sockets (available on Linux 5.4+)
bpo-40273 [https://bugs.python.org/issue?@action=redirect&bpo=40273]:
types.MappingProxyType
is now reversible.bpo-39075 [https://bugs.python.org/issue?@action=redirect&bpo=39075]: The repr for
types.SimpleNamespace
is now insertion ordered rather than alphabetical.bpo-40192 [https://bugs.python.org/issue?@action=redirect&bpo=40192]: On AIX,
thread_time()
is now implemented withthread_cputime()
which has nanosecond resolution, rather thanclock_gettime(CLOCK_THREAD_CPUTIME_ID)
which has a resolution of 10 milliseconds. Patch by Batuhan Taskaya.bpo-40025 [https://bugs.python.org/issue?@action=redirect&bpo=40025]: Raise TypeError when generatenextvalue is defined after members. Patch by Ethan Onstott.
bpo-39058 [https://bugs.python.org/issue?@action=redirect&bpo=39058]: In the argparse module, the repr for Namespace() and other argument holders now displayed in the order attributes were added. Formerly, it displayed in alphabetical order even though argument order is preserved the user visible parts of the module.
bpo-24416 [https://bugs.python.org/issue?@action=redirect&bpo=24416]: The
isocalendar()
methods ofdatetime.date
anddatetime.datetime
now return a named tuple instead of atuple
.
文档
bpo-34790 [https://bugs.python.org/issue?@action=redirect&bpo=34790]: Add version of removal for explicit passing of coros to
asyncio.wait()
's documentationbpo-40561 [https://bugs.python.org/issue?@action=redirect&bpo=40561]: Provide docstrings for webbrowser open functions.
bpo-40499 [https://bugs.python.org/issue?@action=redirect&bpo=40499]: Mention that
asyncio.wait()
requires a non-empty set of awaitables.bpo-39705 [https://bugs.python.org/issue?@action=redirect&bpo=39705]: Tutorial example for sorted() in the Loop Techniques section is given a better explanation. Also a new example is included to explain sorted()'s basic behavior.
bpo-39435 [https://bugs.python.org/issue?@action=redirect&bpo=39435]: Fix an incorrect signature for
pickle.loads()
in the docs
测试
bpo-40055 [https://bugs.python.org/issue?@action=redirect&bpo=40055]: distutils.tests now saves/restores warnings filters to leave them unchanged. Importing tests imports docutils which imports pkg_resources which adds a warnings filter.
bpo-40436 [https://bugs.python.org/issue?@action=redirect&bpo=40436]: test_gdb and test.pythoninfo now check gdb command exit code.
构建
bpo-40653 [https://bugs.python.org/issue?@action=redirect&bpo=40653]: Move dirnameW out of HAVESYMLINK to fix a potential compiling issue.
bpo-40514 [https://bugs.python.org/issue?@action=redirect&bpo=40514]: Add
--with-experimental-isolated-subinterpreters
build option toconfigure
: better isolate subinterpreters, experimental build mode.
Windows
bpo-40650 [https://bugs.python.org/issue?@action=redirect&bpo=40650]: Include winsock2.h in pytime.c for timeval.
bpo-40458 [https://bugs.python.org/issue?@action=redirect&bpo=40458]: Increase reserved stack space to prevent overflow crash on Windows.
bpo-39148 [https://bugs.python.org/issue?@action=redirect&bpo=39148]: Add IPv6 support to
asyncio
datagram endpoints in ProactorEventLoop. Change the raised exception for unknown address families to ValueError as it's not coming from Windows API.
macOS
bpo-34956 [https://bugs.python.org/issue?@action=redirect&bpo=34956]: When building Python on macOS from source,
_tkinter
now links with non-system Tcl and Tk frameworks if they are installed inLibraryFrameworks
, as had been the case on older releases of macOS. If a macOS SDK is explicitly configured, by using--enable-universalsdk=
or-isysroot
, only the SDK itself is searched. The default behavior can still be overridden with--with-tcltk-includes
and--with-tcltk-libs
.bpo-35569 [https://bugs.python.org/issue?@action=redirect&bpo=35569]: Expose RFC 3542 IPv6 socket options.
工具/示例
bpo-40479 [https://bugs.python.org/issue?@action=redirect&bpo=40479]: Update multissltest helper to test with latest OpenSSL 1.0.2, 1.1.0, 1.1.1, and 3.0.0-alpha.
bpo-40431 [https://bugs.python.org/issue?@action=redirect&bpo=40431]: Fix a syntax typo in
turtledemo
that now raises aSyntaxError
.bpo-40163 [https://bugs.python.org/issue?@action=redirect&bpo=40163]: Fix multissltest tool. OpenSSL has changed download URL for old releases. The multissltest tool now tries to download from current and old download URLs.
C API
bpo-39465 [https://bugs.python.org/issue?@action=redirect&bpo=39465]: Remove the
PyUnicodeClearStaticStrings()
function from the C API.bpo-38787 [https://bugs.python.org/issue?@action=redirect&bpo=38787]: Add PyCFunction_CheckExact() macro for exact type checks now that we allow subtypes of PyCFunction, as well as PyCMethod_CheckExact() and PyCMethod_Check() for the new PyCMethod subtype.
bpo-40545 [https://bugs.python.org/issue?@action=redirect&bpo=40545]: Declare
PyErrGetTopmostException()
withPyAPI_FUNC()
to properly export the function in the C API. The function remains private (_Py
) prefix.bpo-40412 [https://bugs.python.org/issue?@action=redirect&bpo=40412]: Nullify inittab_copy during finalization, preventing future interpreter initializations in an embedded situation from crashing. Patch by Gregory Szorc.
bpo-40429 [https://bugs.python.org/issue?@action=redirect&bpo=40429]: The
PyThreadState_GetFrame()
function now returns a strong reference to the frame.bpo-40428 [https://bugs.python.org/issue?@action=redirect&bpo=40428]: Remove the following functions from the C API. Call
PyGC_Collect()
explicitly to free all free lists.PyAsyncGen_ClearFreeLists()
PyContext_ClearFreeList()
PyDict_ClearFreeList()
PyFloat_ClearFreeList()
PyFrame_ClearFreeList()
PyList_ClearFreeList()
PySet_ClearFreeList()
PyTuple_ClearFreeList()
bpo-40421 [https://bugs.python.org/issue?@action=redirect&bpo=40421]: New
PyFrame_GetBack()
function: get the frame next outer frame.bpo-40421 [https://bugs.python.org/issue?@action=redirect&bpo=40421]: New
PyFrame_GetCode()
function: return a borrowed reference to the frame code.bpo-40217 [https://bugs.python.org/issue?@action=redirect&bpo=40217]: Ensure that instances of types created with
PyType_FromSpecWithBases()
will visit its class object when traversing references in the garbage collector (implemented as an extension of the providedtp_traverse
). Patch by Pablo Galindo.bpo-38787 [https://bugs.python.org/issue?@action=redirect&bpo=38787]: Module C state is now accessible from C-defined heap type methods ( PEP 573 [https://peps.python.org/pep-0573/]). Patch by Marcel Plch and Petr Viktorin.
Python 3.9.0 alpha 6
发布日期: 2020-04-27
安全性
bpo-40121 [https://bugs.python.org/issue?@action=redirect&bpo=40121]: Fixes audit events raised on creating a new socket.
bpo-39073 [https://bugs.python.org/issue?@action=redirect&bpo=39073]: Disallow CR or LF in email.headerregistry.Address arguments to guard against header injection attacks.
bpo-39503 [https://bugs.python.org/issue?@action=redirect&bpo=39503]: CVE 2020-8492 [https://www.cve.org/CVERecord?id=CVE-2020-8492]: The
AbstractBasicAuthHandler
class of theurllib.request
module uses an inefficient regular expression which can be exploited by an attacker to cause a denial of service. Fix the regex to prevent the catastrophic backtracking. Vulnerability reported by Ben Caller and Matt Schwager.
核心与内置函数
bpo-40313 [https://bugs.python.org/issue?@action=redirect&bpo=40313]: Improve the performance of bytes.hex().
bpo-40334 [https://bugs.python.org/issue?@action=redirect&bpo=40334]: Switch to a new parser, based on PEG. For more details see PEP 617. To temporarily switch back to the old parser, use
-X oldparser
orPYTHONOLDPARSER=1
. In Python 3.10 we will remove the old parser completely, including theparser
module (already deprecated) and anything that depends on it.bpo-40267 [https://bugs.python.org/issue?@action=redirect&bpo=40267]: Fix the tokenizer to display the correct error message, when there is a
SyntaxError
on the last input character and no newline follows. It used to beunexpected EOF while parsing
, while it should beinvalid syntax
.bpo-39522 [https://bugs.python.org/issue?@action=redirect&bpo=39522]: Correctly unparse explicit
u
prefix for strings when postponed evaluation for annotations activated. Patch by Batuhan Taskaya.bpo-40246 [https://bugs.python.org/issue?@action=redirect&bpo=40246]: Report a specialized error message,
invalid string prefix
, when the tokenizer encounters a string with an invalid prefix.bpo-40082 [https://bugs.python.org/issue?@action=redirect&bpo=40082]: Fix the signal handler: it now always uses the main interpreter, rather than trying to get the current Python thread state.
bpo-37388 [https://bugs.python.org/issue?@action=redirect&bpo=37388]: str.encode() and str.decode() no longer check the encoding and errors in development mode or in debug mode during Python finalization. The codecs machinery can no longer work on very late calls to str.encode() and str.decode().
bpo-40077 [https://bugs.python.org/issue?@action=redirect&bpo=40077]: Fix possible refleaks in
_json
, memo of PyScannerObject should be traversed.bpo-37207 [https://bugs.python.org/issue?@action=redirect&bpo=37207]: Speed up calls to
dict()
by using the PEP 590 [https://peps.python.org/pep-0590/]vectorcall
calling convention.bpo-40141 [https://bugs.python.org/issue?@action=redirect&bpo=40141]: Add column and line information to
ast.keyword
nodes. Patch by Pablo Galindo.bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port
resource
to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port
math
to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port _uuid module to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).
bpo-40077 [https://bugs.python.org/issue?@action=redirect&bpo=40077]: Convert json module to use
PyType_FromSpec()
.bpo-40067 [https://bugs.python.org/issue?@action=redirect&bpo=40067]: Improve the error message for multiple star expressions in an assignment. Patch by Furkan Onder
bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port _functools module to multiphase initialization (PEP 489). Patch by Paulo Henrique Silva.
bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port operator module to multiphase initialization (PEP 489). Patch by Paulo Henrique Silva.
bpo-20526 [https://bugs.python.org/issue?@action=redirect&bpo=20526]: Fix
PyThreadState_Clear()
.PyThreadState.frame
is a borrowed reference, not a strong reference:PyThreadState_Clear()
must not callPy_CLEAR(tstate->frame)
.bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port time module to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]). Patch by Paulo Henrique Silva.
bpo-1635741 [https://bugs.python.org/issue?@action=redirect&bpo=1635741]: Port _weakref extension module to multiphase initialization ( PEP 489 [https://peps.python.org/pep-0489/]).
bpo-40020 [https://bugs.python.org/issue?@action=redirect&bpo=40020]: Fix a leak and subsequent crash in parsetok.c caused by realloc misuse on a rare codepath.
bpo-39939 [https://bugs.python.org/issue?@action=redirect&bpo=39939]: Added str.removeprefix and str.removesuffix methods and corresponding bytes, bytearray, and collections.UserString methods to remove affixes from a string if present. See PEP 616 [https://peps.python.org/pep-0616/] for a full description. Patch by Dennis Sweeney.
bpo-39481 [https://bugs.python.org/issue?@action=redirect&bpo=39481]: Implement PEP 585. This supports list[int], tuple[str, …] etc.
bpo-32894 [https://bugs.python.org/issue?@action=redirect&bpo=32894]: Support unparsing of infinity numbers in postponed annotations. Patch by Batuhan Taşkaya.
bpo-37207 [https://bugs.python.org/issue?@action=redirect&bpo=37207]: Speed up calls to
list()
by using the PEP 590 [https://peps.python.org/pep-0590/]vectorcall
calling convention. Patch by Mark Shannon.
库
bpo-40398 [https://bugs.python.org/issue?@action=redirect&bpo=40398]:
typing.get_args()
now always returns an empty tuple for special generic aliases.bpo-40396 [https://bugs.python.org/issue?@action=redirect&bpo=40396]: Functions
typing.get_origin()
,typing.get_args()
andtyping.get_type_hints()
support now generic aliases likelist[int]
.bpo-38061 [https://bugs.python.org/issue?@action=redirect&bpo=38061]: Optimize the
subprocess
module on FreeBSD usingclosefrom()
. A singleclose(fd)
syscall is cheap, but whensysconf(SCOPEN_MAX)
is high, the loop callingclose(fd)
on each file descriptor can take several milliseconds.
The workaround on FreeBSD to improve performance was to load and mount the fdescfs kernel module, but this is not enabled by default.
Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans (kevans) and Kubilay Kocak (koobs): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
- bpo-38061 [https://bugs.python.org/issue?@action=redirect&bpo=38061]: On FreeBSD,
os.closerange(fd_low, fd_high)
now callsclosefrom(fd_low)
if fd_high is greater than or equal tosysconf(SCOPEN_MAX)
.
Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans (kevans) and Kubilay Kocak (koobs): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
bpo-40360 [https://bugs.python.org/issue?@action=redirect&bpo=40360]: The
lib2to3
module is pending deprecation due to PEP 617 [https://peps.python.org/pep-0617/].bpo-40138 [https://bugs.python.org/issue?@action=redirect&bpo=40138]: Fix the Windows implementation of
os.waitpid()
for exit code larger thanINT_MAX >> 8
. The exit status is now interpreted as an unsigned number.bpo-39942 [https://bugs.python.org/issue?@action=redirect&bpo=39942]: Set "main" as the default module name when "name" is missing in
typing.TypeVar
. Patch by Weipeng Hong.bpo-40275 [https://bugs.python.org/issue?@action=redirect&bpo=40275]: The
logging
package is now imported lazily inunittest
only when theassertLogs()
assertion is used.bpo-40275 [https://bugs.python.org/issue?@action=redirect&bpo=40275]: The
asyncio
package is now imported lazily inunittest
only when theIsolatedAsyncioTestCase
class is used.bpo-40330 [https://bugs.python.org/issue?@action=redirect&bpo=40330]: In
ShareableList.__setitem__()
, check the size of a new string item after encoding it to utf-8, not before.bpo-40148 [https://bugs.python.org/issue?@action=redirect&bpo=40148]: Added
pathlib.Path.with_stem()
to create a new Path with the stem replaced.bpo-40325 [https://bugs.python.org/issue?@action=redirect&bpo=40325]: Deprecated support for set objects in random.sample().
bpo-40257 [https://bugs.python.org/issue?@action=redirect&bpo=40257]: Improved help for the
typing
module. Docstrings are now shown for all special forms and special generic aliases (likeUnion
andList
). Usinghelp()
with generic alias likeList[int]
will show the help for the correspondent concrete type (list
in this case).bpo-40257 [https://bugs.python.org/issue?@action=redirect&bpo=40257]:
inspect.getdoc()
no longer returns docstring inherited from the type of the object or from parent class if it is a class if it is not defined in the object itself. Inpydoc
the documentation string is now shown not only for class, function, method etc, but for any object that has its own__doc__
attribute.bpo-40287 [https://bugs.python.org/issue?@action=redirect&bpo=40287]: Fixed
SpooledTemporaryFile.seek()
to return the position.bpo-40290 [https://bugs.python.org/issue?@action=redirect&bpo=40290]: Added zscore() to statistics.NormalDist().
bpo-40282 [https://bugs.python.org/issue?@action=redirect&bpo=40282]: Allow
random.getrandbits(0)
to succeed and to return 0.bpo-40286 [https://bugs.python.org/issue?@action=redirect&bpo=40286]: Add
random.randbytes()
function andrandom.Random.randbytes()
method to generate random bytes.bpo-40277 [https://bugs.python.org/issue?@action=redirect&bpo=40277]:
collections.namedtuple()
now provides a human-readable repr for its field accessors.bpo-40270 [https://bugs.python.org/issue?@action=redirect&bpo=40270]: The included copy of sqlite3 on Windows is now compiled with the json extension. This allows the use of functions such as
json_object
.bpo-29255 [https://bugs.python.org/issue?@action=redirect&bpo=29255]: Wait in
KqueueSelector.select
when no fds are registeredbpo-40260 [https://bugs.python.org/issue?@action=redirect&bpo=40260]: Ensure
modulefinder
usesio.open_code()
and respects coding comments.bpo-40234 [https://bugs.python.org/issue?@action=redirect&bpo=40234]: Allow again to spawn daemon threads in subinterpreters (revert change which denied them).
bpo-39207 [https://bugs.python.org/issue?@action=redirect&bpo=39207]: Workers in
ProcessPoolExecutor
are now spawned on demand, only when there are no available idle workers to reuse. This optimizes startup overhead and reduces the amount of lost CPU time to idle workers. Patch by Kyle Stanley.bpo-40091 [https://bugs.python.org/issue?@action=redirect&bpo=40091]: Fix a hang at fork in the logging module: the new private atfork_reinit() method is now used to reinitialize locks at fork in the child process.
bpo-40149 [https://bugs.python.org/issue?@action=redirect&bpo=40149]: Implement traverse and clear slots in _abc.abcdata type.
bpo-40208 [https://bugs.python.org/issue?@action=redirect&bpo=40208]: Remove deprecated
symtable.SymbolTable.has_exec()
.bpo-40196 [https://bugs.python.org/issue?@action=redirect&bpo=40196]: Fix a bug in the
symtable
module that was causing incorrectly report global variables as local. Patch by Pablo Galindo.bpo-40190 [https://bugs.python.org/issue?@action=redirect&bpo=40190]: Add support for
SCAIX_REALMEM
toposix.sysconf()
.bpo-40182 [https://bugs.python.org/issue?@action=redirect&bpo=40182]: Removed the
fieldtypes
attribute of thetyping.NamedTuple
class.bpo-36517 [https://bugs.python.org/issue?@action=redirect&bpo=36517]: Multiple inheritance with
typing.NamedTuple
now raises an error instead of silently ignoring other types.bpo-40126 [https://bugs.python.org/issue?@action=redirect&bpo=40126]: Fixed reverting multiple patches in unittest.mock. Patcher's
__exit__()
is now never called if its__enter__()
is failed. Returning true from__exit__()
silences now the exception.bpo-40094 [https://bugs.python.org/issue?@action=redirect&bpo=40094]: CGIHTTPRequestHandler of http.server now logs the CGI script exit code, rather than the CGI script exit status of os.waitpid(). For example, if the script is killed by signal 11, it now logs: "CGI script exit code -11."
bpo-40108 [https://bugs.python.org/issue?@action=redirect&bpo=40108]: Improve the error message when triying to import a module using
runpy
and incorrectly using the ".py" extension at the end of the module name. Patch by Pablo Galindo.bpo-40094 [https://bugs.python.org/issue?@action=redirect&bpo=40094]: Add
os.waitstatus_to_exitcode()
function: convert a wait status to an exit code.bpo-40089 [https://bugs.python.org/issue?@action=redirect&bpo=40089]: Fix threading._after_fork(): if fork was not called by a thread spawned by threading.Thread, threading._after_fork() now creates a MainThread instance for main_thread, instead of a _DummyThread instance.
bpo-40089 [https://bugs.python.org/issue?@action=redirect&bpo=40089]: Add a private
atfork_reinit()
method to_thread.Lock
,_thread.RLock
,threading.RLock
andthreading.Condition
classes: reinitialize the lock at fork in the child process, reset the lock to the unlocked state. Rename also the privateresetinternal_locks()
method ofthreading.Event
toatfork_reinit()
.bpo-25780 [https://bugs.python.org/issue?@action=redirect&bpo=25780]: Expose
CAN_RAW_JOIN_FILTERS
in thesocket
module.bpo-39503 [https://bugs.python.org/issue?@action=redirect&bpo=39503]:
AbstractBasicAuthHandler
ofurllib.request
now parses all WWW-Authenticate HTTP headers and accepts multiple challenges per header: use the realm of the first Basic challenge.bpo-39812 [https://bugs.python.org/issue?@action=redirect&bpo=39812]: Removed daemon threads from
concurrent.futures
by adding an internalthreading._register_atexit()
, which calls registered functions prior to joining all non-daemon threads. This allows for compatibility with subinterpreters, which don't support daemon threads.bpo-40050 [https://bugs.python.org/issue?@action=redirect&bpo=40050]: Fix
importlib.bootstrapexternal
: avoid creating a newwinreg
builtin module if it's already available insys.modules
, and remove redundant imports.bpo-40014 [https://bugs.python.org/issue?@action=redirect&bpo=40014]: Fix
os.getgrouplist()
: ifgetgrouplist()
function fails because the group list is too small, retry with a larger group list. On failure, the glibc implementation ofgetgrouplist()
setsngroups
to the total number of groups. For other implementations, double the group list size.bpo-40017 [https://bugs.python.org/issue?@action=redirect&bpo=40017]: Add
time.CLOCK_TAI
constant if the operating system support it.bpo-40016 [https://bugs.python.org/issue?@action=redirect&bpo=40016]: In re docstring, clarify the relationship between inline and argument compile flags.
bpo-39953 [https://bugs.python.org/issue?@action=redirect&bpo=39953]: Update internal table of OpenSSL error codes in the
ssl
module.bpo-36144 [https://bugs.python.org/issue?@action=redirect&bpo=36144]: Added PEP 584 [https://peps.python.org/pep-0584/] operators to
weakref.WeakValueDictionary
.bpo-36144 [https://bugs.python.org/issue?@action=redirect&bpo=36144]: Added PEP 584 [https://peps.python.org/pep-0584/] operators to
weakref.WeakKeyDictionary
.bpo-38891 [https://bugs.python.org/issue?@action=redirect&bpo=38891]: Fix linear runtime behaviour of the
__getitem__
and__setitem__
methods inmultiprocessing.shared_memory.ShareableList
. This avoids quadratic performance when iterating aShareableList
. Patch by Thomas Krennwallner.bpo-39682 [https://bugs.python.org/issue?@action=redirect&bpo=39682]: Remove undocumented support for closing a
pathlib.Path
object via its context manager. The context manager magic methods remain, but they are now a no-op, makingPath
objects immutable.bpo-36144 [https://bugs.python.org/issue?@action=redirect&bpo=36144]: Added PEP 584 [https://peps.python.org/pep-0584/] operators (
|
and|=
) tocollections.ChainMap
.bpo-39011 [https://bugs.python.org/issue?@action=redirect&bpo=39011]: Normalization of line endings in ElementTree attributes was removed, as line endings which were replaced by entity numbers should be preserved in original form.
bpo-38410 [https://bugs.python.org/issue?@action=redirect&bpo=38410]: Properly handle
sys.audit()
failures insys.set_asyncgen_hooks()
.bpo-36541 [https://bugs.python.org/issue?@action=redirect&bpo=36541]: lib2to3 now recognizes named assignment expressions (the walrus operator,
:=
)bpo-35967 [https://bugs.python.org/issue?@action=redirect&bpo=35967]: In platform, delay the invocation of 'uname -p' until the processor attribute is requested.
bpo-35113 [https://bugs.python.org/issue?@action=redirect&bpo=35113]:
inspect.getsource()
now returns correct source code for inner class with same name as module level class. Decorators are also returned as part of source of the class. Patch by Karthikeyan Singaravelan.bpo-33262 [https://bugs.python.org/issue?@action=redirect&bpo=33262]: Deprecate passing None as an argument for
shlex.split()
'ss
parameter. Patch by Zackery Spytz.bpo-31758 [https://bugs.python.org/issue?@action=redirect&bpo=31758]: Prevent crashes when using an uninitialized
_elementtree.XMLParser
object. Patch by Oren Milman.
文档
bpo-27635 [https://bugs.python.org/issue?@action=redirect&bpo=27635]: The pickle documentation incorrectly claimed that
_new_
isn't called by default when unpickling.bpo-39879 [https://bugs.python.org/issue?@action=redirect&bpo=39879]: Updated 数据模型 docs to include
dict()
insertion order preservation. Patch by Furkan Onder and Samy Lahfa.bpo-38387 [https://bugs.python.org/issue?@action=redirect&bpo=38387]: Document
PyDoc_STRVAR
macro in the C-API reference.bpo-13743 [https://bugs.python.org/issue?@action=redirect&bpo=13743]: Some methods within xml.dom.minidom.Element class are now better documented.
测试
bpo-31904 [https://bugs.python.org/issue?@action=redirect&bpo=31904]: Set expected default encoding in test_c_locale_coercion.py for VxWorks RTOS.
bpo-40162 [https://bugs.python.org/issue?@action=redirect&bpo=40162]: Update Travis CI configuration to OpenSSL 1.1.1f.
bpo-40146 [https://bugs.python.org/issue?@action=redirect&bpo=40146]: Update OpenSSL to 1.1.1f in Azure Pipelines.
bpo-40094 [https://bugs.python.org/issue?@action=redirect&bpo=40094]: Add
test.support.wait_process()
function.bpo-40003 [https://bugs.python.org/issue?@action=redirect&bpo=40003]:
test.bisect_cmd
now copies Python command line options like-O
or-W
. Moreover, emit a warning iftest.bisect_cmd
is used with-w
/--verbose2
option.bpo-39380 [https://bugs.python.org/issue?@action=redirect&bpo=39380]: Add the encoding in
ftplib.FTP
andftplib.FTP_TLS
to the constructor as keyword-only and change the default fromlatin-1
toutf-8
to follow RFC 2640 [https://datatracker.ietf.org/doc/html/rfc2640.html].bpo-39793 [https://bugs.python.org/issue?@action=redirect&bpo=39793]: Use the same domain when testing
make_msgid
. Patch by Batuhan Taskaya.bpo-1812 [https://bugs.python.org/issue?@action=redirect&bpo=1812]: Fix newline handling in doctest.testfile when loading from a package whose loader has a get_data method. Patch by Peter Donis.
构建
bpo-38360 [https://bugs.python.org/issue?@action=redirect&bpo=38360]: Support single-argument form of macOS -isysroot flag.
bpo-40158 [https://bugs.python.org/issue?@action=redirect&bpo=40158]: Fix CPython MSBuild Properties in NuGet Package (build/native/python.props)
bpo-38527 [https://bugs.python.org/issue?@action=redirect&bpo=38527]: Fix configure check on Solaris for "float word ordering": sometimes, the correct "grep" command was not being used. Patch by Arnon Yaari.
Windows
bpo-40164 [https://bugs.python.org/issue?@action=redirect&bpo=40164]: Updates Windows to OpenSSL 1.1.1f
bpo-8901 [https://bugs.python.org/issue?@action=redirect&bpo=8901]: Ignore the Windows registry when the
-E
option is used.
macOS
bpo-38329 [https://bugs.python.org/issue?@action=redirect&bpo=38329]: python.org macOS installers now update the Current version symlink of LibraryFrameworks/Python.framework/Versions for 3.9 installs. Previously, Current was only updated for Python 2.x installs. This should make it easier to embed Python 3 into other macOS applications.
bpo-40164 [https://bugs.python.org/issue?@action=redirect&bpo=40164]: Update macOS installer builds to use OpenSSL 1.1.1g.
IDLE
bpo-38439 [https://bugs.python.org/issue?@action=redirect&bpo=38439]: Add a 256×256 pixel IDLE icon to support more modern environments. Created by Andrew Clover. Delete the unused macOS idle.icns icon file.
bpo-38689 [https://bugs.python.org/issue?@action=redirect&bpo=38689]: IDLE will no longer freeze when inspect.signature fails when fetching a calltip.