]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Weilin Du [Thu, 26 Jun 2025 11:41:41 +0000 (19:41 +0800)]
gh-135965: Delete duplicate word in isolating-extensions howto (#135964)
Change use use to use.
Petr Viktorin [Thu, 26 Jun 2025 11:05:01 +0000 (13:05 +0200)]
gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921)
These are private API; let's name new ones accordingly.
Petr Viktorin [Thu, 26 Jun 2025 09:48:37 +0000 (11:48 +0200)]
gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)
Peter Bierma [Thu, 26 Jun 2025 09:43:08 +0000 (05:43 -0400)]
gh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)
Petr Viktorin [Thu, 26 Jun 2025 07:25:41 +0000 (09:25 +0200)]
gh-131591: Add Py_ prefix to MAX_SCRIPT_PATH_SIZE; remove unprefixed struct tag (GH-135924)
Names/macros defined in public headers should have `Py`/`_Py` prefixes.
Terry Jan Reedy [Thu, 26 Jun 2025 03:44:08 +0000 (23:44 -0400)]
gh-135956: Remove duplicate word in _pydatetime docstring (#135957)
_pydatetime.isoformat docstring repeats 'giving'.
Neil Schemenauer [Thu, 26 Jun 2025 03:03:24 +0000 (20:03 -0700)]
Add whatsnew text for warnings module changes. (gh-135869)
Stan Ulbrych [Thu, 26 Jun 2025 03:01:25 +0000 (04:01 +0100)]
gh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)
Rob Reynolds [Wed, 25 Jun 2025 17:40:00 +0000 (11:40 -0600)]
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)
Paragraph should not be under `slice.step`. It applies to the whole class.
---------
Co-authored-by: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com>
Joseph Tibbertsma [Wed, 25 Jun 2025 16:41:36 +0000 (09:41 -0700)]
Fix needless spinning in `_PyMutex_LockTimed` with zero timeout (gh-135872)
The free threading build could spin unnecessarily on `_Py_yield()` if the initial
compare and swap failed.
Ken Jin [Wed, 25 Jun 2025 15:02:53 +0000 (23:02 +0800)]
gh-135927: Fix MSVC Clatest C builds (GH-135935)
HarryLHW [Wed, 25 Jun 2025 14:24:58 +0000 (22:24 +0800)]
Docs: Add cross-reference for `positional_item` in the `calls` productionlist (GH-129977)
Add missing hyperlink for `positional_item`
sobolevn [Wed, 25 Jun 2025 14:17:02 +0000 (17:17 +0300)]
gh-135839: Fix `module_traverse` and `module_clear` in subinterp modules (#135937)
Petr Viktorin [Wed, 25 Jun 2025 11:51:32 +0000 (13:51 +0200)]
gh-131591: Make --without-remote-debug work (GH-135925)
The feature is checked using `defined(Py_REMOTE_DEBUG)`; defining
the macro (even as `0`) enables it.
Petr Viktorin [Wed, 25 Jun 2025 11:03:05 +0000 (13:03 +0200)]
gh-135755: Move SPECIAL_ constants to a private header (GH-135922)
Macros without a `Py`/`_Py` prefix should not be defined in public headers.
sobolevn [Wed, 25 Jun 2025 08:54:42 +0000 (11:54 +0300)]
gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (#135840)
Peter Bierma [Wed, 25 Jun 2025 08:44:55 +0000 (04:44 -0400)]
gh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH-135762)
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Neil Schemenauer [Wed, 25 Jun 2025 07:06:32 +0000 (00:06 -0700)]
GH-133136: Revise QSBR to reduce excess memory held (gh-135473)
The free threading build uses QSBR to delay the freeing of dictionary
keys and list arrays when the objects are accessed by multiple threads
in order to allow concurrent reads to proceed with holding the object
lock. The requests are processed in batches to reduce execution
overhead, but for large memory blocks this can lead to excess memory
usage.
Take into account the size of the memory block when deciding when to
process QSBR requests.
Also track the amount of memory being held by QSBR for mimalloc pages. Advance the write sequence if this memory exceeds a limit. Advancing the sequence will allow it to be freed more quickly.
Process the held QSBR items from the "eval breaker", rather than from `_PyMem_FreeDelayed()`. This gives a higher chance that the global read sequence has advanced enough so that items can be freed.
Co-authored-by: Sam Gross <colesbury@gmail.com>
Vinay Sajip [Wed, 25 Jun 2025 05:42:38 +0000 (06:42 +0100)]
gh-91555: Revert disabling of logger while handling log record. (GH-135858)
Revert "gh-91555: disable logger while handling log record (GH-131812)"
This reverts commit
2561e148ec985755baa3984b91fd0bfc089b283c .
Brandt Bucher [Tue, 24 Jun 2025 21:41:41 +0000 (14:41 -0700)]
GH-90117: Check for list and tuple before MappingView in pprint (GH-135779)
Brian Schubert [Tue, 24 Jun 2025 18:53:14 +0000 (14:53 -0400)]
gh-135855: Raise TypeError When Passing Non-dict Object to `_interpreters.set___main___attrs` (gh-135856)
mpage [Tue, 24 Jun 2025 17:02:50 +0000 (10:02 -0700)]
gh-135805: Document the X option and env var for controlling thread-local bytecode (#135868)
Document the X option and env var for controlling thread-local bytecode.
sobolevn [Tue, 24 Jun 2025 16:33:25 +0000 (19:33 +0300)]
gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (#135889)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Bénédikt Tran [Tue, 24 Jun 2025 11:09:46 +0000 (13:09 +0200)]
gh-135487: fix `reprlib.Repr.repr_int` when given very large integers (#135506)
Victor Stinner [Tue, 24 Jun 2025 10:21:35 +0000 (12:21 +0200)]
gh-135494: Fix python -m test --pgo -x test_re (#135713)
Fix regrtest to support excluding tests from --pgo tests.
Mark Shannon [Tue, 24 Jun 2025 08:49:38 +0000 (09:49 +0100)]
GH-135106: Restrict trashcan to GC'ed objects (GH-135682)
Hugo van Kemenade [Tue, 24 Jun 2025 08:08:23 +0000 (09:08 +0100)]
gh-123299: Update 'What's New in Python 3.14' from `3.14` branch (#135616)
Bénédikt Tran [Tue, 24 Jun 2025 07:58:07 +0000 (09:58 +0200)]
gh-135532: use `defining_class` for copying BLAKE-2 and SHA-3 objects (#135838)
Russell Keith-Magee [Tue, 24 Jun 2025 00:55:50 +0000 (08:55 +0800)]
gh-135648: Document that `shutil.copyfileobj` doesn't flush (#135737)
Adds a note about flush/close on copyfileobj, and updates
the Emscripten build script to follow documented advice.
Vincent Poulailleau [Mon, 23 Jun 2025 23:36:30 +0000 (01:36 +0200)]
Fix example according to PEP 750 in "What's new in 3.14" (GH-134727)
A redundant extra part was written. Added a closing tag, to match the usage in PEP 750.
Yongzi Li [Mon, 23 Jun 2025 22:53:33 +0000 (06:53 +0800)]
Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
Neil Schemenauer [Mon, 23 Jun 2025 22:09:40 +0000 (15:09 -0700)]
gh-119786: Add InternalDocs/qsbr.md. (gh-135411)
Add internal doc for the Quiescent-State Based Reclamation (QSBR) implementation.
Noam Cohen [Mon, 23 Jun 2025 19:42:09 +0000 (22:42 +0300)]
gh-131798: Optimize `_UNARY_NEGATIVE` (GH-135223)
Ken Jin [Mon, 23 Jun 2025 16:57:14 +0000 (00:57 +0800)]
gh-134584: Specialize POP_TOP by reference and type in JIT (GH-135761)
Kumar Aditya [Mon, 23 Jun 2025 16:08:57 +0000 (21:38 +0530)]
GH-124878: reenable `test_finalize_daemon_thread_hang` test under TSAN (#135793)
sobolevn [Mon, 23 Jun 2025 12:29:30 +0000 (15:29 +0300)]
Bump mypy to 1.16.1 (#135720)
Bénédikt Tran [Mon, 23 Jun 2025 10:49:27 +0000 (12:49 +0200)]
gh-135823: improve error message in `netrc` security checks (#135827)
Petr Viktorin [Mon, 23 Jun 2025 10:35:59 +0000 (12:35 +0200)]
gh-89488: Add warning about `Py_BuildValue("p")` needing exact `int` (GH-135610)
Emma Smith [Mon, 23 Jun 2025 10:28:05 +0000 (06:28 -0400)]
gh-134986: Catch PermissionError when trying to call perf in tests (#134987)
Using Ubuntu 24.04 on the Windows Subsystem for Linux, perf will raise a
`PermissionError` instead of `FileNotFoundError`. This commit modifies
the tests to catch that.
Kumar Aditya [Mon, 23 Jun 2025 06:22:28 +0000 (11:52 +0530)]
add async generators section to asyncio internal docs (#135674)
Bénédikt Tran [Sun, 22 Jun 2025 20:04:38 +0000 (22:04 +0200)]
gh-135532: cleanup clinic `module` directives for cryptographic modules (#135822)
Bénédikt Tran [Sun, 22 Jun 2025 19:48:06 +0000 (21:48 +0200)]
gh-135815: skip `netrc` security checks if `os.getuid` is missing (#135816)
Bénédikt Tran [Sun, 22 Jun 2025 14:59:57 +0000 (16:59 +0200)]
gh-135239: simpler use of mutexes in cryptographic modules (#135267)
Kattni [Sun, 22 Jun 2025 04:51:23 +0000 (00:51 -0400)]
patchcheck: use URL paths to identify upstream remote (GH-135806)
* find defined "(fetch)" remotes with "python/cpython" in their URL
* if there is exactly one, use that remote name
* if there is one named "upstream", "origin", or "python",
use that remote (in that precedence order)
* otherwise report an error listing the defined remotes
Kumar Aditya [Sat, 21 Jun 2025 16:33:17 +0000 (22:03 +0530)]
gh-130605: reenable `test_concurrent_futures` tests under TSAN (#135790)
Rafael Fontenelle [Sat, 21 Jun 2025 13:01:14 +0000 (10:01 -0300)]
Docs: Remove unnecessary trailing backslashes (GH-135781)
This fixes Sphinx's gettext extraction for translations.
Bénédikt Tran [Sat, 21 Jun 2025 12:32:00 +0000 (14:32 +0200)]
gh-135532: optimize calls to `PyMem_Malloc` in SHAKE digest computation (#135744)
- Add a fast path when the digest length is 0 to avoid calling useless functions.
- Directly allocate via `PyBytes_FromStringAndSize(NULL, length)` when possible.
Bénédikt Tran [Sat, 21 Jun 2025 09:43:30 +0000 (11:43 +0200)]
gh-135759: consistently reject negative sizes in SHAKE digests (#135767)
Passing a negative digest length to `_hashilb.HASHXOF.[hex]digest()` now
raises a ValueError instead of a MemoryError or a SystemError. This makes
the behavior consistent with that of `_sha3.shake_{128,256}.[hex]digest`.
Xuanteng Huang [Sat, 21 Jun 2025 08:43:15 +0000 (16:43 +0800)]
gh-135557: use atomic stores in `heapq` operations in free-threading (#135601)
sobolevn [Sat, 21 Jun 2025 07:56:14 +0000 (10:56 +0300)]
gh-135645: Added `supports_isolated_interpreters` to `sys.implementation` (#135667)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Hood Chatham [Sat, 21 Jun 2025 06:06:59 +0000 (23:06 -0700)]
gh-127146: Skip test_os.test_mode for Emscripten (#135764)
Temporarily skip test_os.test_mode on Emscripten; this fails consistently
on the buildbot, but not on other test configurations. Reported as #135783
for follow up.
Marcell Perger [Fri, 20 Jun 2025 22:45:36 +0000 (23:45 +0100)]
gh-135756: Fix nonexistent parameter in tkinter docs (#135770)
Remove nonexistent color parameter from tkinter.commondialog.Dialog.show() method documentation.
Eric Snow [Fri, 20 Jun 2025 20:26:32 +0000 (14:26 -0600)]
gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh-135724)
We weren't handling non-positive maxsize values (including the default) properly
in Queue.full(). This change fixes that and adjusts an associated assert.
Kumar Aditya [Fri, 20 Jun 2025 17:13:23 +0000 (22:43 +0530)]
gh-135380: enhance critical section held assertions (#135381)
Pastukhov Nikita [Fri, 20 Jun 2025 17:06:01 +0000 (20:06 +0300)]
gh-135721: skip `test_trashcan_python_class` on wasm buildbots with stack overflow (#135766)
Tomas R. [Fri, 20 Jun 2025 16:21:39 +0000 (18:21 +0200)]
gh-131798: JIT: Optimize _CALL_LEN when the length is known (#135260)
* Add news entry
* Optimize _CALL_LEN
* Simplify tests
Yuki Kobayashi [Fri, 20 Jun 2025 13:57:04 +0000 (22:57 +0900)]
Docs: Document `PyExceptionClass` functions in the C API (GH-135697)
* Docs: Document `PyExceptionClass_Name`
`PyExceptionClass_Name` is an undocumented function in the limited API.
* Document `PyExceptionClass_Check`
Kumar Aditya [Fri, 20 Jun 2025 12:02:37 +0000 (17:32 +0530)]
gh-135748: use argument clinic for more socket methods (#135749)
Weilin Du [Fri, 20 Jun 2025 11:03:41 +0000 (19:03 +0800)]
gh-89083: add links to RFC 9562 sections in UUID docs (#135684)
We also sync the docs for UUIDv1 and UUIDv6 concerning the node address and clock sequence.
---------
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Bénédikt Tran [Fri, 20 Jun 2025 09:50:09 +0000 (11:50 +0200)]
gh-135532: use `_Py_strhex` in HACL-MD5's `hexdigest` (#135742)
Bénédikt Tran [Fri, 20 Jun 2025 09:32:38 +0000 (11:32 +0200)]
gh-135532: update `Modules/_hacl/python_hacl_namespaces.h` (#135741)
Chris Eibl [Fri, 20 Jun 2025 09:05:33 +0000 (11:05 +0200)]
gh-135379: fix MSVC warning: conversion from 'stwodigits' to 'digit' (GH-135714)
fix warning C4244: 'initializing': conversion from
'stwodigits' to 'digit', possible loss of data
Bénédikt Tran [Fri, 20 Jun 2025 08:57:16 +0000 (10:57 +0200)]
gh-135532: simplify handling of HACL* errors in `_hmac` (#135740)
Ken Jin [Fri, 20 Jun 2025 06:33:35 +0000 (14:33 +0800)]
gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613)
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Hood Chatham [Thu, 19 Jun 2025 21:27:02 +0000 (14:27 -0700)]
gh-127146: Add skip_emscripten_stack_overflow in a few places (#135722)
More tests that hit stack limits on some platforms.
Nadeshiko Manju [Thu, 19 Jun 2025 20:23:38 +0000 (04:23 +0800)]
gh-135543: Emit sys.remote_exec audit event when sys.remote_exec is called (GH-135544)
Tomas R. [Thu, 19 Jun 2025 19:55:13 +0000 (21:55 +0200)]
Add tomasr8 as a codeowner for AST, gettext and the Tier 2 optimizer (#135727)
Bénédikt Tran [Thu, 19 Jun 2025 17:27:19 +0000 (19:27 +0200)]
gh-135561: ensure that the GIL is held when handling an HACL* error in `_hmac` (#135562)
sobolevn [Thu, 19 Jun 2025 15:46:40 +0000 (18:46 +0300)]
gh-135709: Fix two compile warnings on WASM buildbot (#135712)
Rafael Fontenelle [Thu, 19 Jun 2025 15:01:29 +0000 (12:01 -0300)]
Docs: Add missing lines between regex and text (GH-134505)
Andrii Hrimov [Thu, 19 Jun 2025 14:47:35 +0000 (16:47 +0200)]
gh-135273: Unify `ZoneInfo.from_file` signatures (#135274)
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
Ken Jin [Thu, 19 Jun 2025 13:09:09 +0000 (21:09 +0800)]
gh-135379: Move PyLong_CheckCompact to private header and rename it (GH-135707)
Rafael Fontenelle [Thu, 19 Jun 2025 12:56:43 +0000 (09:56 -0300)]
Docs: Emphasize parameter name in `pkgutil.iter_importers` (GH-135597)
Ken Jin [Thu, 19 Jun 2025 11:54:21 +0000 (19:54 +0800)]
gh-135379: Add back const cast to _PyLong_IsCompact (GH-135706)
Stan Ulbrych [Thu, 19 Jun 2025 11:47:29 +0000 (12:47 +0100)]
gh-133934: Mention special commands in sqlite3 `.help` message (GH-135224)
Stan Ulbrych [Thu, 19 Jun 2025 11:46:33 +0000 (12:46 +0100)]
gh-133439: Fix the error message in the sqlite3 CLI (GH-133807)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Mark Shannon [Thu, 19 Jun 2025 10:10:29 +0000 (11:10 +0100)]
GH-135379: Specialize int operations for compact ints only (GH-135668)
Victor Stinner [Thu, 19 Jun 2025 09:40:40 +0000 (11:40 +0200)]
gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (#135681)
Use 10 ms for CLOCK_RES instead of 100 ms to tolerate slow buildbots.
Petr Viktorin [Thu, 19 Jun 2025 09:36:56 +0000 (11:36 +0200)]
gh-111758: Run UBSan in GitHub Actions (GH-135578)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Petr Viktorin [Thu, 19 Jun 2025 07:00:41 +0000 (09:00 +0200)]
Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666)
Eric Snow [Wed, 18 Jun 2025 23:57:14 +0000 (17:57 -0600)]
gh-133485: Use interpreters.Interpreter in InterpreterPoolExecutor (gh-133957)
Most importantly, this resolves the issues with functions and types defined in __main__.
It also expands the number of supported objects and simplifies the implementation.
Peter Bierma [Wed, 18 Jun 2025 23:31:23 +0000 (19:31 -0400)]
gh-135450: Remove assertion in `_PyCode_CheckNoExternalState` (gh-135466)
The assertion reflected a misunderstanding of situations where "hidden" variables might exist,
namely generator expressions and comprehensions.
alexey semenyuk [Wed, 18 Jun 2025 21:10:20 +0000 (02:10 +0500)]
gh-134538: Add link to shutil.rmtree example in function docs (GH-135540)
Sam Gross [Wed, 18 Jun 2025 18:24:05 +0000 (14:24 -0400)]
gh-135641: Fix flaky `test_capi.test_lock_two_threads` test case (gh-135642)
The mutex may have the `_Py_HAS_PARKED` bit set.
Yuki Kobayashi [Wed, 18 Jun 2025 17:32:43 +0000 (02:32 +0900)]
Docs: Fix markups for emphasis (GH-135598)
The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
Kumar Aditya [Wed, 18 Jun 2025 16:41:35 +0000 (22:11 +0530)]
gh-135639: fix `test_cycle` test (#135662)
Serhiy Storchaka [Wed, 18 Jun 2025 15:26:01 +0000 (18:26 +0300)]
gh-135376: Fix and improve test_random (GH-135377)
* Remove duplicated code. Tests for Random and SystemRandom now share
the code.
* Move implementation agnostic tests that was only run for SystemRandom,
so they are now run for Random too.
* Add tests for __index__() support.
* Add tests for randint().
Petr Viktorin [Wed, 18 Jun 2025 14:34:18 +0000 (16:34 +0200)]
gh-135676: lexical analysis: Improve section on Numeric literals (GH-134850)
Victorien [Wed, 18 Jun 2025 13:00:55 +0000 (15:00 +0200)]
gh-135646: Raise consistent `NameError` exceptions in `ForwardRef.evaluate()` (#135663)
Duane Griffin [Wed, 18 Jun 2025 12:17:02 +0000 (00:17 +1200)]
gh-135335: flush stdout/stderr in forkserver after preloading modules (#135338)
If a preloaded module writes to stdout or stderr, and the stream is buffered,
child processes will inherit the buffered data after forking. Attempt to
prevent this by flushing the streams after preload.
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Stan Ulbrych [Wed, 18 Jun 2025 10:56:49 +0000 (11:56 +0100)]
gh-133390: Document `SQLITE_KEYWORDS` (GH-135659)
Russell Keith-Magee [Wed, 18 Jun 2025 06:21:14 +0000 (14:21 +0800)]
gh-134632: Add iOS/Android test skip for C API check for headers. (#135656)
iOS and Android don't ship headers in the testbed, so we can't test for their existence.
Hood Chatham [Wed, 18 Jun 2025 04:34:30 +0000 (21:34 -0700)]
gh-127146: Enable large files on Emscripten (#135635)
Large files have been fully supported by Emscripten for a long time.
Victorien [Wed, 18 Jun 2025 03:29:13 +0000 (05:29 +0200)]
gh-119180: Only fetch globals and locals if necessary in `annotationlib.get_annotations()` (#135644)
Hood Chatham [Wed, 18 Jun 2025 03:20:43 +0000 (20:20 -0700)]
gh-127146: Emscripten: Fix pathlib glob_dotdot test (#135624)
The Emscripten path resolver uses the same mechanism for resolving `..`
at a file system root as for resolving symlinks. This is because
roots don't store their mountpoints. If the parent of a node is itself,
it is a root but it might be a mountpoint in some other file system.
If a path has enough `..`'s at the root, it will return ELOOP.
Enough turns out to be 49.
Hood Chatham [Wed, 18 Jun 2025 03:19:23 +0000 (20:19 -0700)]
gh-127146: Emscripten: Fix test failure due to missing os.link (#135626)
Check for existence of os.link, rather than assuming it exists.
Hood Chatham [Wed, 18 Jun 2025 02:59:01 +0000 (19:59 -0700)]
gh-127146: Emscripten: Skip test_url2pathname_resolve_host (#135634)
Emscripten currently `gethostbyname_r()` returns an incorrect
IP address for `localhost`. Will be resolved by upstream PR:
https://github.com/emscripten-core/emscripten/pull/24593
Hood Chatham [Wed, 18 Jun 2025 02:51:46 +0000 (19:51 -0700)]
gh-127146: Allow ignored keys to be missing in test_sysconfig (#135622)
Fixes the test on Emscripten where userbase can be missing.
Vladyslav Lazoryk [Wed, 18 Jun 2025 02:39:41 +0000 (05:39 +0300)]
gh-135627: Remove documentation for LOAD_CONST_IMMORTAL opcode (GH-135632)
Remove documentation for LOAD_CONST_IMMORTAL opcode
Donghee Na [Tue, 17 Jun 2025 23:36:02 +0000 (08:36 +0900)]
gh-133931: Introduce _PyObject_XSetRefDelayed to replace Py_XSETREF (gh-134377)