库
gh-87901 [https://github.com/python/cpython/issues/87901]: Add the encoding parameter to
os.popen()
.gh-90997 [https://github.com/python/cpython/issues/90997]: Fix an issue where
dis
utilities may interpret populated inline cache entries as valid instructions.gh-92332 [https://github.com/python/cpython/issues/92332]: Deprecate
typing.Text
(removal of the class is currently not planned). Patch by Alex Waygood.gh-78157 [https://github.com/python/cpython/issues/78157]: Deprecate nested classes in enum definitions becoming members — in 3.13 they will be normal classes; add
member
andnonmember
functions to allow control over results now.gh-92356 [https://github.com/python/cpython/issues/92356]: Fixed a performance regression in ctypes function calls.
gh-90997 [https://github.com/python/cpython/issues/90997]: Show the actual named values stored in inline caches when
show_caches=True
is passed todis
utilities.gh-92301 [https://github.com/python/cpython/issues/92301]: Prefer
close_range()
to iterating over procfs for file descriptor closing insubprocess
for better performance.gh-67248 [https://github.com/python/cpython/issues/67248]: Sort the miscellaneous topics in Cmd.do_help()
gh-92210 [https://github.com/python/cpython/issues/92210]: Port
socket.__init__
to Argument Clinic. Patch by Cinder.gh-80010 [https://github.com/python/cpython/issues/80010]: Add support for generalized ISO 8601 parsing to
datetime.datetime.fromisoformat()
,datetime.date.fromisoformat()
anddatetime.time.fromisoformat()
. Patch by Paul Ganssle.gh-92118 [https://github.com/python/cpython/issues/92118]: Fix a 3.11 regression in
contextmanager()
, which caused it to propagate exceptions with incorrect tracebacks.gh-90887 [https://github.com/python/cpython/issues/90887]: Adding
COPYFILE_STAT
,COPYFILE_ACL
andCOPYFILE_XATTR
constants foros.fcopyfile()
available in macOs.gh-91215 [https://github.com/python/cpython/issues/91215]: For
@dataclass
, add weakrefslot. The new parameter defaults toFalse
. If true, and ifslots=True
, add a slot named"\
_weakref__"
, which will allow instances to be weakref'd. Contributed by Eric V. Smithgh-85984 [https://github.com/python/cpython/issues/85984]: New function os.login_tty() for Unix.
gh-92128 [https://github.com/python/cpython/issues/92128]: Add
__class_getitem__()
tologging.LoggerAdapter
andlogging.StreamHandler
, allowing them to be parameterized at runtime. Patch by Alex Waygood.gh-92049 [https://github.com/python/cpython/issues/92049]: Forbid pickling constants
re._constants.SUCCESS
etc. Previously, pickling did not fail, but the result could not be unpickled.gh-92062 [https://github.com/python/cpython/issues/92062]:
inspect.Parameter
now raisesValueError
ifname
is a keyword, in addition to the existing check that it is an identifier.gh-87390 [https://github.com/python/cpython/issues/87390]: Add an
__unpacked__
attribute totypes.GenericAlias
. Patch by Jelle Zijlstra.gh-88089 [https://github.com/python/cpython/issues/88089]: Add support for generic
typing.NamedTuple
.gh-91996 [https://github.com/python/cpython/issues/91996]: New http.HTTPMethod enum to represent all the available HTTP request methods in a convenient way
gh-91984 [https://github.com/python/cpython/issues/91984]: Modified test strings in test_argparse.py to not contain trailing spaces before end of line.
gh-91952 [https://github.com/python/cpython/issues/91952]: Add
encoding="locale"
support toTextIOWrapper.reconfigure()
.gh-91954 [https://github.com/python/cpython/issues/91954]: Add encoding and errors arguments to
subprocess.getoutput()
andsubprocess.getstatusoutput()
.bpo-47029 [https://bugs.python.org/issue?@action=redirect&bpo=47029]: Always close the read end of the pipe used by
multiprocessing.Queue
after the last write of buffered data to the write end of the pipe to avoidBrokenPipeError
at garbage collection and atmultiprocessing.Queue.close()
calls. Patch by Géry Ogam.gh-91928 [https://github.com/python/cpython/issues/91928]: Add
datetime.UTC
alias fordatetime.timezone.utc
.
Patch by Kabir Kwatra.
gh-68966 [https://github.com/python/cpython/issues/68966]: The
mailcap
module is now deprecated and will be removed in Python 3.13. See PEP 594 [https://peps.python.org/pep-0594/] for the rationale and themimetypes
module for an alternative. Patch by Victor Stinner.gh-91401 [https://github.com/python/cpython/issues/91401]: Provide a way to disable
subprocess
use ofvfork()
just in case it is ever needed and document the existing mechanism forposix_spawn()
.gh-64783 [https://github.com/python/cpython/issues/64783]: Fix
signal.NSIG
value on FreeBSD to accept signal numbers greater than 32, likesignal.SIGRTMIN
andsignal.SIGRTMAX
. Patch by Victor Stinner.gh-91910 [https://github.com/python/cpython/issues/91910]: Add missing f prefix to fstrings in error messages from the
multiprocessing
andasyncio
modules.gh-91860 [https://github.com/python/cpython/issues/91860]: Add
typing.dataclass_transform()
, implementing PEP 681 [https://peps.python.org/pep-0681/]. Patch by Jelle Zijlstra.gh-91832 [https://github.com/python/cpython/issues/91832]: Add
required
attribute toargparse.Action
repr output.gh-91827 [https://github.com/python/cpython/issues/91827]: In the
tkinter
module add methodinfo_patchlevel()
which returns the exact version of the Tcl library as a named tuple similar tosys.version_info
.gh-84461 [https://github.com/python/cpython/issues/84461]: Add
--enable-wasm-pthreads
to enable pthreads support for WASM builds.Emscripten/node
no longer has threading enabled by default. Include additional file systems.gh-91821 [https://github.com/python/cpython/issues/91821]: Fix unstable
test_from_tuple
test intest_decimal.py
.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the xdrlib module.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the uu module.
gh-91760 [https://github.com/python/cpython/issues/91760]: More strict rules will be applied for numerical group references and group names in regular expressions. For now, a deprecation warning is emitted for group references and group names which will be errors in future Python versions.
gh-84461 [https://github.com/python/cpython/issues/84461]: Add provisional
sys._emscripten_info
named tuple with build-time and runtime information about Emscripten platform.gh-90623 [https://github.com/python/cpython/issues/90623]:
signal.raise_signal()
andos.kill()
now check immediately for pending signals. Patch by Victor Stinner.gh-91734 [https://github.com/python/cpython/issues/91734]: Fix OSS audio support on Solaris.
gh-90633 [https://github.com/python/cpython/issues/90633]: Include the passed value in the exception thrown by
typing.assert_never()
. Patch by Jelle Zijlstra.gh-91700 [https://github.com/python/cpython/issues/91700]: Compilation of regular expression containing a conditional expression
(?(group)…)
now raises an appropriatere.error
if the group number refers to not defined group. Previously an internal RuntimeError was raised.gh-91231 [https://github.com/python/cpython/issues/91231]: Add an optional keyword shutdown_timeout parameter to the
multiprocessing.BaseManager
constructor. Kill the process if terminate() takes longer than the timeout. Patch by Victor Stinner.gh-91621 [https://github.com/python/cpython/issues/91621]: Fix
typing.get_type_hints()
forcollections.abc.Callable
. Patch by Shantanu Jain.gh-90568 [https://github.com/python/cpython/issues/90568]: Parsing
\N
escapes of Unicode Named Character Sequences in aregular expression
raises nowre.error
instead ofTypeError
.gh-91670 [https://github.com/python/cpython/issues/91670]: Remove deprecated
SO
config variable insysconfig
.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the telnetlib module.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the sunau module.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the spwd module.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the sndhdr module, as well as inline needed functionality for
email.mime.MIMEAudio
.gh-91616 [https://github.com/python/cpython/issues/91616]:
re
module, fixfullmatch()
mismatch when using Atomic Grouping or Possessive Quantifiers.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the 'pipes' module.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the ossaudiodev module.
bpo-47256 [https://bugs.python.org/issue?@action=redirect&bpo=47256]:
re
module, limit the maximum capturing group to 1,073,741,823 in 64-bit build, this increases the depth of backtracking.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the nis module.
gh-91595 [https://github.com/python/cpython/issues/91595]: Fix the comparison of character and integer inside
Tools.gdb.libpython.write_repr()
. Patch by Yu Liu.gh-74166 [https://github.com/python/cpython/issues/74166]: Add option to raise all errors from
create_connection()
in anExceptionGroup
when it fails to create a connection. The default remains to raise only the last error that had occurred when multiple addresses were tried.gh-91487 [https://github.com/python/cpython/issues/91487]: Optimize asyncio UDP speed, over 100 times faster when transferring a large file.
gh-91575 [https://github.com/python/cpython/issues/91575]: Update case-insensitive matching in the
re
module to the latest Unicode version.gh-90622 [https://github.com/python/cpython/issues/90622]: In
concurrent.futures.process.ProcessPoolExecutor
disallow the "fork" multiprocessing start method when the newmax_tasks_per_child
feature is used as the mix of threads+fork can hang the child processes. Default to using the safe "spawn" start method in that circumstance if nomp_context
was supplied.gh-89022 [https://github.com/python/cpython/issues/89022]: In
sqlite3
,SQLITE_MISUSE
result codes are now mapped toInterfaceError
instead ofProgrammingError
. Also, more accurate exceptions are raised when binding parameters fail. Patch by Erlend E. Aasland.gh-91526 [https://github.com/python/cpython/issues/91526]: Stop calling
os.device_encoding(file.fileno())
inTextIOWrapper
. It was complex, never documented, and didn't work for most cases. (Patch by Inada Naoki.)gh-88116 [https://github.com/python/cpython/issues/88116]: Change the frame-related functions in the
inspect
module to return a regular object (that is backwards compatible with the old tuple-like interface) that include the extended PEP 657 [https://peps.python.org/pep-0657/] position information (end line number, column and end column). The affected functions are:inspect.getframeinfo()
,inspect.getouterframes()
,inspect.getinnerframes()
,inspect.stack()
andinspect.trace()
. Patch by Pablo Galindo.gh-69093 [https://github.com/python/cpython/issues/69093]: Add indexing and slicing support to
sqlite3.Blob
. Patch by Aviv Palivoda and Erlend E. Aasland.gh-69093 [https://github.com/python/cpython/issues/69093]: Add context manager support to
sqlite3.Blob
. Patch by Aviv Palivoda and Erlend E. Aasland.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate nntplib.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate msilib.
gh-91404 [https://github.com/python/cpython/issues/91404]: Improve the performance of
re
matching by using computed gotos (or "threaded code") on supported platforms and removing expensive pointer indirections.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the imghdr module.
gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the crypt module.
gh-91276 [https://github.com/python/cpython/issues/91276]: Make space for longer opcodes in
dis
output.bpo-47000 [https://bugs.python.org/issue?@action=redirect&bpo=47000]: Make
TextIOWrapper
uses locale encoding whenencoding="locale"
is specified even in UTF-8 mode.gh-91230 [https://github.com/python/cpython/issues/91230]:
warnings.catch_warnings()
now accepts arguments forwarnings.simplefilter()
, providing a more concise way to locally ignore warnings or convert them to errors.gh-91217 [https://github.com/python/cpython/issues/91217]: Deprecate the chunk module.
gh-91498 [https://github.com/python/cpython/issues/91498]: Add the
TCP_CONNECTION_INFO
option (available on macOS) tosocket
.bpo-47260 [https://bugs.python.org/issue?@action=redirect&bpo=47260]: Fix
os.closerange()
potentially being a no-op in a Linux seccomp sandbox.bpo-47087 [https://bugs.python.org/issue?@action=redirect&bpo=47087]: Implement
typing.Required
andtyping.NotRequired
( PEP 655 [https://peps.python.org/pep-0655/]). Patch by David Foster and Jelle Zijlstra.bpo-47061 [https://bugs.python.org/issue?@action=redirect&bpo=47061]: Deprecate cgi and cgitb.
bpo-47061 [https://bugs.python.org/issue?@action=redirect&bpo=47061]: Deprecate audioop.
bpo-47000 [https://bugs.python.org/issue?@action=redirect&bpo=47000]: Add
locale.getencoding()
to get the current locale encoding. It is similar tolocale.getpreferredencoding(False)
but ignores the Python UTF-8 Mode.bpo-42012 [https://bugs.python.org/issue?@action=redirect&bpo=42012]: Add
wsgiref.types
, containing WSGI-specific types for static type checking.bpo-47227 [https://bugs.python.org/issue?@action=redirect&bpo=47227]: Suppress expression chaining for more
re
parsing errors.bpo-47211 [https://bugs.python.org/issue?@action=redirect&bpo=47211]: Remove undocumented and never working function
re.template()
and flagre.TEMPLATE
. This was later reverted in 3.11.0b2 and deprecated instead.bpo-47135 [https://bugs.python.org/issue?@action=redirect&bpo=47135]:
decimal.localcontext()
now accepts context attributes via keyword argumentsbpo-43323 [https://bugs.python.org/issue?@action=redirect&bpo=43323]: Fix errors in the
email
module if the charset itself contains undecodable/unencodable characters.bpo-46841 [https://bugs.python.org/issue?@action=redirect&bpo=46841]: Disassembly of quickened code.
bpo-46681 [https://bugs.python.org/issue?@action=redirect&bpo=46681]: Forward gzip.compress() compresslevel to zlib.
bpo-45100 [https://bugs.python.org/issue?@action=redirect&bpo=45100]: Add
typing.get_overloads()
andtyping.clear_overloads()
. Patch by Jelle Zijlstra.bpo-44807 [https://bugs.python.org/issue?@action=redirect&bpo=44807]:
typing.Protocol
no longer silently replaces__init__()
methods defined on subclasses. Patch by Adrian Garcia Badaracco.bpo-46787 [https://bugs.python.org/issue?@action=redirect&bpo=46787]: Fix
concurrent.futures.ProcessPoolExecutor
exception memory leakbpo-46720 [https://bugs.python.org/issue?@action=redirect&bpo=46720]: Add support for pathlike objects to
multiprocessing.set_executable()
for Windows to be on a par with Unix-like systems. Patch by Géry Ogam.bpo-46696 [https://bugs.python.org/issue?@action=redirect&bpo=46696]: Add
SO_INCOMING_CPU
constant tosocket
.bpo-46053 [https://bugs.python.org/issue?@action=redirect&bpo=46053]: Fix OSS audio support on NetBSD.
bpo-45639 [https://bugs.python.org/issue?@action=redirect&bpo=45639]:
image/avif
andimage/webp
were added tomimetypes
.bpo-46285 [https://bugs.python.org/issue?@action=redirect&bpo=46285]: Add commandline option
-p
/--protocol
to modulehttp.server
which specifies the HTTP version to which the server is conformant (HTTP/1.1 conformant servers can now be run from the commandline interface of modulehttp.server
). Patch by Géry Ogam.bpo-44791 [https://bugs.python.org/issue?@action=redirect&bpo=44791]: Accept ellipsis as the last argument of
typing.Concatenate
.bpo-46547 [https://bugs.python.org/issue?@action=redirect&bpo=46547]: Remove variables leaking into
pydoc.Helper
class namespace.bpo-46415 [https://bugs.python.org/issue?@action=redirect&bpo=46415]: Fix ipaddress.ip_{address,interface,network} raising TypeError instead of ValueError if given invalid tuple as address parameter.
bpo-46075 [https://bugs.python.org/issue?@action=redirect&bpo=46075]:
CookieJar
withDefaultCookiePolicy
now can process cookies from localhost with domain=localhost explicitly specified in Set-Cookie header.bpo-45995 [https://bugs.python.org/issue?@action=redirect&bpo=45995]: Add a "z" option to the string formatting specification that coerces negative zero floating-point values to positive zero after rounding to the format precision. Contributed by John Belmonte.
bpo-26175 [https://bugs.python.org/issue?@action=redirect&bpo=26175]: Fully implement the
io.BufferedIOBase
orio.TextIOBase
interface fortempfile.SpooledTemporaryFile
objects. This lets them work correctly with higher-level layers (like compression modules). Patch by Carey Metcalfe.bpo-45138 [https://bugs.python.org/issue?@action=redirect&bpo=45138]: Fix a regression in the
sqlite3
trace callback where bound parameters were not expanded in the passed statement string. The regression was introduced in Python 3.10 by bpo-40318 [https://bugs.python.org/issue?@action=redirect&bpo=40318]. Patch by Erlend E. Aasland.bpo-44863 [https://bugs.python.org/issue?@action=redirect&bpo=44863]: Allow
TypedDict
subclasses to also includeGeneric
as a base class in class based syntax. Thereby allowing the user to define a genericTypedDict
, just like a user-defined generic but withTypedDict
semantics.bpo-44587 [https://bugs.python.org/issue?@action=redirect&bpo=44587]: Fix BooleanOptionalAction to not automatically add a default string. If a default string is desired, use a formatter to add it.
bpo-43827 [https://bugs.python.org/issue?@action=redirect&bpo=43827]: All positional-or-keyword parameters to
ABCMeta._new_
are now positional-only to avoid conflicts with keyword arguments to be passed to__init_subclass__()
.bpo-43218 [https://bugs.python.org/issue?@action=redirect&bpo=43218]: Prevent creation of a venv whose path contains the PATH separator. This could affect the usage of the activate script. Patch by Dustin Rodrigues.
bpo-38435 [https://bugs.python.org/issue?@action=redirect&bpo=38435]: Add a
process_group
parameter tosubprocess.Popen
to help move more things off of the unsafepreexec_fn
parameter.bpo-42066 [https://bugs.python.org/issue?@action=redirect&bpo=42066]: Fix cookies getting sorted in
CookieJar.__iter__()
which is an extra behavior and not mentioned in RFC 2965 or Netscape cookie protocol. Now the cookies inCookieJar
follows the order of theSet-Cookie
header. Patch by Iman Kermani.bpo-40617 [https://bugs.python.org/issue?@action=redirect&bpo=40617]: Add
create_window_function()
tosqlite3.Connection
for creating aggregate window functions. Patch by Erlend E. Aasland.bpo-40676 [https://bugs.python.org/issue?@action=redirect&bpo=40676]: Convert
csv
to use Argument Clinic forcsv.field_size_limit()
,csv.get_dialect()
,csv.unregister_dialect()
andcsv.list_dialects()
.bpo-39716 [https://bugs.python.org/issue?@action=redirect&bpo=39716]: Raise an
ArgumentError
when the same subparser name is added twice to anargparse.ArgumentParser
. This is consistent with the (default) behavior when the same option string is added twice to anArgumentParser
.bpo-36073 [https://bugs.python.org/issue?@action=redirect&bpo=36073]: Raise
ProgrammingError
instead of segfaulting on recursive usage of cursors insqlite3
converters. Patch by Sergey Fedoseev.bpo-34975 [https://bugs.python.org/issue?@action=redirect&bpo=34975]: Adds a
start_tls()
method toStreamWriter
, which upgrades the connection with TLS using the givenSSLContext
.bpo-22276 [https://bugs.python.org/issue?@action=redirect&bpo=22276]:
Path
methodsglob()
andrglob()
return only directories if pattern ends with a pathname components separator (/
orsep
). Patch by Eisuke Kawashima.bpo-24905 [https://bugs.python.org/issue?@action=redirect&bpo=24905]: Add
blobopen()
tosqlite3.Connection
.sqlite3.Blob
allows incremental I/O operations on blobs. Patch by Aviv Palivoda and Erlend E. Aasland.
文档
gh-91888 [https://github.com/python/cpython/issues/91888]: Add a new
gh
role to the documentation to link to GitHub issues.gh-91783 [https://github.com/python/cpython/issues/91783]: Document security issues concerning the use of the function
shutil.unpack_archive()
gh-91547 [https://github.com/python/cpython/issues/91547]: Remove "Undocumented modules" page.
gh-91298 [https://github.com/python/cpython/issues/91298]: In
importlib.resources.abc
, refined the documentation of the Traversable Protocol, applying changes from importlib_resources 5.7.1.bpo-44347 [https://bugs.python.org/issue?@action=redirect&bpo=44347]: Clarify the meaning of dirs_exist_ok, a kwarg of
shutil.copytree()
.bpo-36329 [https://bugs.python.org/issue?@action=redirect&bpo=36329]: Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview'
bpo-47189 [https://bugs.python.org/issue?@action=redirect&bpo=47189]: Add a What's New in Python 3.11 entry for the Faster CPython project. Documentation by Ken Jin and Kumar Aditya.
bpo-38668 [https://bugs.python.org/issue?@action=redirect&bpo=38668]: Update the introduction to documentation for
os.path
to remove warnings that became irrelevant after the implementations of PEP 383 [https://peps.python.org/pep-0383/] and PEP 529 [https://peps.python.org/pep-0529/].bpo-47115 [https://bugs.python.org/issue?@action=redirect&bpo=47115]: The documentation now lists which members of C structs are part of the Limited API/Stable ABI.
bpo-46962 [https://bugs.python.org/issue?@action=redirect&bpo=46962]: All docstrings in code snippets are now wrapped into
PyDoc_STR
to follow the guideline of PEP 7's Documentation Strings paragraph [https://peps.python.org/pep-0007/#documentation-strings]. Patch by Oleg Iarygin.bpo-26792 [https://bugs.python.org/issue?@action=redirect&bpo=26792]: Improve the docstrings of
runpy.run_module()
andrunpy.run_path()
. Original patch by Andrew Brezovsky.
测试
gh-92169 [https://github.com/python/cpython/issues/92169]: Use
warnings_helper.import_deprecated()
to import deprecated modules uniformly in tests. Patch by Hugo van Kemenade.gh-84461 [https://github.com/python/cpython/issues/84461]: When multiprocessing is enabled, libregrtest can now use a Python executable other than
sys.executable
via the--python
flag.gh-91904 [https://github.com/python/cpython/issues/91904]: Fix initialization of
PYTHONREGRTEST_UNICODE_GUARD
which prevented running regression tests on non-UTF-8 locale.gh-91752 [https://github.com/python/cpython/issues/91752]: Added @requires_zlib to test.test_tools.test_freeze.TestFreeze.
gh-91607 [https://github.com/python/cpython/issues/91607]: Fix
test_concurrent_futures
to test the correct multiprocessing start method context in several cases where the test logic mixed this up.bpo-40280 [https://bugs.python.org/issue?@action=redirect&bpo=40280]: Threading tests are now skipped on WASM targets without pthread support.
bpo-47109 [https://bugs.python.org/issue?@action=redirect&bpo=47109]: Test for
ctypes.macholib.dyld
,ctypes.macholib.dylib
, andctypes.macholib.framework
are brought from manual pre-unittest
times toctypes.test
location and structure. Patch by Oleg Iarygin.bpo-29890 [https://bugs.python.org/issue?@action=redirect&bpo=29890]: Add tests for
ipaddress.IPv4Interface
andipaddress.IPv6Interface
construction with tuple arguments. Original patch and tests by louisom.
构建
gh-89452 [https://github.com/python/cpython/issues/89452]: gdbm-compat is now preferred over ndbm if both are available on the system. This allows avoiding the problematic ndbm.h on macOS.
gh-91731 [https://github.com/python/cpython/issues/91731]: Python is now built with
-std=c11
compiler option, rather than-std=c99
. Patch by Victor Stinner.bpo-47152 [https://bugs.python.org/issue?@action=redirect&bpo=47152]: Add script and make target for generating
sre_constants.h
.bpo-47103 [https://bugs.python.org/issue?@action=redirect&bpo=47103]: Windows
PGInstrument
builds now copy a required DLL into the output directory, making it easier to run the profile stage of a PGO build.
Windows
bpo-46907 [https://bugs.python.org/issue?@action=redirect&bpo=46907]: Update Windows installer to use SQLite 3.38.3.
bpo-47239 [https://bugs.python.org/issue?@action=redirect&bpo=47239]: Fixed —list and —list-paths output for 适用于Windows的Python启动器 when used in an active virtual environment.
bpo-46907 [https://bugs.python.org/issue?@action=redirect&bpo=46907]: Update Windows installer to use SQLite 3.38.2.
bpo-46785 [https://bugs.python.org/issue?@action=redirect&bpo=46785]: Fix race condition between
os.stat()
and unlinking a file on Windows, by using errors codes returned byFindFirstFileW()
when appropriate inwin32_xstat_impl
.bpo-40859 [https://bugs.python.org/issue?@action=redirect&bpo=40859]: Update Windows build to use xz-5.2.5
macOS
- bpo-46907 [https://bugs.python.org/issue?@action=redirect&bpo=46907]: Update macOS installer to SQLite 3.38.4.
工具/示例
gh-91583 [https://github.com/python/cpython/issues/91583]: Fix regression in the code generated by Argument Clinic for functions with the
defining_class
parameter.gh-91575 [https://github.com/python/cpython/issues/91575]: Add script
Tools/scripts/generate_re_casefix.py
and the make targetregen-re
for generating additional data for case-insensitive matching according to the current Unicode version.gh-91551 [https://github.com/python/cpython/issues/91551]: Remove the ancient Pynche color editor. It has moved to https://gitlab.com/warsaw/pynche
C API
gh-88279 [https://github.com/python/cpython/issues/88279]: Deprecate the C functions:
PySys_SetArgv()
,PySys_SetArgvEx()
,PySys_SetPath()
. Patch by Victor Stinner.gh-92154 [https://github.com/python/cpython/issues/92154]: Added the
PyCode_GetCode()
function. This function does the equivalent of the Python codegetattr(code_object, 'co_code')
.gh-92173 [https://github.com/python/cpython/issues/92173]: Fix the
closure
argument toPyEval_EvalCodeEx()
.gh-91320 [https://github.com/python/cpython/issues/91320]: Fix C++ compiler warnings about "old-style cast" (
g++ -Wold-style-cast
) in the Python C API. Use C++reinterpret_cast<>
andstatic_cast<>
casts when the Python C API is used in C++. Patch by Victor Stinner.gh-80527 [https://github.com/python/cpython/issues/80527]: Mark functions as deprecated by PEP 623 [https://peps.python.org/pep-0623/]:
PyUnicode_AS_DATA()
,PyUnicode_AS_UNICODE()
,PyUnicode_GET_DATA_SIZE()
,PyUnicode_GET_SIZE()
. Patch by Victor Stinner.gh-91768 [https://github.com/python/cpython/issues/91768]:
Py_REFCNT()
,Py_TYPE()
,Py_SIZE()
andPy_IS_TYPE()
functions argument type is nowPyObject*
, rather thanconst PyObject*
. Patch by Victor Stinner.gh-91020 [https://github.com/python/cpython/issues/91020]: Add
PyBytes_Type.tp_alloc
to initializePyBytesObject.ob_shash
for bytes subclasses.bpo-40421 [https://bugs.python.org/issue?@action=redirect&bpo=40421]: Add
PyFrame_GetLasti
C-API function to access frame object'sf_lasti
attribute safely from C code.bpo-35134 [https://bugs.python.org/issue?@action=redirect&bpo=35134]: Remove the
Include/code.h
header file. C extensions should only include the main
header file. Patch by Victor Stinner.bpo-47169 [https://bugs.python.org/issue?@action=redirect&bpo=47169]:
PyOS_CheckStack()
is now exported in the Stable ABI on Windows.bpo-47169 [https://bugs.python.org/issue?@action=redirect&bpo=47169]:
PyThreadgetthread_native_id()
is excluded from the stable ABI on platforms where it doesn't exist (like Solaris).bpo-46343 [https://bugs.python.org/issue?@action=redirect&bpo=46343]: Added
PyErr_GetHandledException()
andPyErr_SetHandledException()
as simpler alternatives toPyErr_GetExcInfo()
andPyErr_SetExcInfo()
.
They are included in the stable ABI.
Python 3.11.0 alpha 7
Release date: 2022-04-05
核心与内置函数
bpo-47212 [https://bugs.python.org/issue?@action=redirect&bpo=47212]: Raise
IndentationError
instead ofSyntaxError
for a bareexcept
with no following indent. ImproveSyntaxError
locations for an unparenthesized generator used as arguments. Patch by Matthieu Dartiailh.bpo-47186 [https://bugs.python.org/issue?@action=redirect&bpo=47186]: Replace
JUMP_IF_NOT_EG_MATCH
byCHECK_EG_MATCH
+ jump.bpo-47176 [https://bugs.python.org/issue?@action=redirect&bpo=47176]: Emscripten builds cannot handle signals in the usual way due to platform limitations. Python can now handle signals. To use, set Module.Py_EmscriptenSignalBuffer to be a single byte SharedArrayBuffer and set Py_EMSCRIPTEN_SIGNAL_HANDLING to 1. Writing a number into the SharedArrayBuffer will cause the corresponding signal to be raised into the Python thread.
bpo-47186 [https://bugs.python.org/issue?@action=redirect&bpo=47186]: Replace
JUMP_IF_NOT_EXC_MATCH
byCHECK_EXC_MATCH
+ jump.bpo-47120 [https://bugs.python.org/issue?@action=redirect&bpo=47120]: Replace the absolute jump opcode
JUMP_NO_INTERRUPT
by the relativeJUMP_BACKWARD_NO_INTERRUPT
.bpo-46841 [https://bugs.python.org/issue?@action=redirect&bpo=46841]: Avoid unnecessary allocations when comparing code objects.
bpo-47182 [https://bugs.python.org/issue?@action=redirect&bpo=47182]: Fix a crash when using a named unicode character like
"\N{digit nine}"
after the main interpreter has been initialized a second time.bpo-47162 [https://bugs.python.org/issue?@action=redirect&bpo=47162]: WebAssembly cannot deal with bad function pointer casts (different count or types of arguments). Python can now use call trampolines to mitigate the problem. Define
PY_CALL_TRAMPOLINE
to enable call trampolines.bpo-46775 [https://bugs.python.org/issue?@action=redirect&bpo=46775]: Some Windows system error codes(>= 10000) are now mapped into the correct errno and may now raise a subclass of
OSError
. Patch by Donghee Na.bpo-47129 [https://bugs.python.org/issue?@action=redirect&bpo=47129]: Improve error messages in fstring syntax errors concerning empty expressions.
bpo-47117 [https://bugs.python.org/issue?@action=redirect&bpo=47117]: Fix a crash if we fail to decode characters in interactive mode if the tokenizer buffers are uninitialized. Patch by Pablo Galindo.
bpo-47127 [https://bugs.python.org/issue?@action=redirect&bpo=47127]: Speed up calls to c functions with keyword arguments by 25% with specialization. Patch by Kumar Aditya.
bpo-47120 [https://bugs.python.org/issue?@action=redirect&bpo=47120]: Replaced
JUMP_ABSOLUTE
by the relative jumpJUMP_BACKWARD
.bpo-42197 [https://bugs.python.org/issue?@action=redirect&bpo=42197]:
PyFrame_FastToLocalsWithError()
andPyFrame_LocalsToFast()
are no longer called during profiling nor tracing. C code can access thef_locals
attribute ofPyFrameObject
by callingPyFrame_GetLocals()
.bpo-47070 [https://bugs.python.org/issue?@action=redirect&bpo=47070]: Improve performance of
array_inplace_repeat
by reducing the number of invocations ofmemcpy
. Refactor therepeat
and inplacerepeat
methods ofarray
,bytes
,bytearray
andunicodeobject
to use the commonPyBytesRepeat
.bpo-47053 [https://bugs.python.org/issue?@action=redirect&bpo=47053]: Reduce deoptimization in the specialized
BINARY_OP_INPLACE_ADD_UNICODE
opcode.bpo-47045 [https://bugs.python.org/issue?@action=redirect&bpo=47045]: Remove the
f_state
field from the _PyInterpreterFrame struct. Add theowner
field to the _PyInterpreterFrame struct to make ownership explicit to simplify clearing and deallocing frames and generators.bpo-46968 [https://bugs.python.org/issue?@action=redirect&bpo=46968]: Check for the existence of the "sys/auxv.h" header in
faulthandler
to avoid compilation problems in systems where this header doesn't exist. Patch by Pablo Galindobpo-46329 [https://bugs.python.org/issue?@action=redirect&bpo=46329]: Use low bit of
LOAD_GLOBAL
to indicate whether to push aNULL
before the global. Helps streamline the call sequence a bit.bpo-46841 [https://bugs.python.org/issue?@action=redirect&bpo=46841]: Quicken bytecode inplace by storing it as part of the corresponding
PyCodeObject
.bpo-47012 [https://bugs.python.org/issue?@action=redirect&bpo=47012]: Speed up iteration of
bytes
andbytearray
by 30%. Patch by Kumar Aditya.bpo-47009 [https://bugs.python.org/issue?@action=redirect&bpo=47009]: Improved the performance of
list.append()
and list comprehensions by optimizing for the common case, where no resize is needed. Patch by Dennis Sweeney.bpo-47005 [https://bugs.python.org/issue?@action=redirect&bpo=47005]: Improve performance of
bytearray_repeat
andbytearray_irepeat
by reducing the number of invocations ofmemcpy
.bpo-46829 [https://bugs.python.org/issue?@action=redirect&bpo=46829]: Deprecate passing a message into
asyncio.Future.cancel()
andasyncio.Task.cancel()
bpo-46993 [https://bugs.python.org/issue?@action=redirect&bpo=46993]: Speed up
bytearray
creation fromlist
andtuple
by 40%. Patch by Kumar Aditya.bpo-39829 [https://bugs.python.org/issue?@action=redirect&bpo=39829]: Removed the
__len__()
call when initializing a list and moved initializing tolist_extend
. Patch by Jeremiah Pascual.bpo-46944 [https://bugs.python.org/issue?@action=redirect&bpo=46944]: Speed up throwing exception in generator with
METH_FASTCALL
calling convention. Patch by Kumar Aditya.bpo-46841 [https://bugs.python.org/issue?@action=redirect&bpo=46841]: Modify
STORE_SUBSCR
to use an inline cache entry (rather than its oparg) as an adaptive counter.bpo-46841 [https://bugs.python.org/issue?@action=redirect&bpo=46841]: Use inline caching for
PRECALL
andCALL
, and remove the internal machinery for managing the (now unused) non-inline caches.bpo-46881 [https://bugs.python.org/issue?@action=redirect&bpo=46881]: Statically allocate and initialize the latin1 characters.
bpo-46838 [https://bugs.python.org/issue?@action=redirect&bpo=46838]: Improve syntax errors for incorrect function definitions. Patch by Pablo Galindo
bpo-43721 [https://bugs.python.org/issue?@action=redirect&bpo=43721]: Fix docstrings of
getter
,setter
, anddeleter
to clarify that they create a new copy of the property.bpo-43224 [https://bugs.python.org/issue?@action=redirect&bpo=43224]: Make grammar changes required for PEP 646.
库
bpo-47208 [https://bugs.python.org/issue?@action=redirect&bpo=47208]: Allow vendors to override
CTYPES_MAX_ARGCOUNT
.bpo-23689 [https://bugs.python.org/issue?@action=redirect&bpo=23689]:
re
module: fix memory leak when a match is terminated by a signal or memory allocation failure. Patch by Ma Lin.bpo-47167 [https://bugs.python.org/issue?@action=redirect&bpo=47167]: Allow overriding a future compliance check in
asyncio.Task
.bpo-47151 [https://bugs.python.org/issue?@action=redirect&bpo=47151]: When subprocess tries to use vfork, it now falls back to fork if vfork returns an error. This allows use in situations where vfork isn't allowed by the OS kernel.
bpo-47152 [https://bugs.python.org/issue?@action=redirect&bpo=47152]: Convert the
re
module into a package. Deprecate modulessre_compile
,sre_constants
andsre_parse
.bpo-4833 [https://bugs.python.org/issue?@action=redirect&bpo=4833]: Add
ZipFile.mkdir()
bpo-27929 [https://bugs.python.org/issue?@action=redirect&bpo=27929]: Fix
asyncio.loop.sock_connect()
to only resolve names forsocket.AF_INET
orsocket.AF_INET6
families. Resolution may not make sense for other families, likesocket.AF_BLUETOOTH
andsocket.AF_UNIX
.bpo-14265 [https://bugs.python.org/issue?@action=redirect&bpo=14265]: Adds the fully qualified test name to unittest output
bpo-47061 [https://bugs.python.org/issue?@action=redirect&bpo=47061]: Deprecate the aifc module.
bpo-39622 [https://bugs.python.org/issue?@action=redirect&bpo=39622]: Handle Ctrl+C in asyncio programs to interrupt the main task.
bpo-47101 [https://bugs.python.org/issue?@action=redirect&bpo=47101]:
hashlib.algorithms_available
now lists only algorithms that are provided by activated crypto providers on OpenSSL 3.0. Legacy algorithms are not listed unless the legacy provider has been loaded into the default OSSL context.bpo-47099 [https://bugs.python.org/issue?@action=redirect&bpo=47099]: All
URLError
exception messages raised inurllib.request.URLopener
now contain a colon betweenftp error
and the rest of the message. Previously,open_ftp()
missed the colon. Patch by Oleg Iarygin.bpo-47099 [https://bugs.python.org/issue?@action=redirect&bpo=47099]: Exception chaining is changed from
Exception.with_traceback()
/sys.exc_info()
to PEP 3134 [https://peps.python.org/pep-3134/]. Patch by Oleg Iarygin.bpo-47095 [https://bugs.python.org/issue?@action=redirect&bpo=47095]:
hashlib
's internal_blake2
module now preferslibb2
from https://www.blake2.net/ over Python's vendored copy of blake2.bpo-47098 [https://bugs.python.org/issue?@action=redirect&bpo=47098]: The Keccak Code Package for
hashlib
's internal_sha3
module has been replaced with tiny_sha3. The module is used as fallback when Python is built without OpenSSL.bpo-47088 [https://bugs.python.org/issue?@action=redirect&bpo=47088]: Implement
typing.LiteralString
, part of PEP 675 [https://peps.python.org/pep-0675/]. Patch by Jelle Zijlstra.bpo-42885 [https://bugs.python.org/issue?@action=redirect&bpo=42885]: Optimize
re.search()
,re.split()
,re.findall()
,re.finditer()
andre.sub()
for regular expressions starting with\A
or^
.bpo-23691 [https://bugs.python.org/issue?@action=redirect&bpo=23691]: Protect the
re.finditer()
iterator from reentering.bpo-47067 [https://bugs.python.org/issue?@action=redirect&bpo=47067]: Optimize calling
GenericAlias
objects by using PEP 590 [https://peps.python.org/pep-0590/]vectorcall
and by replacingPyObject_SetAttrString
withPyObject_SetAttr
.bpo-28080 [https://bugs.python.org/issue?@action=redirect&bpo=28080]: Add the metadata_encoding parameter in the
zipfile.ZipFile
constructor and the--metadata-encoding
option in thezipfile
CLI to allow reading zipfiles using non-standard codecs to encode the filenames within the archive.bpo-47000 [https://bugs.python.org/issue?@action=redirect&bpo=47000]: Make
io.text_encoding()
returns "utf-8" when UTF-8 mode is enabled.bpo-42369 [https://bugs.python.org/issue?@action=redirect&bpo=42369]: Fix thread safety of
zipfile._SharedFile.tell()
to avoid a "zipfile.BadZipFile: Bad CRC-32 for file" exception when reading aZipFile
from multiple threads.bpo-38256 [https://bugs.python.org/issue?@action=redirect&bpo=38256]: Fix
binascii.crc32()
when it is compiled to use zlib'c crc32 to work properly on inputs 4+GiB in length instead of returning the wrong result. The workaround prior to this was to always feed the function data in increments smaller than 4GiB or to just call the zlib module function.
We also have binascii.crc32()
release the GIL when computing on larger inputs as zlib.crc32()
and hashlib
do.
This also boosts performance on Windows as it now uses the zlib crc32 implementation for binascii.crc32()
for a 2-3x speedup.
That the stdlib has a crc32 API in two modules is a known historical oddity. This moves us closer to a single implementation behind them.
bpo-47066 [https://bugs.python.org/issue?@action=redirect&bpo=47066]: Global inline flags (e.g.
(?i)
) can now only be used at the start of the regular expressions. Using them not at the start of expression was deprecated since Python 3.6.bpo-39394 [https://bugs.python.org/issue?@action=redirect&bpo=39394]: A warning about inline flags not at the start of the regular expression now contains the position of the flag.
bpo-433030 [https://bugs.python.org/issue?@action=redirect&bpo=433030]: Add support of atomic grouping (
(?>…)
) and possessive quantifiers (*+
,++
,?+
,{m,n}+
) inregular expressions
.bpo-47062 [https://bugs.python.org/issue?@action=redirect&bpo=47062]: Implement
asyncio.Runner
context manager.bpo-46382 [https://bugs.python.org/issue?@action=redirect&bpo=46382]:
dataclass()
slots=True
now correctly omits slots already defined in base classes. Patch by Arie Bovenberg.bpo-47057 [https://bugs.python.org/issue?@action=redirect&bpo=47057]: Use FASTCALL convention for
FutureIter.throw()
bpo-47061 [https://bugs.python.org/issue?@action=redirect&bpo=47061]: Deprecate the various modules listed by PEP 594 [https://peps.python.org/pep-0594/]: aifc, asynchat, asyncore, audioop, cgi, cgitb, chunk, crypt, imghdr, msilib, nntplib, nis, ossaudiodev, pipes, smtpd, sndhdr, spwd, sunau, telnetlib, uu, xdrlib
bpo-34790 [https://bugs.python.org/issue?@action=redirect&bpo=34790]: Remove passing coroutine objects to
asyncio.wait()
.bpo-47039 [https://bugs.python.org/issue?@action=redirect&bpo=47039]: Normalize
repr()
of asyncio future and task objects.bpo-2604 [https://bugs.python.org/issue?@action=redirect&bpo=2604]: Fix bug where doctests using globals would fail when run multiple times.
bpo-45150 [https://bugs.python.org/issue?@action=redirect&bpo=45150]: Add
hashlib.file_digest()
helper for efficient hashing of file object.bpo-34861 [https://bugs.python.org/issue?@action=redirect&bpo=34861]: Made cumtime the default sorting key for cProfile
bpo-45997 [https://bugs.python.org/issue?@action=redirect&bpo=45997]: Fix
asyncio.Semaphore
re-aquiring FIFO order.bpo-47022 [https://bugs.python.org/issue?@action=redirect&bpo=47022]: The
asynchat
,asyncore
andsmtpd
modules have been deprecated since at least Python 3.6. Their documentation and deprecation warnings and have now been updated to note they will removed in Python 3.12 ( PEP 594 [https://peps.python.org/pep-0594/]).bpo-43253 [https://bugs.python.org/issue?@action=redirect&bpo=43253]: Fix a crash when closing transports where the underlying socket handle is already invalid on the Proactor event loop.
bpo-40280 [https://bugs.python.org/issue?@action=redirect&bpo=40280]:
select.select()
now passesNULL
toselect
for each empty fdset.bpo-47004 [https://bugs.python.org/issue?@action=redirect&bpo=47004]: Apply bugfixes from importlib_metadata 4.11.3, including bugfix for EntryPoint.extras, which was returning match objects and not the extras strings.
bpo-46998 [https://bugs.python.org/issue?@action=redirect&bpo=46998]: Allow subclassing of
typing.Any
. Patch by Shantanu Jain.bpo-46995 [https://bugs.python.org/issue?@action=redirect&bpo=46995]: Deprecate missing
asyncio.Task.set_name()
for third-party task implementations, schedule making it mandatory in Python 3.13.bpo-46994 [https://bugs.python.org/issue?@action=redirect&bpo=46994]: Accept explicit contextvars.Context in
asyncio.create_task()
andasyncio.loop.create_task()
.bpo-46981 [https://bugs.python.org/issue?@action=redirect&bpo=46981]:
typing.get_args(typing.Tuple[()])
now returns()
instead of((),)
.bpo-46968 [https://bugs.python.org/issue?@action=redirect&bpo=46968]: Add
os.sysconf_names['SC_MINSIGSTKSZ']
.bpo-46985 [https://bugs.python.org/issue?@action=redirect&bpo=46985]: Upgrade pip wheel bundled with ensurepip (pip 22.0.4)
bpo-46968 [https://bugs.python.org/issue?@action=redirect&bpo=46968]:
faulthandler
: On Linux 5.14 and newer, dynamically determine size of signal handler stack size CPython allocates usinggetauxval(AT_MINSIGSTKSZ)
. This changes allows for Python extension's request to Linux kernel to use AMX_TILE instruction set on Sapphire Rapids Xeon processor to succeed, unblocking use of the ISA in frameworks.bpo-46917 [https://bugs.python.org/issue?@action=redirect&bpo=46917]: The
math.nan
value is now always available. Patch by Victor Stinner.bpo-46955 [https://bugs.python.org/issue?@action=redirect&bpo=46955]: Expose
asyncio.base_events.Server
asasyncio.Server
. Patch by Stefan Zabka.bpo-23325 [https://bugs.python.org/issue?@action=redirect&bpo=23325]: The
signal
module no longer assumes thatSIG_IGN
andSIG_DFL
are small int singletons.bpo-46932 [https://bugs.python.org/issue?@action=redirect&bpo=46932]: Update bundled libexpat to 2.4.7
bpo-46933 [https://bugs.python.org/issue?@action=redirect&bpo=46933]: The
pwd
module is now optional.os.path.expanduser()
returns the path when thepwd
module is not available.bpo-40059 [https://bugs.python.org/issue?@action=redirect&bpo=40059]: PEP 680 [https://peps.python.org/pep-0680/], the
tomllib
module. Adds support for parsing TOML.bpo-464471 [https://bugs.python.org/issue?@action=redirect&bpo=464471]:
asyncio.timeout()
andasyncio.timeout_at()
context managers added. Patch by Tin Tvrtković and Andrew Svetlov.bpo-46805 [https://bugs.python.org/issue?@action=redirect&bpo=46805]: Added raw datagram socket functions for asyncio:
sock_sendto()
,sock_recvfrom()
andsock_recvfrom_into()
.bpo-46644 [https://bugs.python.org/issue?@action=redirect&bpo=46644]: No longer require valid typeforms to be callable. This allows
typing.Annotated
to wraptyping.ParamSpecArgs
anddataclasses.InitVar
. Patch by Gregory Beauregard.bpo-46581 [https://bugs.python.org/issue?@action=redirect&bpo=46581]: Brings
ParamSpec
propagation forGenericAlias
in line withConcatenate
(and others).bpo-45413 [https://bugs.python.org/issue?@action=redirect&bpo=45413]: Define posix_venv and nt_venv sysconfig installation schemes to be used for bootstrapping new virtual environments. Add venv sysconfig installation scheme to get the appropriate one of the above. The schemes are identical to the pre-existing posix_prefix and nt install schemes. The
venv
module now uses the venv scheme to create new virtual environments instead of hardcoding the paths depending only on the platform. Downstream Python distributors customizing the posix_prefix or nt install scheme in a way that is not compatible with the install scheme used in virtual environments are encouraged not to customize the venv schemes. When Python itself runs in a virtual environment,sysconfig.get_default_scheme()
andsysconfig.get_preferred_scheme()
withkey="prefix"
returns venv.bpo-43224 [https://bugs.python.org/issue?@action=redirect&bpo=43224]: Implement support for PEP 646 in typing.py.
bpo-43224 [https://bugs.python.org/issue?@action=redirect&bpo=43224]: Allow unpacking types.GenericAlias objects, e.g.
*tuple[int, str]
.bpo-46557 [https://bugs.python.org/issue?@action=redirect&bpo=46557]: Warnings captured by the logging module are now logged without a format string to prevent systems that group logs by the msg argument from grouping captured warnings together.
bpo-41370 [https://bugs.python.org/issue?@action=redirect&bpo=41370]:
typing.get_type_hints()
now supports evaluating strings as forward references in PEP 585 generic aliases.bpo-46607 [https://bugs.python.org/issue?@action=redirect&bpo=46607]: Add
DeprecationWarning
toLegacyInterpolation
, deprecated in the docstring since Python 3.2. Will be removed in Python 3.13. UseBasicInterpolation
orExtendedInterpolation
instead.bpo-26120 [https://bugs.python.org/issue?@action=redirect&bpo=26120]:
pydoc
now excludes future imports from the module's data items.bpo-46480 [https://bugs.python.org/issue?@action=redirect&bpo=46480]: Add
typing.assert_type()
. Patch by Jelle Zijlstra.bpo-46421 [https://bugs.python.org/issue?@action=redirect&bpo=46421]: Fix a unittest issue where if the command was invoked as
python -m unittest
and the filename(s) began with a dot (.), aValueError
is returned.bpo-46245 [https://bugs.python.org/issue?@action=redirect&bpo=46245]: Add optional parameter dir_fd in
shutil.rmtree()
.bpo-22859 [https://bugs.python.org/issue?@action=redirect&bpo=22859]:
unittest.TestProgram.usageExit()
is marked as deprecated, to be removed in Python 3.13.bpo-46170 [https://bugs.python.org/issue?@action=redirect&bpo=46170]: Improve the error message when you try to subclass an instance of
typing.NewType
.bpo-40296 [https://bugs.python.org/issue?@action=redirect&bpo=40296]: Fix supporting generic aliases in
pydoc
.bpo-20392 [https://bugs.python.org/issue?@action=redirect&bpo=20392]: Fix inconsistency with uppercase file extensions in
MimeTypes.guess_type()
. Patch by Kumar Aditya.bpo-46030 [https://bugs.python.org/issue?@action=redirect&bpo=46030]: Add
LOCAL_CREDS
,LOCAL_CREDS_PERSISTENT
andSCM_CREDS2
FreeBSD constants to the socket module.bpo-44439 [https://bugs.python.org/issue?@action=redirect&bpo=44439]: Fix
.write()
method of a member file inZipFile
, when the input data is an object that supports the buffer protocol, the file length may be wrong.bpo-45171 [https://bugs.python.org/issue?@action=redirect&bpo=45171]: Fix handling of the
stacklevel
argument to logging functions in thelogging
module so that it is consistent across all logging functions and, as advertised, similar to thestacklevel
argument used inwarn()
.bpo-24959 [https://bugs.python.org/issue?@action=redirect&bpo=24959]: Fix bug where
unittest
sometimes drops frames from tracebacks of exceptions raised in tests.bpo-44859 [https://bugs.python.org/issue?@action=redirect&bpo=44859]: Raise more accurate and PEP 249 [https://peps.python.org/pep-0249/] compatible exceptions in
sqlite3
.Raise
InterfaceError
instead ofProgrammingError
forSQLITE_MISUSE
errors.Don't overwrite
BufferError
withValueError
when conversion to BLOB fails.Raise
ProgrammingError
instead ofWarning
if user tries toexecute()
more than one SQL statement.Raise
ProgrammingError
instead ofValueError
if an SQL query contains null characters.
bpo-44493 [https://bugs.python.org/issue?@action=redirect&bpo=44493]: Add missing terminated NUL in sockaddr_un's length This was potentially observable when using non-abstract AF_UNIX datagram sockets to processes written in another programming language.
bpo-41930 [https://bugs.python.org/issue?@action=redirect&bpo=41930]: Add
serialize()
anddeserialize()
support tosqlite3
. Patch by Erlend E. Aasland.bpo-33178 [https://bugs.python.org/issue?@action=redirect&bpo=33178]: Added
ctypes.BigEndianUnion
andctypes.LittleEndianUnion
classes, as originally documented in the library docs but not yet implemented.bpo-43352 [https://bugs.python.org/issue?@action=redirect&bpo=43352]: Add an Barrier object in synchronization primitives of asyncio Lib in order to be consistent with Barrier from threading and multiprocessing libs*
bpo-35859 [https://bugs.python.org/issue?@action=redirect&bpo=35859]:
re
module, fix a few bugs about capturing group. In rare cases, capturing group gets an incorrect string. Patch by Ma Lin.
文档
bpo-45099 [https://bugs.python.org/issue?@action=redirect&bpo=45099]: Document internal
asyncio
API.bpo-47126 [https://bugs.python.org/issue?@action=redirect&bpo=47126]: Update PEP URLs to PEP 676 [https://peps.python.org/pep-0676/]'s new canonical form.
bpo-47040 [https://bugs.python.org/issue?@action=redirect&bpo=47040]: Clarified the old Python versions compatibility note of
binascii.crc32()
/zlib.adler32()
/zlib.crc32()
functions.bpo-46033 [https://bugs.python.org/issue?@action=redirect&bpo=46033]: Clarify
for
statement execution in its doc.bpo-45790 [https://bugs.python.org/issue?@action=redirect&bpo=45790]: Adjust inaccurate phrasing in 自定义扩展类型:教程 about the
ob_base
field and the macros used to access its contents.bpo-42340 [https://bugs.python.org/issue?@action=redirect&bpo=42340]: Document that in some circumstances
KeyboardInterrupt
may cause the code to enter an inconsistent state. Provided a sample workaround to avoid it if needed.bpo-41233 [https://bugs.python.org/issue?@action=redirect&bpo=41233]: Link the errnos referenced in
Doc/library/exceptions.rst
to their respective section inDoc/library/errno.rst
, and vice versa. Previously this was only done for EINTR and InterruptedError. Patch by Yan "yyyyyyyan" Orestes.
测试
bpo-47205 [https://bugs.python.org/issue?@action=redirect&bpo=47205]: Skip test for
sched_getaffinity()
andsched_setaffinity()
error case on FreeBSD.bpo-46126 [https://bugs.python.org/issue?@action=redirect&bpo=46126]: Restore 'descriptions' when running tests internally.
bpo-47104 [https://bugs.python.org/issue?@action=redirect&bpo=47104]: Rewrite
asyncio.to_thread()
tests to useunittest.IsolatedAsyncioTestCase
.bpo-40280 [https://bugs.python.org/issue?@action=redirect&bpo=40280]: The test suite is now passing on the Emscripten platform. All fork, socket, and subprocess-based tests are skipped.
bpo-47037 [https://bugs.python.org/issue?@action=redirect&bpo=47037]: Skip
strftime("%4Y")
feature test on Windows. It can cause an assertion error in debug builds.bpo-46587 [https://bugs.python.org/issue?@action=redirect&bpo=46587]: Skip tests if platform's
strftime
does not support non-portable glibc extensions.bpo-47015 [https://bugs.python.org/issue?@action=redirect&bpo=47015]: A test case for
os.sendfile()
is converted from deprecatedasyncore
(see PEP 594 [https://peps.python.org/pep-0594/]) toasyncio
. Patch by Oleg Iarygin.
构建
bpo-40280 [https://bugs.python.org/issue?@action=redirect&bpo=40280]: Add configure option
--enable-wasm-dynamic-linking
to enabledlopen
and MAIN_MODULE / SIDE_MODULE onwasm32-emscripten
.bpo-46023 [https://bugs.python.org/issue?@action=redirect&bpo=46023]:
makesetup
now detects and skips all duplicated module definitions. The first entry wins.bpo-40280 [https://bugs.python.org/issue?@action=redirect&bpo=40280]: Add SOABI
wasm32-emscripten
for Emscripten andwasm32-wasi
for WASI on 32bit WASM as well aswasm64
counter parts.bpo-47032 [https://bugs.python.org/issue?@action=redirect&bpo=47032]: Ensure Windows install builds fail correctly with a non-zero exit code when part of the build fails.
bpo-47024 [https://bugs.python.org/issue?@action=redirect&bpo=47024]: Update OpenSSL to 1.1.1n for macOS installers and all Windows builds.
bpo-46996 [https://bugs.python.org/issue?@action=redirect&bpo=46996]: The
tkinter
package now requires Tcl/Tk version 8.5.12 or newer.bpo-46973 [https://bugs.python.org/issue?@action=redirect&bpo=46973]: Add
regen-configure
make target to regenerate configure script with Christian's container imagequay.io/tiran/cpython_autoconf:269
.bpo-46917 [https://bugs.python.org/issue?@action=redirect&bpo=46917]: Building Python now requires support of IEEE 754 floating-point numbers. Patch by Victor Stinner.
bpo-45774 [https://bugs.python.org/issue?@action=redirect&bpo=45774]:
configure
now verifies that all SQLite C APIs needed for thesqlite3
extension module are found.