Opened 14 months ago
Closed 14 months ago
#18987 closed enhancement (fixed)
python3-3.12.1 (Wait for LFS)
Reported by: | Bruce Dubbs | Owned by: | Bruce Dubbs |
---|---|---|---|
Priority: | elevated | Milestone: | 12.1 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description
New point version.
Change History (4)
comment:1 by , 14 months ago
comment:3 by , 14 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 14 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed at commits
2c758f05b7 Update to Python-3.12.1. 92202f73f5 Update to mesa-23.3.1. 7450bb6c4d Update to librsvg-2.57.1.
Note:
See TracTickets
for help on using tickets.
Python News
What's New in Python 3.12.1 final?
*Release date: 2023-12-07*
Core and Builtins
bytearray.join()
method that could result in reading memory after it was freed.
zlib.crc32
and :func:binascii.crc32
could produce incorrect results on multi-gigabyte inputs. Including when using :mod:zipfile
on zips containing large data.LOAD_NULL
bytecode instruction when optimized twice.
None
after the coroutine/generator has been closed. This fixes a bug where :func:
~inspect.getcoroutinestate
and :func:~inspect.getgeneratorstate
return the wrong state for a closed coroutine/generator.~object.__dict__
and :attr:~object.__weakref__
.LOAD_FROM_DICT_OR_DEREF
.
Traceback
object creation by lazily compute the line number. Patch by Pablo Galindoiso2022_jp_3
and
iso2022_jp_2004
codecs read out of bounds
codeop
that was causing :exc:SyntaxError
exceptions raised in the presence of invalid syntax to not contain precise error messages. Patch by Pablo GalindoSyntaxWarning
to appear twice when parsing if invalid syntax is encountered later. Patch by Pablo galindois None
and
is not None
when debugging. Patch by Savannah Ostrowski.
MemoryError
in subinterpreter.typing.TypeVar
is constructed with a keyword argument. Patch by Jelle Zijlstra.types.CodeType.replace
would produce a broken code object if called on a module or class code object that contains a comprehension. Patch by Jelle Zijlstra.PY_THROW
to :func:
sys.setprofile
eventsassert(tstate->thread_id > 0)
with
#ifndef HAVE_PTHREAD_STUBS
. This allows for for pydebug builds to work under WASI which (currently) lacks thread support.
PyList_Append
in
_PyEval_MatchClass
.
sys.path[0]
is now set correctly for subinterpreters.
BUILD_MAP
.repr
of symtable entry object.
SyntaxError
.Library
tempfile.TemporaryDirectory
cleanup on Windows.onerror
to :func:
shutil.rmtree
.typing.Annotated
.Annotated[str, True]
is no longer identical to
Annotated[str, 1]
.
subprocess
on Linux where it would no longer use the fast-pathvfork()
system call when it should have due to a logic bug, instead always falling back to the safe but slower
fork()
.
MAX_STRUCT_SIZE
to 32 in stgdict. Patch by Diego Russo.
RuntimeWarning
when executing the :mod:zipfile
module.required_keys
and
optional_keys
attributes of a :class:
typing.TypedDict
. Patch by Jelle Zijlstra.repr
on a module that had been imported using a custom :term:loader
could fail with :exc:AttributeError
. Patch by Alex Waygood.struct.Struct
initialization that broke some cases of subclassing.~doctest.DocTest
fails if one of them hasNone
as its lineno.
readline.set_completer_delims
work with libeditRuntimeError
be displayed when event loop has already been closed at :meth:StreamWriter.__del__
.io.TextIOWrapper.reconfigure
when pass invalid arguments, e.g. non-string encoding.curses
: restore wide character support (including :func:curses.unget_wch
and :meth:~curses.window.get_wch
) on macOS, which was unavailable due to a regression in Python 3.12.contextlib.suppress
now supports suppressing exceptions raised as part of a :exc:BaseExceptionGroup
, in addition to the recent support for :exc:ExceptionGroup
.os.putenv
and :meth:os.unsetenv
on Windows.doctest
for :exc:SyntaxError
not-builtin subclasses.client_connected_cb
of :func:
asyncio.start_server
so that applications can handle it. Patch by Kumar Aditya.bind_class()
and
bind_all()
methods of :mod:
tkinter
widgets.io.text_encoding()
, :data:io.DEFAULT_BUFFER_SIZE
, and :class:io.IncrementalNewlineDecoder
toio.all
.
math.sumprod
.tkinter.ttk.Style.element_create
. Add tests forelement_create()
and other
ttk.Style
methods. Add examples for
element_create()
in the documentation.
tkinter
widget'sunbind()
method with two arguments. Previously,
widget.unbind(sequence, funcid)
destroyed the current binding for *sequence*, leaving *sequence* unbound, and deleted the *funcid* command. Now it removes only *funcid* from the binding for *sequence*, keeping other commands, and deletes the *funcid* command. It leaves *sequence* unbound only if *funcid* was the last bound command.
asyncio.Server.wait_closed()
. It now blocks until both conditions are true: the server is closed, *and* there are no more active connections. (This means that in some cases where in 3.12.0 this function would *incorrectly* have returned immediately, it will now block; in particular, when there are no active connections but the server hasn't been closed yet.)time
not checking for errors when initializing.!_socket
module init._blake2
not checking for errors when initializing.io.BytesIO.getbuffer
called repeatedly for empty BytesIO.doctest
output comparison for exceptions with notes.asyncio.TaskGroup
and :class:asyncio.Timeout
. They now raise proper RuntimeError if they are improperly used and are left in consistent state after this.pathlib.PurePath.with_name
: a single dot was incorrectly considered a valid name, and in :class:PureWindowsPath
, a name with an NTFS alternate data stream, likea:b
, was incorrectly considered invalid.
tty.setraw
and :func:tty.setcbreak
: previously they returned partially modified list of the original tty attributes. :func:tty.cfmakeraw
and :func:tty.cfmakecbreak
now make a copy of the list of special characters before modifying it.!_sre.compile
where :exc:TypeError
would be overwritten by :exc:OverflowError
when the *code* argument was a list of non-ints.pdb
from crashing when trying to display undisplayable objectsgettext
now alwais refers to the line in the user code where gettext function or method is used. Previously it could refer to a line ingettext
code.
select.kqueue
objects correctly appear as closed in forked children, to prevent operations on an invalid file descriptor.~contextlib.contextmanager
and :func:~contextlib.asynccontextmanager
context managers now close an invalid underlying generator object that yields more then one value.termios.tcsetattr
bug that was overwritting existing errors during parsing integers fromterm
list.
random
. Patch by Alex Waygood.reduce
method to :class:
IPv6Address
in order to keepscope_id
Popen.terminate()
now catchs :exc:
PermissionError
and get the process exit code. If the process is still running, raise again the :exc:PermissionError
. Otherwise, the process terminated as expected: store its exit code. Patch by Victor Stinner.KqueueSelector.select
to not return all the ready events in some cases when a file descriptor is registered for both read and write.re
functions such as :func:re.findall
, :func:re.split
, :func:re.search
and :func:re.sub
which perform short repeated matches can now be interrupted by user.reprlib.recursive_repr
not copyingtype_params
from decorated function.
concurrent.futures
: The *executor manager thread* now catches exceptions when adding an item to the *call queue*. During Python finalization, creating a new thread can now raise :exc:RuntimeError
. Catch the exception and callterminate_broken()
in this case. Patch by Victor Stinner.
os.path.isdir
is identical on all platforms. Patch by Amin Alaee.shutil.which
will prefer files with an extension inPATHEXT
if the given mode includes
os.X_OK
on win32. If no
PATHEXT
match is found, a file without an extension in
PATHEXT
can be returned. This change will have :func:
shutil.which
act more similarly to previous behavior in Python 3.11.next()
method of :class:
itertools.pairwise
.os.stat
and :meth:os.DirEntry.stat
: check for exceptions. Previously, on Python built in debug mode, these functions could trigger a fatal Python error (and abort the process) when a function succeeded with an exception set. Patch by Victor Stinner.pdb
alias
command now prevents registering aliases without arguments.
concurrent.futures
. When a process in the process pool was terminated abruptly (while the future was running or pending), close the connection write end. If the call queue is blocked on sending bytes to a worker process, closing the connection write end interrupts the send, so the queue can be closed. Patch by Victor Stinner.
codecs
streams now raise a TypeError. Previously, copying failed with a RecursionError, while pickling produced wrong results that eventually caused unpickling to fail with a RecursionError._thread.start_new_thread
race condition. If a thread is created during Python finalization, the newly spawned thread now exits immediately instead of trying to access freed memory and lead to a crash. Patch by Victor Stinner.pdb
command line interface, making it produce more concise error messages.unittest
if all tests are skipped. Patch by Egor Eliseev.
unittest.TestLoader
no longer loads test cases from exact :class:unittest.TestCase
and :class:unittest.FunctionTestCase
classes.tempfile.TemporaryDirectory
cleanup, which now no longer dereferences symlinks when working around file system permission errors.http.client
.zipinfo
now supports the full range of values in the TZ string determined by RFC 8536 and detects all invalid formats. Both Python and C implementations now raise exceptions of the same type on invalid data.tempfile.TemporaryDirectory
previously masked a
PermissionError
with
NotADirectoryError
during directory cleanup. It now correctly raises
PermissionError
if errors are not ignored. Patch by Andrei Kulakov and Ken Jin.
shutil.rmtree
function now ignores errors when calling :func:os.close
when *ignore_errors* isTrue
, and :func:
os.close
no longer retried after error.pickle.Pickler
and :class:pickle.Unpickler
involving cyclic references via the internal memo mapping.ssl.SSLSocket.recv_into
method no longer requires the *buffer* argument to implementlen
and supports buffers with arbitrary item size.
Documentation
smtpd
deprecation notice to its own section rather than under
locale
in What's New in Python 3.12 document
dis
module command-line interface is now mentioned in documentation.Tests
zlib.ZLIB_RUNTIME_VERSION
contains non-integer suffixes. For example zlib-ng defines the version as1.3.0.zlib-ng
.
--verbose3
option compatible with
--huntrleaks -jN
options. The
./python -m test -j1 -R 3:3 --verbose3
command now works as expected. Patch by Victor Stinner.
run_unittest()
and
run_doctest()
from the :mod:
test.support
module.SOURCE_DATE_EPOCH
environment variable is defined: use the variable value as the random seed. Patch by Victor Stinner.
--match
,
--ignore
,
--matchfile
and
--ignorefile
are now tested in the order of specification, and the last match determines whether the test case be run or ignored.
tty
.termios
.CLOCK_RES
to
test_asyncio.utils
. Patch by Victor Stinner.
time.sleep
with a hardcoded number of seconds. Patch by Victor Stinner.test_interprocess_signal()
of
test_signal
. Make sure that the
subprocess.Popen
object is deleted before the test raising an exception in a signal handler. Otherwise,
Popen.del()
can get the exception which is logged as
Exception ignored in: ...
and the test fails. Patch by Victor Stinner.
./configure --enable-optimizations
, which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. Patch by Victor Stinner.
test_perf_profiler
if Python is built with ASAN, MSAN or UBSAN sanitizer. Python does crash randomly in this test on such build. Patch by Victor Stinner.
Backtrace stopped: frame did not save the PC
is found. Patch by Victor Stinner.
Build
Tools/build/regen-configure.sh
script to regenerate the
configure
with an Ubuntu container image. The
quay.io/tiran/cpython_autoconf:271
container image (
tiran/cpython_autoconf <https://github.com/tiran/cpython_autoconf>
_) is no longer used. Patch by Victor Stinner.Windows
~os.fstat
on file systems that do not support file ID requests. This includes FAT32 and exFAT.os.DirEntry.inode
dropping higher 64 bits of a file id on some filesystems on Windows.macOS
/dev/fd
on macOS to determine the number of open files in
test.support.os_helper.fd_count
to avoid a crash with "guarded" file descriptors when probing for open files.
Secure coding is not enabled for restorable state`` warning encountered in Tkinter on macOS 14 Sonoma.
ttk::ThemeChanged
error encountered in Tkinter.
tkinter.Tk
instance is destroyed.IDLE
C API
sys.path_hooks
or :data:sys.path_importer_cache
or they are not list and dict correspondingly. Previously it could return NULL without setting error in obscure cases, crash or raise SystemError if these attributes have wrong type.