Up to [cvs.NetBSD.org] / pkgsrc / lang / python312
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
*: recursive bump for icu 77 and libxml2 2.14
python312 py312-html-docs: updated to 3.12.10 Python 3.12.10 final macOS gh-124111: Update macOS installer to use Tcl/Tk 8.6.16. gh-131423: Update macOS installer to use OpenSSL 3.0.16. Patch by Bénédikt Tran. gh-131025: Update macOS installer to ship with SQLite 3.49.1. gh-91132: Update macOS installer to use ncurses 6.5. Windows gh-131423: Update bundled version of OpenSSL to 3.0.16. The new build also disables uplink support, which may be relevant to embedders but has no impact on normal use. gh-131025: Update Windows installer to ship with SQLite 3.49.1. gh-131020: pylauncher correctly detects a BOM when searching for the shebang. Fix by Chris Eibl. Tools/Demos gh-131852: msgfmt no longer adds the POT-Creation-Date to generated .mo files for consistency with GNU msgfmt. gh-85012: Correctly reset msgctxt when compiling messages in msgfmt. Tests gh-131050: test_ssl.test_dh_params is skipped if the underlying TLS library does not support finite-field ephemeral Diffie-Hellman. gh-119727: Add --single-process command line option to Python test runner (regrtest). Patch by Victor Stinner. Security gh-131809: Update bundled libexpat to 2.7.1 gh-131261: Upgrade to libexpat 2.7.0 gh-127371: Avoid unbounded buffering for tempfile.SpooledTemporaryFile.writelines(). Previously, disk spillover was only checked after the lines iterator had been exhausted. This is now done after each line is written. gh-121284: Fix bug in the folding of rfc2047 encoded-words when flattening an email message using a modern email policy. Previously when an encoded-word was too long for a line, it would be decoded, split across lines, and re-encoded. But commas and other special characters in the original text could be left unencoded and unquoted. This could theoretically be used to spoof header lines using a carefully constructed encoded-word if the resulting rendered email was transmitted or re-parsed. Library gh-116608: undeprecate functional API for importlib.resources gh-132075: Fix possible use of socket address structures with uninitialized members. Now all structure members are initialized with zeroes by default. gh-132002: Fix crash when deallocating contextvars.ContextVar with weird unahashable string names. gh-131668: socket: Fix code parsing AF_BLUETOOTH socket addresses. gh-131492: Fix a resource leak when constructing a gzip.GzipFile with a filename fails, for example when passing an invalid compresslevel. gh-131325: Fix sendfile fallback implementation to drain data after writing to transport in asyncio. gh-129843: Fix incorrect argument passing in warnings.warn_explicit(). gh-131204: Use monospace font from System Font Stack for cross-platform support in difflib.HtmlDiff. gh-131045: Fix issue with __contains__, values, and pseudo-members for enum.Flag. gh-130959: Fix pure-Python implementation of datetime.time.fromisoformat() to reject times with spaces in fractional part (for example, 12:34:56.400 +02:00), matching the C implementation. Patch by Michał Gorny. gh-130637: Add validation for numeric response data in poplib.POP3.stat() method gh-130461: Remove .. index:: directives from the uuid module documentation. These directives previously created entries in the general index for getnode() as well as the uuid1(), uuid3(), uuid4(), and uuid5() constructor functions. gh-130285: Fix corner case for random.sample() allowing the counts parameter to specify an empty population. So now, sample([], 0, counts=[]) and sample('abc', k=0, counts=[0, 0, 0]) both give the same result as sample([], 0). gh-130250: Fix regression in traceback.print_last(). gh-118761: Reverts a change in the previous release attempting to make some stdlib imports used within the subprocess module lazy as this was causing errors during __del__ finalizers calling methods such as terminate, or kill, or send_signal. gh-130164: Fixed failure to raise TypeError in inspect.Signature.bind() for positional-only arguments provided by keyword when a variadic keyword argument (e.g. **kwargs) is present. gh-130151: Fix reference leaks in _hashlib.hmac_new() and _hashlib.hmac_digest(). Patch by Bénédikt Tran. gh-129726: Fix gzip.GzipFile raising an unraisable exception during garbage collection when referring to a temporary object by breaking the reference loop with weakref. gh-129583: Update bundled pip to 25.0.1 gh-97850: Update the deprecation warning of importlib.abc.Loader.load_module(). gh-129603: Fix bugs where sqlite3.Row objects could segfault if their inherited description was set to None. Patch by Erlend Aasland. gh-117779: Fix reading duplicated entries in zipfile by name. Reading duplicated entries (except the last one) by ZipInfo now emits a warning instead of raising an exception. gh-128772: Fix pydoc for methods with the __module__ attribute equal to None. gh-92897: Scheduled the deprecation of the check_home argument of sysconfig.is_python_build() to Python 3.15. gh-128703: Fix mimetypes.guess_type() to use default mapping for empty Content-Type in registry. gh-126037: xml.etree.ElementTree: Fix a crash in Element.find, Element.findtext and Element.findall when the tag to find implements an __eq__() method mutating the element being queried. Patch by Bénédikt Tran. gh-127712: Fix handling of the secure argument of logging.handlers.SMTPHandler. gh-126033: xml.etree.ElementTree: Fix a crash in Element.remove when the element is concurrently mutated. Patch by Bénédikt Tran. gh-125553: Fix round-trip invariance for backslash continuations in tokenize.untokenize(). gh-101137: Mime type text/x-rst is now supported by mimetypes. gh-113238: Add Anchor to importlib.resources (in order for the code to comply with the documentation) gh-89039: When replace() method is called on a subclass of datetime, date or time, properly call derived constructor. Previously, only the base class’s constructor was called. Also, make sure to pass non-zero fold values when creating subclasses in various methods. Previously, fold was silently ignored. IDLE gh-129873: Simplify displaying the IDLE doc by only copying the text section of idle.html to idlelib/help.html. Patch by Stan Ulbrych. Documentation gh-131417: Mention asyncio.Future and asyncio.Task in generic classes list. gh-125722: Require Sphinx 8.2.0 or later to build the Python documentation. Patch by Adam Turner. gh-129712: The wheel tags supported by each macOS universal SDK option are now documented. gh-46236: C API: Document PyUnicode_RSplit(), PyUnicode_Partition() and PyUnicode_RPartition(). Core and Builtins gh-131670: Fix anext() failing on sync __anext__() raising an exception. gh-130809: Fixed an issue where _PyFrame_LocalsToFast tries to write module level values to hidden fasts. gh-130775: Do not crash on negative column and end_column in ast locations. gh-130618: Fix a bug that was causing UnicodeDecodeError or SystemError to be raised when using f-strings with lambda expressions with non-ASCII characters. Patch by Pablo Galindo gh-130163: Fix possible crashes related to concurrent change and use of the sys module attributes. gh-88887: Fixing multiprocessing Resource Tracker process leaking, usually observed when running Python as PID 1. gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer. Patch by Pablo Galindo gh-128632: Disallow __classdict__ as the name of a type parameter. Using this name would previously crash the interpreter in some circumstances. gh-125331: from __future__ import barry_as_FLUFL now works in more contexts, including when it is used in files, with the -c flag, and in the REPL when there are multiple statements on the same line. Previously, it worked only on subsequent lines in the REPL, and when the appropriate flags were passed directly to compile(). Patch by Pablo Galindo. gh-107526: Revert converting vars, dir, next, getattr, and iter to argument clinic. gh-107674: Fixed performance regression in sys.settrace. C API gh-131740: Update PyUnstable_GC_VisitObjects to traverse perm gen. Build gh-131865: The DTrace build now properly passes the CC and CFLAGS variables to the dtrace command when utilizing SystemTap on Linux. gh-130740: Ensure that Python.h is included before stdbool.h unless pyconfig.h is included before or in some platform-specific contexts. gh-129838: Don’t redefine _Py_NO_SANITIZE_UNDEFINED when compiling with a recent GCC version and undefined sanitizer enabled. gh-129660: Drop test_embed from PGO training, whose contribution in recent versions is considered to be ignorable.
restore gettext-lib buildlink3.mk from previous python versions needed to successfully build embedded python for tevent package
python312 py312-html-docs: updated to 3.12.9 Python 3.12.9 Tests gh-127906: Test the limited C API in test_cppext. Patch by Victor Stinner. gh-127906: Backport test_cext from the main branch. Patch by Victor Stinner. gh-127637: Add tests for the dis command-line interface. Patch by Bénédikt Tran. Security gh-105704: When using urllib.parse.urlsplit() and urllib.parse.urlparse() host parsing would not reject domain names containing square brackets ([ and ]). Square brackets are only valid for IPv6 and IPvFuture hosts according to RFC 3986 Section 3.2.2. gh-127655: Fixed the asyncio.selector_events._SelectorSocketTransport transport not pausing writes for the protocol when the buffer reaches the high water mark when using asyncio.WriteTransport.writelines(). gh-126108: Fix a possible NULL pointer dereference in PySys_AddWarnOptionUnicode(). gh-80222: Fix bug in the folding of quoted strings when flattening an email message using a modern email policy. Previously when a quoted string was folded so that it spanned more than one line, the surrounding quotes and internal escapes would be omitted. This could theoretically be used to spoof header lines using a carefully constructed quoted string if the resulting rendered email was transmitted or re-parsed. gh-119511: Fix a potential denial of service in the imaplib module. When connecting to a malicious server, it could cause an arbitrary amount of memory to be allocated. On many systems this is harmless as unused virtual memory is only a mapping, but if this hit a virtual address size limit it could lead to a MemoryError or other process crash. On unusual systems or builds where all allocated memory is touched and backed by actual ram or storage it could’ve consumed resources doing so until similarly crashing. Library gh-129502: Unlikely errors in preparing arguments for ctypes callback are now handled in the same way as errors raised in the callback of in converting the result of the callback – using sys.unraisablehook() instead of sys.excepthook() and not setting sys.last_exc and other variables. gh-129403: Corrected ValueError message for asyncio.Barrier and threading.Barrier. gh-129409: Fix an integer overflow in the csv module when writing a data field larger than 2GB. gh-118761: Improve import time of subprocess by lazy importing locale and signal. Patch by Taneli Hukkinen. gh-129346: In sqlite3, handle out-of-memory when creating user-defined SQL functions. gh-128550: Removed an incorrect optimization relating to eager tasks in asyncio.TaskGroup that resulted in cancellations being missed. gh-128991: Release the enter frame reference within bdb callback gh-128961: Fix a crash when setting state on an exhausted array.array iterator. gh-128916: Do not attempt to set SO_REUSEPORT on sockets of address families other than AF_INET and AF_INET6, as it is meaningless with these address families, and the call with fail with Linux kernel 6.12.9 and newer. gh-128679: Fix tracemalloc.stop() race condition. Fix tracemalloc to support calling tracemalloc.stop() in one thread, while another thread is tracing memory allocations. Patch by Victor Stinner. gh-128562: Fix possible conflicts in generated tkinter widget names if the widget class name ends with a digit. gh-128552: Fix cyclic garbage introduced by asyncio.loop.create_task() and asyncio.TaskGroup.create_task() holding a reference to the created task if it is eager. gh-128479: Fix asyncio.staggered.staggered_race() leaking tasks and issuing an unhandled exception. gh-88834: Unify the instance check for typing.Union and types.UnionType: Union now uses the instance checks against its parameters instead of the subclass checks. gh-128302: Fix xml.dom.xmlbuilder.DOMEntityResolver.resolveEntity(), which was broken by the Python 3.0 transition. gh-128302: Allow xml.dom.xmlbuilder.DOMParser.parse() to correctly handle xml.dom.xmlbuilder.DOMInputSource instances that only have a systemId attribute set. gh-112064: Fix incorrect handling of negative read sizes in HTTPResponse.read. Patch by Yury Manushkin. gh-58956: Fixed a frame reference leak in bdb. gh-128131: Completely support random access of uncompressed unencrypted read-only zip files obtained by ZipFile.open. gh-127975: Avoid reusing quote types in ast.unparse() if not needed. gh-128014: Fix resetting the default window icon by passing default='' to the tkinter method wm_iconbitmap(). gh-115514: Fix exceptions and incomplete writes after asyncio._SelectorTransport is closed before writes are completed. gh-41872: Fix quick extraction of module docstrings from a file in pydoc. It now supports docstrings with single quotes, escape sequences, raw string literals, and other Python syntax. gh-126742: Fix support of localized error messages reported by dlerror(3) and gdbm_strerror in ctypes and dbm.gnu functions respectively. Patch by Bénédikt Tran. gh-127870: Detect recursive calls in ctypes _as_parameter_ handling. Patch by Victor Stinner. gh-127847: Fix the position when doing interleaved seeks and reads in uncompressed, unencrypted zip files returned by zipfile.ZipFile.open(). gh-127732: The platform module now correctly detects Windows Server 2025. gh-93312: Include <sys/pidfd.h> to get os.PIDFD_NONBLOCK constant. Patch by Victor Stinner. gh-83662: Add missing __class_getitem__ method to the Python implementation of functools.partial(), to make it compatible with the C version. This is mainly relevant for alternative Python implementations like PyPy and GraalPy, because CPython will usually use the C-implementation of that function. gh-127586: multiprocessing.pool.Pool now properly restores blocked signal handlers of the parent thread when creating processes via either spawn or forkserver. gh-98188: Fix an issue in email.message.Message.get_payload() where data cannot be decoded if the Content Transfer Encoding mechanism contains trailing whitespaces or additional junk text. Patch by Hui Liu. gh-127257: In ssl, system call failures that OpenSSL reports using ERR_LIB_SYS are now raised as OSError. gh-126775: Make linecache.checkcache() thread safe and GC re-entrancy safe. gh-58956: Fixed a bug in pdb where sometimes the breakpoint won’t trigger if it was set on a function which is already in the call stack. gh-123401: The http.cookies module now supports parsing obsolete RFC 850 date formats, in accordance with RFC 9110 requirements. Patch by Nano Zheng. gh-123085: In a bare call to importlib.resources.files(), ensure the caller’s frame is properly detected when importlib.resources is itself available as a compiled module only (no source). gh-122431: readline.append_history_file() now raises a ValueError when given a negative value. Documentation gh-125722: Require Sphinx 8.1.3 or later to build the Python documentation. Patch by Adam Turner. gh-67206: Document that string.printable is not printable in the POSIX sense. In particular, string.printable.isprintable() returns False. Patch by Bénédikt Tran. Core and Builtins gh-129345: Fix null pointer dereference in syslog.openlog() when an audit hook raises an exception. gh-129093: Fix f-strings such as f'{expr=}' sometimes not displaying the full expression when the expression contains !=. gh-124363: Treat debug expressions in f-string as raw strings. Patch by Pablo Galindo gh-128799: Add frame of except* to traceback when it wraps a naked exception. gh-128078: Fix a SystemError when using anext() with a default tuple value. Patch by Bénédikt Tran. gh-128079: Fix a bug where except* does not properly check the return value of an ExceptionGroup’s split() function, leading to a crash in some cases. Now when split() returns an invalid object, except* raises a TypeError with the original raised ExceptionGroup object chained to it. gh-127903: Objects/unicodeobject.c: fix a crash on DEBUG builds in _copy_characters when there is nothing to copy. gh-127599: Fix statistics for increments of object reference counts (in particular, when a reference count was increased by more than 1 in a single operation). gh-111609: Respect end_offset in SyntaxError subclasses. gh-126862: Fix a possible overflow when a class inherits from an absurd number of super-classes. Reported by Valery Fedorenko. Patch by Bénédikt Tran. gh-117195: Avoid assertion failure for debug builds when calling object.__sizeof__(1) C API gh-126554: Fix error handling in ctypes.CDLL objects which could result in a crash in rare situations. gh-107249: Implement the Py_UNUSED macro for Windows MSVC compiler. Patch by Victor Stinner. Build gh-129539: Don’t redefine EX_OK when the system has the sysexits.h header. gh-128472: Skip BOLT optimization of functions using computed gotos, fixing errors on build with LLVM 19. gh-123925: Fix building the curses module on platforms with libncurses but without libncursesw. gh-128321: Set LIBS instead of LDFLAGS when checking if sqlite3 library functions are available. This fixes the ordering of linked libraries during checks, which was incorrect when using a statically linked libsqlite3.
lang/python*: No need for :U with USE_CROSS_COMPILE. After including bsd.prefs.mk or bsd.fast.prefs.mk, this is guaranteed to be defined. If it isn't, there's a bug (like misspelling it), which we should flag early rather than quietly suppress.
lang/python3*: Use PY_VER_SUFFIX instead of copying & pasting it. Change is limited to cross-builds. No change to generated package; CONFIGURE_ARGS should be unchanged by this.
Pullup ticket #6923 - requested by wiz lang/python312: build fix Revisions pulled up: - lang/python312/Makefile 1.24 - lang/python312/distinfo 1.12 - lang/python312/patches/patch-configure 1.4 --- Module Name: pkgsrc Committed By: wiz Date: Tue Dec 24 10:13:41 UTC 2024 Modified Files: pkgsrc/lang/python312: Makefile distinfo pkgsrc/lang/python312/patches: patch-configure Log Message: python312: fix float detection on x86 Document patch a bit. Bump PKGREVISION.
python312: fix float detection on x86 Document patch a bit. Bump PKGREVISION.
lang/python*: Use libreadline unconditionally. libedit breaks some applications. Maybe we can fix it later but for now let's just go back to using libreadline unconditionally like we did before. PKGREVISION++ because this materially affects the build product -- it built before this change but didn't work right for some applications. (No change to platforms without libedit -- which is most non-NetBSD platforms, probably -- but we don't have per-platform PKGREVISION, so gotta bump it for everyone.) No change to 2.7, 3.9, or 3.10 because they already use libreadline unconditionally; respecting READLINE_TYPE is a new change in >=3.11 since April which broke applications. ok jperkin PR pkg/58875: python: terminal colours broke in some applications
python312 py312-html-docs: updated to 3.12.8 Python 3.12.8 macOS gh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. Windows gh-126911: Update credits command output. gh-125315: Avoid crashing in platform due to slow WMI calls on some Windows machines. gh-125550: Enable the Python Launcher for Windows to detect Python 3.14 installs from the Windows Store. gh-124448: Updated bundled Tcl/Tk to 8.6.15. Tools/Demos gh-126807: Fix extraction warnings in pygettext.py caused by mistaking function definitions for function calls. Tests gh-126909: Fix test_os extended attribute tests to work on filesystems with 1 KiB xattr size limit. gh-125041: Re-enable skipped tests for zlib on the s390x architecture: only skip checks of the compressed bytes, which can be different between zlib’s software implementation and the hardware-accelerated implementation. gh-124295: Add translation tests to the argparse module. Security gh-126623: Upgrade libexpat to 2.6.4 Library gh-127303: Publicly expose EXACT_TOKEN_TYPES in token.__all__. gh-123967: Fix faulthandler for trampoline frames. If the top-most frame is a trampoline frame, skip it. Patch by Victor Stinner. gh-127182: Fix io.StringIO.__setstate__() crash, when None was passed as the first value. gh-127217: Fix urllib.request.pathname2url() for paths starting with multiple slashes on Posix. gh-127035: Fix shutil.which on Windows. Now it looks at direct match if and only if the command ends with a PATHEXT extension or X_OK is not in mode. Support extensionless files if “.” is in PATHEXT. Support PATHEXT extensions that end with a dot. gh-127078: Fix issue where urllib.request.url2pathname() failed to discard an extra slash before a UNC drive in the URL path on Windows. gh-126766: Fix issue where urllib.request.url2pathname() failed to discard any ‘localhost’ authority present in the URL. gh-126997: Fix support of STRING and GLOBAL opcodes with non-ASCII arguments in pickletools. pickletools.dis() now outputs non-ASCII bytes in STRING, BINSTRING and SHORT_BINSTRING arguments as escaped (\xXX). gh-126618: Fix the representation of itertools.count objects when the count value is sys.maxsize. gh-85168: Fix issue where urllib.request.url2pathname() and pathname2url() always used UTF-8 when quoting and unquoting file URIs. They now use the filesystem encoding and error handler. gh-67877: Fix memory leaks when regular expression matching terminates abruptly, either because of a signal or because memory allocation fails. gh-126789: Fixed the values of sysconfig.get_config_vars(), sysconfig.get_paths(), and their siblings when the site initialization happens after sysconfig has built a cache for sysconfig.get_config_vars(). gh-126188: Update bundled pip to 24.3.1 gh-126766: Fix issue where urllib.request.url2pathname() failed to discard two leading slashes introducing an empty authority section. gh-126727: locale.nl_langinfo(locale.ERA) now returns multiple era description segments separated by semicolons. Previously it only returned the first segment on platforms with Glibc. gh-126699: Allow collections.abc.AsyncIterator to be a base for Protocols. gh-104745: Limit starting a patcher (from unittest.mock.patch() or unittest.mock.patch.object()) more than once without stopping it gh-126595: Fix a crash when instantiating itertools.count with an initial count of sys.maxsize on debug builds. Patch by Bénédikt Tran. gh-120423: Fix issue where urllib.request.pathname2url() mishandled Windows paths with embedded forward slashes. gh-126565: Improve performances of zipfile.Path.open() for non-reading modes. gh-126505: Fix bugs in compiling case-insensitive regular expressions with character classes containing non-BMP characters: upper-case non-BMP character did was ignored and the ASCII flag was ignored when matching a character range whose upper bound is beyond the BMP region. gh-117378: Fixed the multiprocessing "forkserver" start method forkserver process to correctly inherit the parent’s sys.path during the importing of multiprocessing.set_forkserver_preload() modules in the same manner as sys.path is configured in workers before executing work items. This bug caused some forkserver module preloading to silently fail to preload. This manifested as a performance degration in child processes when the sys.path was required due to additional repeated work in every worker. It could also have a side effect of "" remaining in sys.path during forkserver preload imports instead of the absolute path from os.getcwd() at multiprocessing import time used in the worker sys.path. The sys.path differences between phases in the child process could potentially have caused preload to import incorrect things from the wrong location. We are unaware of that actually having happened in practice. gh-125679: The multiprocessing.Lock and multiprocessing.RLock repr values no longer say “unknown” on macOS. gh-126476: Raise calendar.IllegalMonthError (now a subclass of IndexError) for calendar.month() when the input month is not correct. gh-126489: The Python implementation of pickle no longer calls pickle.Pickler.persistent_id() for the result of persistent_id(). gh-126303: Fix pickling and copying of os.sched_param objects. gh-126138: Fix a use-after-free crash on asyncio.Task objects whose underlying coroutine yields an object that implements an evil __getattribute__(). Patch by Nico Posada. gh-126220: Fix crash in cProfile.Profile and _lsprof.Profiler when their callbacks were directly called with 0 arguments. gh-126212: Fix issue where urllib.request.pathname2url() and url2pathname() removed slashes from Windows DOS drive paths and URLs. gh-126205: Fix issue where urllib.request.pathname2url() generated URLs beginning with four slashes (rather than two) when given a Windows UNC path. gh-126105: Fix a crash in ast when the ast.AST._fields attribute is deleted. gh-126106: Fixes a possible NULL pointer dereference in ssl. gh-126080: Fix a use-after-free crash on asyncio.Task objects for which the underlying event loop implements an evil __getattribute__(). Reported by Nico-Posada. Patch by Bénédikt Tran. gh-126083: Fixed a reference leak in asyncio.Task objects when reinitializing the same object with a non-None context. Patch by Nico Posada. gh-125984: Fix use-after-free crashes on asyncio.Future objects for which the underlying event loop implements an evil __getattribute__(). Reported by Nico-Posada. Patch by Bénédikt Tran. gh-125969: Fix an out-of-bounds crash when an evil asyncio.loop.call_soon() mutates the length of the internal callbacks list. Patch by Bénédikt Tran. gh-125966: Fix a use-after-free crash in asyncio.Future.remove_done_callback(). Patch by Bénédikt Tran. gh-125789: Fix possible crash when mutating list of callbacks returned by asyncio.Future._callbacks. It now always returns a new copy in C implementation _asyncio. Patch by Kumar Aditya. gh-124452: Fix an issue in email.policy.EmailPolicy.header_source_parse() and email.policy.Compat32.header_source_parse() that introduced spurious leading whitespaces into header values when the header includes a newline character after the header name delimiter (:) and before the value. gh-125884: Fixed the bug for pdb where it can’t set breakpoints on functions with certain annotations. gh-125355: Fix several bugs in argparse.ArgumentParser.parse_intermixed_args(). The parser no longer changes temporarily during parsing. Default values are not processed twice. Required mutually exclusive groups containing positional arguments are now supported. The missing arguments report now includes the names of all required optional and positional arguments. Unknown options can be intermixed with positional arguments in parse_known_intermixed_args(). gh-125682: Reject non-ASCII digits in the Python implementation of json.loads() conforming to the JSON specification. gh-125660: Reject invalid unicode escapes for Python implementation of json.loads(). gh-125259: Fix the notes removal logic for errors thrown in enum initialization. gh-125519: Improve traceback if importlib.reload() is called with an object that is not a module. Patch by Alex Waygood. gh-125451: Fix deadlock when concurrent.futures.ProcessPoolExecutor shuts down concurrently with an error when feeding a job to a worker process. gh-125422: Fixed the bug where pdb and bdb can step into the bottom caller frame. gh-100141: Fixed the bug where pdb will be stuck in an infinite loop when debugging an empty file. gh-53203: Fix time.strptime() for %c, %x and %X formats in many locales that use non-ASCII digits, like Persian, Burmese, Odia and Shan. gh-125254: Fix a bug where ArgumentError includes the incorrect ambiguous option in argparse. gh-61011: Fix inheritance of nested mutually exclusive groups from parent parser in argparse.ArgumentParser. Previously, all nested mutually exclusive groups lost their connection to the group containing them and were displayed as belonging directly to the parser. gh-52551: Fix encoding issues in time.strftime(), the strftime() method of the datetime classes datetime, date and time and formatting of these classes. Characters not encodable in the current locale are now acceptable in the format string. Surrogate pairs and sequence of surrogatescape-encoded bytes are no longer recombinated. Embedded null character no longer terminates the format string. gh-125118: Don’t copy arbitrary values to _Bool in the struct module. gh-125069: Fix an issue where providing a pathlib.PurePath object as an initializer argument to a second PurePath object with a different flavour resulted in arguments to the former object’s initializer being joined by the latter object’s flavour. gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) on platforms with glibc. Now it returns a string consisting of up to 100 semicolon-separated symbols (an empty string in most locales) on all Posix platforms. Previously it only returned the first symbol or an empty string. gh-124958: Fix refcycles in exceptions raised from asyncio.TaskGroup and the python implementation of asyncio.Future gh-53203: Fix time.strptime() for %c and %x formats in many locales: Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish, Ge’ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol, Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi, Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese. gh-124917: Allow calling os.path.exists() and os.path.lexists() with keyword arguments on Windows. Fixes a regression in 3.12.4. gh-124653: Fix detection of the minimal Queue API needed by the logging module. Patch by Bénédikt Tran. gh-124858: Fix reference cycles left in tracebacks in asyncio.open_connection() when used with happy_eyeballs_delay gh-124390: Fixed AssertionError when using asyncio.staggered.staggered_race() with asyncio.eager_task_factory. gh-124651: Properly quote template strings in venv activation scripts. gh-124594: All asyncio REPL prompts run in the same context. Contributed by Bartosz Sławecki. gh-120378: Fix a crash related to an integer overflow in curses.resizeterm() and curses.resize_term(). gh-123884: Fixed bug in itertools.tee() handling of other tee inputs (a tee in a tee). The output now has the promised n independent new iterators. Formerly, the first iterator was identical (not independent) to the input iterator. This would sometimes give surprising results. gh-123978: Remove broken time.thread_time() and time.thread_time_ns() on NetBSD. gh-124008: Fix possible crash (in debug build), incorrect output or returning incorrect value from raw binary write() when writing to console on Windows. gh-123370: Fix the canvas not clearing after running turtledemo clock. gh-120754: Update unbounded read calls in zipfile to specify an explicit size putting a limit on how much data they may read. This also updates handling around ZIP max comment size to match the standard instead of reading comments that are one byte too long. gh-70764: Fixed an issue where inspect.getclosurevars() would incorrectly classify an attribute name as a global variable when the name exists both as an attribute name and a global variable. gh-119826: Always return an absolute path for os.path.abspath() on Windows. gh-117766: Always use str() to print choices in argparse. gh-101955: Fix SystemError when match regular expression pattern containing some combination of possessive quantifier, alternative and capture group. gh-88110: Fixed multiprocessing.Process reporting a .exitcode of 1 even on success when using the "fork" start method while using a concurrent.futures.ThreadPoolExecutor. gh-71936: Fix a race condition in multiprocessing.pool.Pool. bpo-46128: Strip unittest.IsolatedAsyncioTestCase stack frames from reported stacktraces. bpo-14074: Fix argparse metavar processing to allow positional arguments to have a tuple metavar. IDLE gh-122392: Increase currently inadequate vertical spacing for the IDLE browsers (path, module, and stack) on high-resolution monitors. Documentation gh-125277: Require Sphinx 7.2.6 or later to build the Python documentation. Patch by Adam Turner. gh-125018: The importlib.metadata documentation now includes semantic cross-reference targets for the significant documented APIs. This means intersphinx references like importlib.metadata.version() will now work as expected. gh-121277: Writers of CPython’s documentation can now use next as the version for the versionchanged, versionadded, deprecated directives. gh-60712: Include the object type in the lists of documented types. Change by Furkan Onder and Martin Panter. Core and Builtins gh-113841: Fix possible undefined behavior division by zero in complex’s _Py_c_pow(). gh-126341: Now ValueError is raised instead of SystemError when trying to iterate over a released memoryview object. gh-126066: Fix importlib to not write an incomplete .pyc files when a ulimit or some other operating system mechanism is preventing the write to go through fully. gh-126139: Provide better error location when attempting to use a future statement with an unknown future feature. gh-125008: Fix tokenize.untokenize() producing invalid syntax for double braces preceded by certain escape characters. gh-123378: Fix a crash in the __str__() method of UnicodeError objects when the UnicodeError.start and UnicodeError.end values are invalid or out-of-range. Patch by Bénédikt Tran. gh-116510: Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. gh-118950: Fix bug where SSLProtocol.connection_lost wasn’t getting called when OSError was thrown on writing to socket. gh-113570: Fixed a bug in reprlib.repr where it incorrectly called the repr method on shadowed Python built-in types. gh-109746: If _thread.start_new_thread() fails to start a new thread, it deletes its state from interpreter and thus avoids its repeated cleanup on finalization. C API gh-113601: Removed debug build assertions related to interning strings, which were falsely triggered by stable ABI extensions. Build gh-89640: Hard-code float word ordering as little endian on WASM. gh-89640: Improve detection of float word ordering on Linux when link-time optimizations are enabled.
*: recursive bump for icu 76 shlib major version bump
*: revbump for icu downgrade
*: recursive bump for icu 76.1 shlib bump
python312 py312-html-docs: updated to 3.12.4 Python 3.12.4 Security gh-118486: os.mkdir() on Windows now accepts mode of 0o700 to restrict the new directory to the current user. This fixes CVE-2024-4030 affecting tempfile.mkdtemp() in scenarios where the base temporary directory is more permissive than the default. gh-116741: Update bundled libexpat to 2.6.2 gh-117233: Detect BLAKE2, SHA3, Shake, & truncated SHA512 support in the OpenSSL-ish libcrypto library at build time. This allows hashlib to be used with libraries that do not to support every algorithm that upstream OpenSSL does. Core and Builtins gh-119821: Fix execution of annotation scopes within classes when globals is set to a non-dict. Patch by Jelle Zijlstra. gh-118263: Speed up os.path.normpath() with a direct C call. gh-119311: Fix bug where names are unexpectedly mangled in the bases of generic classes. gh-119395: Fix bug where names appearing after a generic class are mangled as if they are in the generic class. gh-118507: Fix os.path.isfile() on Windows for pipes. gh-119213: Non-builtin modules built with argument clinic were crashing if used in a subinterpreter before the main interpreter. The objects that were causing the problem by leaking between interpreters carelessly have been fixed. gh-119011: Fixes type.__type_params__ to return an empty tuple instead of a descriptor. gh-118997: Fix _Py_ClearImmortal() assertion: use _Py_IsImmortal() to tolerate reference count lower than _Py_IMMORTAL_REFCNT. Fix the assertion for the stable ABI, when a C extension is built with Python 3.11 or lower. Patch by Victor Stinner. gh-118513: Fix incorrect UnboundLocalError when two comprehensions in the same function both reference the same name, and in one comprehension the name is bound while in the other it’s an implicit global. gh-118164: Break a loop between the Python implementation of the decimal module and the Python code for integer to string conversion. Also optimize integer to string conversion for values in the range from 9_000 to 135_000 decimal digits. gh-118272: Fix bug where generator.close does not free the generator frame’s locals. gh-116767: Fix crash in compiler on ‘async with’ that has many context managers. gh-117894: Prevent agen.aclose() objects being re-used after .throw(). gh-117881: prevent concurrent access to an async generator via athrow().throw() or asend().throw() gh-115874: Fixed a possible segfault during garbage collection of _asyncio.FutureIter objects Library gh-119819: Fix regression to allow logging configuration with multiprocessing queue types. gh-89727: Fix issue with shutil.rmtree() where a RecursionError is raised on deep directory trees. gh-89727: Partially fix issue with shutil.rmtree() where a RecursionError is raised on deep directory trees. A recursion error is no longer raised when rmtree.avoids_symlink_attacks is false. gh-119118: Fix performance regression in the tokenize module by caching the line token attribute and calculating the column offset more efficiently. gh-89727: Fix issue with os.fwalk() where a RecursionError was raised on deep directory trees by adjusting the implementation to be iterative instead of recursive. gh-113892: Now, the method sock_connect of asyncio.ProactorEventLoop raises a ValueError if given socket is not in non-blocking mode, as well as in other loop implementations. gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry Patch by Wulian233 and Terry Jan Reedy gh-118643: Fix an AttributeError in the email module when re-fold a long address list. Also fix more cases of incorrect encoding of the address separator in the address list. gh-58933: Make pdb return to caller frame correctly when f_trace of the caller frame is not set gh-118868: Fixed issue where kwargs were no longer passed to the logging handler QueueHandler gh-118164: The Python implementation of the decimal module could appear to hang in relatively small power cases (like 2**117) if context precision was set to a very high value. A different method to check for exactly representable results is used now that doesn’t rely on computing 10**precision (which could be effectively too large to compute). gh-118404: Fix inspect.signature() for non-comparable callables. gh-118314: Fix an edge case in binascii.a2b_base64() strict mode, where excessive padding is not detected when no padding is necessary. gh-118042: Fix an unraisable exception in telnetlib.Telnet.__del__() when the __init__() method was not called. gh-118221: Fix a bug where sqlite3.iterdump() could fail if a custom row factory was used. Patch by Erlend Aasland. gh-118013: Fix regression introduced in gh-103193 that meant that calling inspect.getattr_static() on an instance would cause a strong reference to that instance’s class to persist in an internal cache in the inspect module. This caused unexpected memory consumption if the class was dynamically created, the class held strong references to other objects which took up a significant amount of memory, and the cache contained the sole strong reference to the class. The fix for the regression leads to a slowdown in getattr_static(), but the function should still be significantly faster than it was in Python 3.11. Patch by Alex Waygood. gh-90848: Fixed unittest.mock.create_autospec() to configure parent mock with keyword arguments. gh-118168: Fix incorrect argument substitution when typing.Unpack is used with the builtin tuple. typing.Unpack now raises TypeError when used with certain invalid types. Patch by Jelle Zijlstra. gh-118033: Fix dataclasses.dataclass() not creating a __weakref__ slot when subclassing typing.Generic. gh-117535: Do not try to get the source line for made up file name “sys” in warnings. gh-114053: Fix erroneous NameError when calling typing.get_type_hints() on a class that made use of PEP 695 type parameters in a module that had from __future__ import annotations at the top of the file. Patch by Alex Waygood. gh-117995: Don’t raise DeprecationWarning when a sequence of parameters is used to bind indexed, nameless placeholders. See also gh-100668. gh-80361: Fix TypeError in email.message.Message.get_payload() when the charset is RFC 2231 encoded. gh-86650: Fix IndexError when parse some emails with invalid Message-ID (including one-off addresses generated by Microsoft Outlook). gh-117691: Improve the error messages emitted by tarfile deprecation warnings relating to PEP 706. If a filter argument is not provided to extract() or extractall, the deprecation warning now points to the line in the user’s code where the relevant function was called. Patch by Alex Waygood. gh-77102: site module now parses .pth file with UTF-8 first, and locale encoding if UnicodeDecodeError happened. It supported only locale encoding before. gh-117692: Fixes a bug when doctest.DocTestFinder was failing on wrapped builtin_function_or_method. gh-117566: ipaddress.IPv6Address.is_loopback() will now return True for IPv4-mapped loopback addresses, i.e. addresses in the ::ffff:127.0.0.0/104 address space. gh-117503: Fix support of non-ASCII user names in bytes paths in os.path.expanduser() on Posix. gh-117313: Only treat '\n', '\r' and '\r\n' as line separators in re-folding the email messages. Preserve control characters '\v', '\f', '\x1c', '\x1d' and '\x1e' and Unicode line separators '\x85', '\u2028' and '\u2029' as is. gh-113171: Fixed various false positives and false negatives in ipaddress.IPv4Address.is_private (see these docs for details) ipaddress.IPv4Address.is_global ipaddress.IPv6Address.is_private ipaddress.IPv6Address.is_global Also in the corresponding ipaddress.IPv4Network and ipaddress.IPv6Network attributes. gh-103956: Fix lack of newline characters in trace module output when line tracing is enabled but source code line for current frame is not available. gh-92081: Fix missing spaces in email headers when the spaces are mixed with encoded 8-bit characters. gh-103194: Prepare Tkinter for C API changes in Tcl 8.7/9.0 to avoid _tkinter.Tcl_Obj being unexpectedly returned instead of bool, str, bytearray, or int. gh-87106: Fixed handling in inspect.Signature.bind() of keyword arguments having the same name as positional-only arguments when a variadic keyword argument (e.g. **kwargs) is present. bpo-45767: Fix integer conversion in os.major(), os.minor(), and os.makedev(). Support device numbers larger than 2**63-1. Support non-existent device number (NODEV). bpo-40943: Fix several IndexError when parse emails with truncated Message-ID, address, routes, etc, e.g. example@. bpo-30988: Fix parsing of emails with invalid address headers having a leading or trailing dot. Patch by tsufeki. gh-67693: Fix urllib.parse.urlunparse() and urllib.parse.urlunsplit() for URIs with path starting with multiple slashes and no authority. Based on patch by Ashwin Ramaswami. bpo-15010: unittest.TestLoader.discover() now saves the original value of unittest.TestLoader._top_level_dir and restores it at the end of the call. Documentation gh-117928: The minimum Sphinx version required for the documentation is now 6.2.1. gh-91565: Changes to documentation files and config outputs to reflect the new location for reporting bugs - i.e. GitHub rather than bugs.python.org. Tests gh-119050: regrtest test runner: Add XML support to the refleak checker (-R option). Patch by Victor Stinner. Windows gh-119690: Adds Unicode support and fixes audit events for _winapi.CreateNamedPipe. gh-119070: Fixes py.exe handling of shebangs like /usr/bin/env python3.12, which were previously interpreted as python3.exe instead of python3.12.exe. gh-118347: Fixes launcher updates not being installed. gh-115009: Update Windows installer to use SQLite 3.45.3. gh-90329: Suppress the warning displayed on virtual environment creation when the requested and created paths differ only by a short (8.3 style) name. Warnings will continue to be shown if a junction or symlink in the path caused the venv to be created in a different location than originally requested. macOS gh-115009: Update macOS installer to use SQLite 3.45.3. gh-116145: Update macOS installer to Tcl/Tk 8.6.14. IDLE bpo-34774: Use user-selected color theme for Help => IDLE Doc. C API gh-119585: Fix crash when a thread state that was created by PyGILState_Ensure() calls a destructor that during PyThreadState_Clear() that calls back into PyGILState_Ensure() and PyGILState_Release(). This might occur when in the free-threaded build or when using thread-local variables whose destructors call PyGILState_Ensure(). gh-117534: Improve validation logic in the C implementation of datetime.fromisoformat() to better handle invalid years. Patch by Vlad Efanov.
revbump after icu and protobuf updates
Add build option "readline". With its help we can build python3.12 with/without support of readline/editline. Also, always build "_dbm" module on Linux just like on other OS. Remove ".include ../../devel/gettext-lib..."
lang/python312: Add DragonFly support
python312 py312-html-docs: updated to 3.12.2 Python 3.12.2 final Security gh-113659: Skip .pth files with names starting with a dot or hidden file attribute. Core and Builtins gh-114887: Changed socket type validation in create_datagram_endpoint() to accept all non-stream sockets. This fixes a regression in compatibility with raw sockets. gh-114388: Fix a RuntimeWarning emitted when assign an integer-like value that is not an instance of int to an attribute that corresponds to a C struct member of type T_UINT and T_ULONG. Fix a double RuntimeWarning emitted when assign a negative integer value to an attribute that corresponds to a C struct member of type T_UINT. gh-113703: Fix a regression in the codeop module that was causing it to incorrectly identify incomplete f-strings. Patch by Pablo Galindo gh-89811: Check for a valid tp_version_tag before performing bytecode specializations that rely on this value being usable. gh-113602: Fix an error that was causing the parser to try to overwrite existing errors and crashing in the process. Patch by Pablo Galindo gh-113297: Fix segfault in the compiler on with statement with 19 context managers. gh-106905: Use per AST-parser state rather than global state to track recursion depth within the AST parser to prevent potential race condition due to simultaneous parsing. The issue primarily showed up in 3.11 by multithreaded users of ast.parse(). In 3.12 a change to when garbage collection can be triggered prevented the race condition from occurring. gh-112943: Correctly compute end column offsets for multiline tokens in the tokenize module. Patch by Pablo Galindo gh-112716: Fix SystemError in the import statement and in __reduce__() methods of builtin types when __builtins__ is not a dict. gh-94606: Fix UnicodeEncodeError when email.message.get_payload() reads a message with a Unicode surrogate character and the message content is not well-formed for surrogateescape encoding. Patch by Sidney Markowitz. Library gh-114965: Update bundled pip to 24.0 gh-114959: tarfile no longer ignores errors when trying to extract a directory on top of a file. gh-109475: Fix support of explicit option value “–” in argparse (e.g. --option=--). gh-110190: Fix ctypes structs with array on Windows ARM64 platform by setting MAX_STRUCT_SIZE to 32 in stgdict. Patch by Diego Russo gh-113280: Fix a leak of open socket in rare cases when error occurred in ssl.SSLSocket creation. gh-77749: email.policy.EmailPolicy.fold() now always encodes non-ASCII characters in headers if utf8 is false. gh-114492: Make the result of termios.tcgetattr() reproducible on Alpine Linux. Previously it could leave a random garbage in some fields. gh-113267: Revert changes in gh-106584 which made calls of TestResult methods startTest() and stopTest() unbalanced. gh-75128: Ignore an OSError in asyncio.BaseEventLoop.create_server() when IPv6 is available but the interface cannot actually support it. gh-114257: Dismiss the FileNotFound error in ctypes.util.find_library() and just return None on Linux. gh-114328: The tty.setcbreak() and new tty.cfmakecbreak() no longer clears the terminal input ICRLF flag. This fixes a regression introduced in 3.12 that no longer matched how OSes define cbreak mode in their stty(1) manual pages. gh-101438: Avoid reference cycle in ElementTree.iterparse. The iterator returned by ElementTree.iterparse may hold on to a file descriptor. The reference cycle prevented prompt clean-up of the file descriptor if the returned iterator was not exhausted. gh-104522: OSError raised when run a subprocess now only has filename attribute set to cwd if the error was caused by a failed attempt to change the current directory. gh-114149: Enum: correctly handle tuple subclasses in custom __new__. gh-109534: Fix a reference leak in asyncio.selector_events.BaseSelectorEventLoop when SSL handshakes fail. Patch contributed by Jamie Phan. gh-114077: Fix possible OverflowError in socket.socket.sendfile() when pass count larger than 2 GiB on 32-bit platform. gh-114014: Fixed a bug in fractions.Fraction where an invalid string using d in the decimals part creates a different error compared to other invalid letters/characters. Patch by Jeremiah Gabriel Pascual. gh-113951: Fix the behavior of tag_unbind() methods of tkinter.Text and tkinter.Canvas classes with three arguments. Previously, widget.tag_unbind(tag, 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. gh-113877: Fix tkinter method winfo_pathname() on 64-bit Windows. gh-113661: unittest runner: Don’t exit 5 if tests were skipped. The intention of exiting 5 was to detect issues where the test suite wasn’t discovered at all. If we skipped tests, it was correctly discovered. gh-113781: Silence unraisable AttributeError when warnings are emitted during Python finalization. gh-112932: Restore the ability for zipfile to extractall from zip files with a “/” directory entry in them as is commonly added to zips by some wiki or bug tracker data exporters. gh-113594: Fix UnicodeEncodeError in email when re-fold lines that contain unknown-8bit encoded part followed by non-unknown-8bit encoded part. gh-113538: In asyncio.StreamReaderProtocol.connection_made(), there is callback that logs an error if the task wrapping the “connected callback” fails. This callback would itself fail if the task was cancelled. Prevent this by checking whether the task was cancelled first. If so, close the transport but don’t log an error. gh-85567: Fix resource warnings for unclosed files in pickle and pickletools command line interfaces. gh-101225: Increase the backlog for multiprocessing.connection.Listener objects created by multiprocessing.manager and multiprocessing.resource_sharer to significantly reduce the risk of getting a connection refused error when creating a multiprocessing.connection.Connection to them. gh-113543: Make sure that webbrowser.MacOSXOSAScript sends webbrowser.open audit event. gh-113028: When a second reference to a string appears in the input to pickle, and the Python implementation is in use, we are guaranteed that a single copy gets pickled and a single object is shared when reloaded. Previously, in protocol 0, when a string contained certain characters (e.g. newline) it resulted in duplicate objects. gh-113421: Fix multiprocessing logger for %(filename)s. gh-111784: Fix segfaults in the _elementtree module. Fix first segfault during deallocation of _elementtree.XMLParser instances by keeping strong reference to pyexpat module in module state for capsule lifetime. Fix second segfault which happens in the same deallocation process by keeping strong reference to _elementtree module in XMLParser structure for _elementtree module lifetime. gh-113407: Fix import of unittest.mock when CPython is built without docstrings. gh-113320: Fix regression in Python 3.12 where Protocol classes that were not marked as runtime-checkable would be unnecessarily introspected, potentially causing exceptions to be raised if the protocol had problematic members. Patch by Alex Waygood. gh-113358: Fix rendering tracebacks for exceptions with a broken __getattr__. gh-113214: Fix an AttributeError during asyncio SSL protocol aborts in SSL-over-SSL scenarios. gh-113246: Update bundled pip to 23.3.2. gh-113199: Make http.client.HTTPResponse.read1 and http.client.HTTPResponse.readline close IO after reading all data when content length is known. Patch by Illia Volochii. gh-113188: Fix shutil.copymode() and shutil.copystat() on Windows. Previously they worked differenly if dst is a symbolic link: they modified the permission bits of dst itself rather than the file it points to if follow_symlinks is true or src is not a symbolic link, and did not modify the permission bits if follow_symlinks is false and src is a symbolic link. gh-61648: Detect line numbers of properties in doctests. gh-112559: signal.signal() and signal.getsignal() no longer call repr on callable handlers. asyncio.run() and asyncio.Runner.run() no longer call repr on the task results. Patch by Yilei Yang. gh-110190: Fix ctypes structs with array on PPC64LE platform by setting MAX_STRUCT_SIZE to 64 in stgdict. Patch by Diego Russo. gh-79429: Ignore FileNotFoundError when remove a temporary directory in the multiprocessing finalizer. gh-81194: Fix a crash in socket.if_indextoname() with specific value (UINT_MAX). Fix an integer overflow in socket.if_indextoname() on 64-bit non-Windows platforms. gh-112343: Improve handling of pdb convenience variables to avoid replacing string contents. gh-111615: Fix a regression caused by a fix to gh-93162 whereby you couldn’t configure a QueueHandler without specifying handlers. gh-111049: Fix crash during garbage collection of the io.BytesIO buffer object. gh-110345: Show the Tcl/Tk patchlevel (rather than version) in tkinter._test(). gh-109858: Protect zipfile from “quoted-overlap” zipbomb. It now raises BadZipFile when try to read an entry that overlaps with other entry or central directory. gh-114440: On Windows, closing the connection writer when cleaning up a broken multiprocessing.Queue queue is now done for all queues, rather than only in concurrent.futures manager thread. This can prevent a deadlock when a multiprocessing worker process terminates without cleaning up. This completes the backport of patches by Victor Stinner and Serhiy Storchaka. gh-38807: Fix race condition in trace. Instead of checking if a directory exists and creating it, directly call os.makedirs() with the kwarg exist_ok=True. gh-75705: Set unixfrom envelope in mailbox.mbox and mailbox.MMDF. gh-106233: Fix stacklevel in InvalidTZPathWarning during zoneinfo module import. gh-105102: Allow ctypes.Union to be nested in ctypes.Structure when the system endianness is the opposite of the classes. gh-104282: Fix null pointer dereference in lzma._decode_filter_properties() due to improper handling of BCJ filters with properties of zero length. Patch by Radislav Chugunov. gh-102512: When os.fork() is called from a foreign thread (aka _DummyThread), the type of the thread in a child process is changed to _MainThread. Also changed its name and daemonic status, it can be now joined. bpo-35928: io.TextIOWrapper now correctly handles the decoding buffer after read() and write(). bpo-26791: shutil.move() now moves a symlink into a directory when that directory is the target of the symlink. This provides the same behavior as the mv shell command. The previous behavior raised an exception. Patch by Jeffrey Kintscher. bpo-36959: Fix some error messages for invalid ISO format string combinations in strptime() that referred to directives not contained in the format string. Patch by Gordon P. Hemsley. bpo-18060: Fixed a class inheritance issue that can cause segfaults when deriving two or more levels of subclasses from a base class of Structure or Union. Documentation gh-110746: Improved markup for valid options/values for methods ttk.treeview.column and ttk.treeview.heading, and for Layouts. gh-95649: Document that the asyncio module contains code taken from v0.16.0 of the uvloop project, as well as the required MIT licensing information. Tests gh-109980: Fix test_tarfile_vs_tar in test_shutil for macOS, where system tar can include more information in the archive than shutil.make_archive. gh-105089: Fix test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write test in AIX by doing a bitwise AND of 0xFFFF on mode , so that it will be in sync with zinfo.external_attr bpo-40648: Test modes that file can get with chmod() on Windows. Build gh-112305: Fixed the check-clean-src step performed on out of tree builds to detect errant $(srcdir)/Python/frozen_modules/*.h files and recommend appropriate source tree cleanup steps to get a working build again. gh-112867: Fix the build for the case that WITH_PYMALLOC_RADIX_TREE=0 set. bpo-11102: The os.major(), os.makedev(), and os.minor() functions are now available on HP-UX v3. bpo-36351: Do not set ipv6type when cross-compiling. Windows gh-109991: Update Windows build to use OpenSSL 3.0.13. gh-111239: Update Windows builds to use zlib v1.3.1. gh-100107: The py.exe launcher will no longer attempt to run the Microsoft Store redirector when launching a script containing a /usr/bin/env shebang gh-114096: Process privileges that are activated for creating directory junctions are now restored afterwards, avoiding behaviour changes in other parts of the program. gh-111877: os.stat() calls were returning incorrect time values for files that could not be accessed directly. gh-113009: multiprocessing: On Windows, fix a race condition in Process.terminate(): no longer set the returncode attribute to always call WaitForSingleObject() in Process.wait(). Previously, sometimes the process was still running after TerminateProcess() even if GetExitCodeProcess() is not STILL_ACTIVE. Patch by Victor Stinner. gh-87868: Correctly sort and remove duplicate environment variables in _winapi.CreateProcess(). bpo-37308: Fix mojibake in mmap.mmap when using a non-ASCII tagname argument on Windows. macOS gh-115009: Update macOS installer to use SQLite 3.45.1. gh-109991: Update macOS installer to use OpenSSL 3.0.13. gh-110459: Running configure ... --with-openssl-rpath=X/Y/Z no longer fails to detect OpenSSL on macOS. gh-74573: Document that dbm.ndbm can silently corrupt DBM files on updates when exceeding undocumented platform limits, and can crash (segmentation fault) when reading such a corrupted file. (FB8919203) gh-65701: The freeze tool doesn’t work with framework builds of Python. Document this and bail out early when running the tool with such a build. gh-108269: Set CFBundleAllowMixedLocalizations to true in the Info.plist for the framework, embedded Python.app and IDLE.app with framework installs on macOS. This allows applications to pick up the user’s preferred locale when that’s different from english. gh-102362: Make sure the result of sysconfig.get_plaform() includes at least a major and minor versions, even if MACOSX_DEPLOYMENT_TARGET is set to only a major version during build to match the format expected by pip. gh-110017: Disable a signal handling stress test on macOS due to a bug in macOS (FB13453490). gh-110820: Make sure the preprocessor definitions for ALIGNOF_MAX_ALIGN_T, SIZEOF_LONG_DOUBLE and HAVE_GCC_ASM_FOR_X64 are correct for Universal 2 builds on macOS. IDLE gh-96905: In idlelib code, stop redefining built-ins ‘dict’ and ‘object’. gh-72284: Improve the lists of features, editor key bindings, and shell key bingings in the IDLE doc. gh-113903: Fix rare failure of test.test_idle, in test_configdialog. gh-113729: Fix the “Help -> IDLE Doc” menu bug in 3.11.7 and 3.12.1. gh-113269: Fix test_editor hang on macOS Catalina. gh-112898: Fix processing unsaved files when quitting IDLE on macOS. gh-103820: Revise IDLE bindings so that events from mouse button 4/5 on non-X11 windowing systems (i.e. Win32 and Aqua) are not mistaken for scrolling. bpo-13586: Enter the selected text when opening the “Replace” dialog. Tools/Demos gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13 and multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1. gh-115015: Fix a bug in Argument Clinic that generated incorrect code for methods with no parameters that use the METH_METHOD | METH_FASTCALL | METH_KEYWORDS calling convention. Only the positional parameter count was checked; any keyword argument passed would be silently accepted.
lang/python312: fix NIS detection This ensures the configure script finds the NIS headers just like the Makefile did by adding include directories.
python312 py312-html-docs: updated to 3.12.1 Python 3.12.1 final Core and Builtins gh-112125: Fix None.__ne__(None) returning NotImplemented instead of False gh-112625: Fixes a bug where a bytearray object could be cleared while iterating over an argument in the bytearray.join() method that could result in reading memory after it was freed. gh-105967: Workaround a bug in Apple’s macOS platform zlib library where zlib.crc32() and binascii.crc32() could produce incorrect results on multi-gigabyte inputs. Including when using zipfile on zips containing large data. gh-112356: Stopped erroneously deleting a LOAD_NULL bytecode instruction when optimized twice. gh-111058: Change coro.cr_frame/gen.gi_frame to return None after the coroutine/generator has been closed. This fixes a bug where getcoroutinestate() and getgeneratorstate() return the wrong state for a closed coroutine/generator. gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors. Patch by pablo Galindo gh-112387: Fix error positions for decoded strings with backwards tokenize errors. Patch by Pablo Galindo gh-112367: Avoid undefined behaviour when using the perf trampolines by not freeing the code arenas until shutdown. Patch by Pablo Galindo gh-112243: Don’t include comments in f-string debug expressions. Patch by Pablo Galindo gh-112266: Change docstrings of __dict__ and __weakref__. gh-111654: Fix runtime crash when some error happens in opcode LOAD_FROM_DICT_OR_DEREF. gh-109181: Speed up Traceback object creation by lazily compute the line number. Patch by Pablo Galindo gh-102388: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds gh-111366: Fix an issue in the codeop that was causing SyntaxError exceptions raised in the presence of invalid syntax to not contain precise error messages. Patch by Pablo Galindo gh-111380: Fix a bug that was causing SyntaxWarning to appear twice when parsing if invalid syntax is encountered later. Patch by Pablo galindo gh-94438: Fix a regression that prevented jumping across is None and is not None when debugging. Patch by Savannah Ostrowski. gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters. Patch by Pablo Galindo gh-109894: Fixed crash due to improperly initialized static MemoryError in subinterpreter. gh-110782: Fix crash when typing.TypeVar is constructed with a keyword argument. Patch by Jelle Zijlstra. gh-110696: Fix incorrect error message for invalid argument unpacking. Patch by Pablo Galindo gh-110543: Fix regression in Python 3.12 where 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. gh-110514: Add PY_THROW to sys.setprofile() events gh-110455: Guard assert(tstate->thread_id > 0) with #ifndef HAVE_PTHREAD_STUBS. This allows for for pydebug builds to work under WASI which (currently) lacks thread support. gh-110259: Correctly identify the format spec in f-strings (with single or triple quotes) that have multiple lines in the expression part and include a formatting spec. Patch by Pablo Galindo gh-110237: Fix missing error checks for calls to PyList_Append in _PyEval_MatchClass. gh-109889: Fix the compiler’s redundant NOP detection algorithm to skip over NOPs with no line number when looking for the next instruction’s lineno. gh-109853: sys.path[0] is now set correctly for subinterpreters. gh-105716: Subinterpreters now correctly handle the case where they have threads running in the background. Before, such threads would interfere with cleaning up and destroying them, as well as prevent running another script. gh-109793: The main thread no longer exits prematurely when a subinterpreter is cleaned up during runtime finalization. The bug was a problem particularly because, when triggered, the Python process would always return with a 0 exitcode, even if it failed. gh-109596: Fix some tokens in the grammar that were incorrectly marked as soft keywords. Also fix some repeated rule names and ensure that repeated rules are not allowed. Patch by Pablo Galindo gh-109351: Fix crash when compiling an invalid AST involving a named (walrus) expression. gh-109216: Fix possible memory leak in BUILD_MAP. gh-109207: Fix a SystemError in __repr__ of symtable entry object. gh-109179: Fix bug where the C traceback display drops notes from SyntaxError. gh-109052: Use the base opcode when comparing code objects to avoid interference from instrumentation gh-88943: Improve syntax error for non-ASCII character that follows a numerical literal. It now points on the invalid non-ASCII character, not on the valid numerical literal. gh-106931: Statically allocated string objects are now interned globally instead of per-interpreter. This fixes a situation where such a string would only be interned in a single interpreter. Normal string objects are unaffected. Library gh-79325: Fix an infinite recursion error in tempfile.TemporaryDirectory() cleanup on Windows. gh-112645: Remove deprecation error on passing onerror to shutil.rmtree(). gh-112618: Fix a caching bug relating to typing.Annotated. Annotated[str, True] is no longer identical to Annotated[str, 1]. gh-112334: Fixed a performance regression in 3.12’s subprocess on Linux where it would no longer use the fast-path vfork() system call when it should have due to a logic bug, instead always falling back to the safe but slower fork(). Also fixed a related 3.12 security regression: If a value of extra_groups=[] was passed to subprocess.Popen or related APIs, the underlying setgroups(0, NULL) system call to clear the groups list would not be made in the child process prior to exec(). This has been assigned CVE-2023-6507. This was identified via code inspection in the process of fixing the first bug. gh-110190: Fix ctypes structs with array on Arm platform by setting MAX_STRUCT_SIZE to 32 in stgdict. Patch by Diego Russo. gh-112578: Fix a spurious RuntimeWarning when executing the zipfile module. gh-112509: Fix edge cases that could cause a key to be present in both the __required_keys__ and __optional_keys__ attributes of a typing.TypedDict. Patch by Jelle Zijlstra. gh-112414: Fix regression in Python 3.12 where calling repr() on a module that had been imported using a custom loader could fail with AttributeError. Patch by Alex Waygood. gh-112358: Revert change to struct.Struct initialization that broke some cases of subclassing. gh-94722: Fix bug where comparison between instances of DocTest fails if one of them has None as its lineno. gh-112105: Make readline.set_completer_delims() work with libedit gh-111942: Fix SystemError in the TextIOWrapper constructor with non-encodable “errors” argument in non-debug mode. gh-109538: Issue warning message instead of having RuntimeError be displayed when event loop has already been closed at StreamWriter.__del__(). gh-111942: Fix crashes in io.TextIOWrapper.reconfigure() when pass invalid arguments, e.g. non-string encoding. gh-111460: curses: restore wide character support (including curses.unget_wch() and get_wch()) on macOS, which was unavailable due to a regression in Python 3.12. gh-103791: contextlib.suppress now supports suppressing exceptions raised as part of a BaseExceptionGroup, in addition to the recent support for ExceptionGroup. gh-111804: Remove posix.fallocate() under WASI as the underlying posix_fallocate() is not available in WASI preview2. gh-111841: Fix truncating arguments on an embedded null character in os.putenv() and os.unsetenv() on Windows. gh-111541: Fix doctest for SyntaxError not-builtin subclasses. gh-110894: Call loop exception handler for exceptions in client_connected_cb of asyncio.start_server() so that applications can handle it. Patch by Kumar Aditya. gh-111531: Fix reference leaks in bind_class() and bind_all() methods of tkinter widgets. gh-111356: Added io.text_encoding(), io.DEFAULT_BUFFER_SIZE, and io.IncrementalNewlineDecoder to io.__all__. gh-111342: Fixed typo in math.sumprod(). gh-68166: Remove mention of not supported “vsapi” element type in tkinter.ttk.Style.element_create(). Add tests for element_create() and other ttk.Style methods. Add examples for element_create() in the documentation. gh-75666: Fix the behavior of tkinter widget’s unbind() 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. gh-79033: Another attempt at fixing 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.) gh-111295: Fix time not checking for errors when initializing. gh-111253: Add error checking during _socket module init. gh-111251: Fix _blake2 not checking for errors when initializing. gh-111174: Fix crash in io.BytesIO.getbuffer() called repeatedly for empty BytesIO. gh-111187: Postpone removal version for locale.getdefaultlocale() to Python 3.15. gh-111159: Fix doctest output comparison for exceptions with notes. gh-110910: Fix invalid state handling in asyncio.TaskGroup and asyncio.Timeout. They now raise proper RuntimeError if they are improperly used and are left in consistent state after this. gh-111092: Make turtledemo run without default root enabled. gh-110488: Fix a couple of issues in pathlib.PurePath.with_name(): a single dot was incorrectly considered a valid name, and in PureWindowsPath, a name with an NTFS alternate data stream, like a:b, was incorrectly considered invalid. gh-110392: Fix tty.setraw() and tty.setcbreak(): previously they returned partially modified list of the original tty attributes. tty.cfmakeraw() and tty.cfmakecbreak() now make a copy of the list of special characters before modifying it. gh-110590: Fix a bug in _sre.compile() where TypeError would be overwritten by OverflowError when the code argument was a list of non-ints. gh-65052: Prevent pdb from crashing when trying to display undisplayable objects gh-110519: Deprecation warning about non-integer number in gettext now alwais refers to the line in the user code where gettext function or method is used. Previously it could refer to a line in gettext code. gh-110395: Ensure that select.kqueue() objects correctly appear as closed in forked children, to prevent operations on an invalid file descriptor. gh-110378: contextmanager() and asynccontextmanager() context managers now close an invalid underlying generator object that yields more then one value. gh-110365: Fix termios.tcsetattr() bug that was overwritting existing errors during parsing integers from term list. gh-109653: Fix a Python 3.12 regression in the import time of random. Patch by Alex Waygood. gh-110196: Add __reduce__ method to IPv6Address in order to keep scope_id gh-110036: On Windows, multiprocessing Popen.terminate() now catchs PermissionError and get the process exit code. If the process is still running, raise again the PermissionError. Otherwise, the process terminated as expected: store its exit code. Patch by Victor Stinner. gh-110038: Fixed an issue that caused KqueueSelector.select() to not return all the ready events in some cases when a file descriptor is registered for both read and write. gh-109631: re functions such as re.findall(), re.split(), re.search() and re.sub() which perform short repeated matches can now be interrupted by user. gh-109747: Improve errors for unsupported look-behind patterns. Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. gh-109818: Fix reprlib.recursive_repr() not copying __type_params__ from decorated function. gh-109047: 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 RuntimeError. Catch the exception and call terminate_broken() in this case. Patch by Victor Stinner. gh-109782: Ensure the signature of os.path.isdir() is identical on all platforms. Patch by Amin Alaee. gh-109590: shutil.which() will prefer files with an extension in PATHEXT 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 shutil.which() act more similarly to previous behavior in Python 3.11. gh-109786: Fix possible reference leaks and crash when re-enter the __next__() method of itertools.pairwise. gh-109593: Avoid deadlocking on a reentrant call to the multiprocessing resource tracker. Such a reentrant call, though unlikely, can happen if a GC pass invokes the finalizer for a multiprocessing object such as SemLock. gh-109613: Fix os.stat() and 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. gh-109375: The pdb alias command now prevents registering aliases without arguments. gh-107219: Fix a race condition in 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. gh-50644: Attempts to pickle or create a shallow or deep copy of 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. gh-108987: Fix _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. gh-108791: Improved error handling in pdb command line interface, making it produce more concise error messages. gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock gh-106584: Fix exit code for unittest if all tests are skipped. Patch by Egor Eliseev. gh-102956: Fix returning of empty byte strings after seek in zipfile module gh-84867: unittest.TestLoader no longer loads test cases from exact unittest.TestCase and unittest.FunctionTestCase classes. gh-91133: Fix a bug in tempfile.TemporaryDirectory cleanup, which now no longer dereferences symlinks when working around file system permission errors. gh-73561: Omit the interface scope from an IPv6 address when used as Host header by http.client. gh-86826: 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. bpo-43153: On Windows, 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. bpo-35332: The shutil.rmtree() function now ignores errors when calling os.close() when ignore_errors is True, and os.close() no longer retried after error. bpo-41422: Fixed memory leaks of pickle.Pickler and pickle.Unpickler involving cyclic references via the internal memo mapping. bpo-40262: The ssl.SSLSocket.recv_into() method no longer requires the buffer argument to implement __len__ and supports buffers with arbitrary item size. Documentation gh-111699: Relocate smtpd deprecation notice to its own section rather than under locale in What’s New in Python 3.12 document gh-108826: dis module command-line interface is now mentioned in documentation. Tests gh-112769: The tests now correctly compare zlib version when zlib.ZLIB_RUNTIME_VERSION contains non-integer suffixes. For example zlib-ng defines the version as 1.3.0.zlib-ng. gh-110367: Make regrtest --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. gh-111165: Remove no longer used functions run_unittest() and run_doctest() from the test.support module. gh-110932: Fix regrtest if the SOURCE_DATE_EPOCH environment variable is defined: use the variable value as the random seed. Patch by Victor Stinner. gh-110995: test_gdb: Fix detection of gdb built without Python scripting support. Patch by Victor Stinner. gh-110918: Test case matching patterns specified by options --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. gh-110647: Fix test_stress_modifying_handlers() of test_signal. Patch by Victor Stinner. gh-103053: Fix test_tools.test_freeze on FreeBSD: run “make distclean” instead of “make clean” in the copied source directory to remove also the “python” program. Patch by Victor Stinner. gh-110167: Fix a deadlock in test_socket when server fails with a timeout but the client is still running in its thread. Don’t hold a lock to call cleanup functions in doCleanups(). One of the cleanup function waits until the client completes, whereas the client could deadlock if it called addCleanup() in such situation. Patch by Victor Stinner. gh-110388: Add tests for tty. gh-81002: Add tests for termios. gh-110267: Add tests for pickling and copying PyStructSequence objects. Patched by Xuehai Pan. gh-110031: Skip test_threading tests using thread+fork if Python is built with Address Sanitizer (ASAN). Patch by Victor Stinner. gh-110088: Fix test_asyncio timeouts: don’t measure the maximum duration, a test should not measure a CI performance. Only measure the minimum duration when a task has a timeout or delay. Add CLOCK_RES to test_asyncio.utils. Patch by Victor Stinner. gh-109974: Fix race conditions in test_threading lock tests. Wait until a condition is met rather than using time.sleep() with a hardcoded number of seconds. Patch by Victor Stinner. gh-110033: Fix 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. gh-109594: Fix test_timeout() of test_concurrent_futures.test_wait. Remove the future which may or may not complete depending if it takes longer than the timeout ot not. Keep the second future which does not complete before wait() timeout. Patch by Victor Stinner. gh-109972: Split test_gdb.py file into a test_gdb package made of multiple tests, so tests can now be run in parallel. Patch by Victor Stinner. gh-103053: Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with ./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. gh-109580: Skip 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. gh-104736: Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora 38). Search patterns in gdb “bt” command output to detect when gdb fails to retrieve the traceback. For example, skip a test if Backtrace stopped: frame did not save the PC is found. Patch by Victor Stinner. gh-108927: Fixed order dependence in running tests in the same process when a test that has submodules (e.g. test_importlib) follows a test that imports its submodule (e.g. test_importlib.util) and precedes a test (e.g. test_unittest or test_compileall) that uses that submodule. Build gh-112088: Add 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) is no longer used. Patch by Victor Stinner. gh-111046: For wasi-threads, memory is now exported to fix compatibility issues with some wasm runtimes. gh-103053: “make check-clean-src” now also checks if the “python” program is found in the source directory: fail with an error if it does exist. Patch by Victor Stinner. gh-109191: Fix compile error when building with recent versions of libedit. Windows gh-111856: Fixes fstat() on file systems that do not support file ID requests. This includes FAT32 and exFAT. gh-111293: Fix os.DirEntry.inode dropping higher 64 bits of a file id on some filesystems on Windows. gh-110913: WindowsConsoleIO now correctly chunks large buffers without splitting up UTF-8 sequences. gh-110437: Allows overriding the source of VC redistributables so that releases can be guaranteed to never downgrade between updates. gh-109286: Update Windows installer to use SQLite 3.43.1. macOS gh-109981: Use /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. gh-110950: Update macOS installer to include an upstream Tcl/Tk fix for the Secure coding is not enabled for restorable state! warning encountered in Tkinter on macOS 14 Sonoma. gh-111015: Ensure that IDLE.app and Python Launcher.app are installed with appropriate permissions on macOS builds. gh-109286: Update macOS installer to use SQLite 3.43.1. gh-71383: Update macOS installer to include an upstream Tcl/Tk fix for the ttk::ThemeChanged error encountered in Tkinter. gh-92603: Update macOS installer to include a fix accepted by upstream Tcl/Tk for a crash encountered after the first tkinter.Tk() instance is destroyed. IDLE bpo-35668: Add docstrings to the IDLE debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); in Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Greatly expand test_debugger. C API gh-106560: Fix redundant declarations in the public C API. Declare PyBool_Type and PyLong_Type only once. Patch by Victor Stinner. gh-112438: Fix support of format units “es”, “et”, “es#”, and “et#” in nested tuples in PyArg_ParseTuple()-like functions. gh-109521: PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks or 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.
python*: Remove -luuid hack on SunOS. This ends up leaking into the shipped python-config, which wouldn't normally be a problem, but broken build systems such as waf end up linking against libraries that are not buildlinked, resulting in missing libuuid references. If this is still required for builtin libuuid support then that will need to be done in a different way that doesn't end up in the exported libraries.
Revert previous
python: Honour user's choice of readline implementation.
*: recursive bump for icu 74.1
Python from version 3.11 onwards requires a C11 capable compiler.
python*: needs wide curses
*: bump for openssl 3
python*: explicitly add --with-system-expat To make sure expat module is linked against expat library. Bump PKGREVISION.
python*: add SUPERSEDES
python*: include some standard modules in the base Python package As proposed on tech-pkg Bump PKGREVISION.
python312 py312-html-docs: added version 3.12.0 Python 3.12 New syntax features: PEP 695, type parameter syntax and the type statement New grammar features: PEP 701, f-strings in the grammar Interpreter improvements: PEP 684, a unique per-interpreter GIL PEP 669, low impact monitoring Improved ‘Did you mean …’ suggestions for NameError, ImportError, and SyntaxError exceptions Python data model improvements: PEP 688, using the buffer protocol from Python Significant improvements in the standard library: The pathlib.Path class now supports subclassing The os module received several improvements for Windows support A command-line interface has been added to the sqlite3 module isinstance() checks against runtime-checkable protocols enjoy a speed up of between two and 20 times The asyncio package has had a number of performance improvements, with some benchmarks showing a 75% speed up. A command-line interface has been added to the uuid module Due to the changes in PEP 701, producing tokens via the tokenize module is up to up to 64% faster. Security improvements: Replace the builtin hashlib implementations of SHA1, SHA3, SHA2-384, SHA2-512, and MD5 with formally verified code from the HACL* project. These builtin implementations remain as fallbacks that are only used when OpenSSL does not provide them. C API improvements: PEP 697, unstable C API tier PEP 683, immortal objects CPython implementation improvements: PEP 709, comprehension inlining CPython support for the Linux perf profiler Implement stack overflow protection on supported platforms New typing features: PEP 692, using TypedDict to annotate **kwargs PEP 698, typing.override() decorator Important deprecations, removals or restrictions: PEP 623: Remove wstr from Unicode objects in Python’s C API, reducing the size of every str object by at least 8 bytes. PEP 632: Remove the distutils package. See the migration guide for advice replacing the APIs it provided. The third-party Setuptools package continues to provide distutils, if you still require it in Python 3.12 and beyond. gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment. The asynchat, asyncore, and imp modules have been removed, along with several unittest.TestCase method aliases.