Opened 2 years ago
Closed 2 years 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 , 2 years ago
comment:3 by , 2 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 2 years 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.crc32and :func:binascii.crc32could produce incorrect results on multi-gigabyte inputs. Including when using :mod:zipfileon zips containing large data.LOAD_NULLbytecode instruction when optimized twice.Noneafter the coroutine/generator has been closed. This fixes a bug where :func:~inspect.getcoroutinestateand :func:~inspect.getgeneratorstatereturn the wrong state for a closed coroutine/generator.~object.__dict__and :attr:~object.__weakref__.LOAD_FROM_DICT_OR_DEREF.Tracebackobject creation by lazily compute the line number. Patch by Pablo Galindoiso2022_jp_3andiso2022_jp_2004codecs read out of boundscodeopthat was causing :exc:SyntaxErrorexceptions raised in the presence of invalid syntax to not contain precise error messages. Patch by Pablo GalindoSyntaxWarningto appear twice when parsing if invalid syntax is encountered later. Patch by Pablo galindois Noneandis not Nonewhen debugging. Patch by Savannah Ostrowski.MemoryErrorin subinterpreter.typing.TypeVaris constructed with a keyword argument. Patch by Jelle Zijlstra.types.CodeType.replacewould produce a broken code object if called on a module or class code object that contains a comprehension. Patch by Jelle Zijlstra.PY_THROWto :func:sys.setprofileeventsassert(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_Appendin_PyEval_MatchClass.sys.path[0]is now set correctly for subinterpreters.BUILD_MAP.reprof symtable entry object.SyntaxError.Library
tempfile.TemporaryDirectorycleanup on Windows.onerrorto :func:shutil.rmtree.typing.Annotated.Annotated[str, True]is no longer identical toAnnotated[str, 1].subprocesson 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 slowerfork().MAX_STRUCT_SIZEto 32 in stgdict. Patch by Diego Russo.RuntimeWarningwhen executing the :mod:zipfilemodule.required_keysandoptional_keysattributes of a :class:typing.TypedDict. Patch by Jelle Zijlstra.repron a module that had been imported using a custom :term:loadercould fail with :exc:AttributeError. Patch by Alex Waygood.struct.Structinitialization that broke some cases of subclassing.~doctest.DocTestfails if one of them hasNoneas its lineno.readline.set_completer_delimswork with libeditRuntimeErrorbe displayed when event loop has already been closed at :meth:StreamWriter.__del__.io.TextIOWrapper.reconfigurewhen pass invalid arguments, e.g. non-string encoding.curses: restore wide character support (including :func:curses.unget_wchand :meth:~curses.window.get_wch) on macOS, which was unavailable due to a regression in Python 3.12.contextlib.suppressnow supports suppressing exceptions raised as part of a :exc:BaseExceptionGroup, in addition to the recent support for :exc:ExceptionGroup.os.putenvand :meth:os.unsetenvon Windows.doctestfor :exc:SyntaxErrornot-builtin subclasses.client_connected_cbof :func:asyncio.start_serverso that applications can handle it. Patch by Kumar Aditya.bind_class()andbind_all()methods of :mod:tkinterwidgets.io.text_encoding(), :data:io.DEFAULT_BUFFER_SIZE, and :class:io.IncrementalNewlineDecodertoio.all.math.sumprod.tkinter.ttk.Style.element_create. Add tests forelement_create()and otherttk.Stylemethods. Add examples forelement_create()in the documentation.tkinterwidget'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.)timenot checking for errors when initializing.!_socketmodule init._blake2not checking for errors when initializing.io.BytesIO.getbuffercalled repeatedly for empty BytesIO.doctestoutput comparison for exceptions with notes.asyncio.TaskGroupand :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.setrawand :func:tty.setcbreak: previously they returned partially modified list of the original tty attributes. :func:tty.cfmakerawand :func:tty.cfmakecbreaknow make a copy of the list of special characters before modifying it.!_sre.compilewhere :exc:TypeErrorwould be overwritten by :exc:OverflowErrorwhen the *code* argument was a list of non-ints.pdbfrom crashing when trying to display undisplayable objectsgettextnow alwais refers to the line in the user code where gettext function or method is used. Previously it could refer to a line ingettextcode.select.kqueueobjects correctly appear as closed in forked children, to prevent operations on an invalid file descriptor.~contextlib.contextmanagerand :func:~contextlib.asynccontextmanagercontext managers now close an invalid underlying generator object that yields more then one value.termios.tcsetattrbug that was overwritting existing errors during parsing integers fromtermlist.random. Patch by Alex Waygood.reducemethod to :class:IPv6Addressin order to keepscope_idPopen.terminate()now catchs :exc:PermissionErrorand 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.selectto not return all the ready events in some cases when a file descriptor is registered for both read and write.refunctions such as :func:re.findall, :func:re.split, :func:re.searchand :func:re.subwhich perform short repeated matches can now be interrupted by user.reprlib.recursive_reprnot copyingtype_paramsfrom 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.isdiris identical on all platforms. Patch by Amin Alaee.shutil.whichwill prefer files with an extension inPATHEXTif the given mode includesos.X_OKon win32. If noPATHEXTmatch is found, a file without an extension inPATHEXTcan be returned. This change will have :func:shutil.whichact more similarly to previous behavior in Python 3.11.next()method of :class:itertools.pairwise.os.statand :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.pdbaliascommand 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.codecsstreams 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_threadrace 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.pdbcommand line interface, making it produce more concise error messages.unittestif all tests are skipped. Patch by Egor Eliseev.unittest.TestLoaderno longer loads test cases from exact :class:unittest.TestCaseand :class:unittest.FunctionTestCaseclasses.tempfile.TemporaryDirectorycleanup, which now no longer dereferences symlinks when working around file system permission errors.http.client.zipinfonow 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.TemporaryDirectorypreviously masked aPermissionErrorwithNotADirectoryErrorduring directory cleanup. It now correctly raisesPermissionErrorif errors are not ignored. Patch by Andrei Kulakov and Ken Jin.shutil.rmtreefunction now ignores errors when calling :func:os.closewhen *ignore_errors* isTrue, and :func:os.closeno longer retried after error.pickle.Picklerand :class:pickle.Unpicklerinvolving cyclic references via the internal memo mapping.ssl.SSLSocket.recv_intomethod no longer requires the *buffer* argument to implementlenand supports buffers with arbitrary item size.Documentation
smtpddeprecation notice to its own section rather than underlocalein What's New in Python 3.12 documentdismodule command-line interface is now mentioned in documentation.Tests
zlib.ZLIB_RUNTIME_VERSIONcontains non-integer suffixes. For example zlib-ng defines the version as1.3.0.zlib-ng.--verbose3option compatible with--huntrleaks -jNoptions. The./python -m test -j1 -R 3:3 --verbose3command now works as expected. Patch by Victor Stinner.run_unittest()andrun_doctest()from the :mod:test.supportmodule.SOURCE_DATE_EPOCHenvironment variable is defined: use the variable value as the random seed. Patch by Victor Stinner.--match,--ignore,--matchfileand--ignorefileare now tested in the order of specification, and the last match determines whether the test case be run or ignored.tty.termios.CLOCK_REStotest_asyncio.utils. Patch by Victor Stinner.time.sleepwith a hardcoded number of seconds. Patch by Victor Stinner.test_interprocess_signal()oftest_signal. Make sure that thesubprocess.Popenobject is deleted before the test raising an exception in a signal handler. Otherwise,Popen.del()can get the exception which is logged asException 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_profilerif 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 PCis found. Patch by Victor Stinner.Build
Tools/build/regen-configure.shscript to regenerate theconfigurewith an Ubuntu container image. Thequay.io/tiran/cpython_autoconf:271container image (tiran/cpython_autoconf <https://github.com/tiran/cpython_autoconf>_) is no longer used. Patch by Victor Stinner.Windows
~os.fstaton file systems that do not support file ID requests. This includes FAT32 and exFAT.os.DirEntry.inodedropping higher 64 bits of a file id on some filesystems on Windows.macOS
/dev/fdon macOS to determine the number of open files intest.support.os_helper.fd_countto 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::ThemeChangederror encountered in Tkinter.tkinter.Tkinstance is destroyed.IDLE
C API
sys.path_hooksor :data:sys.path_importer_cacheor 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.