Victor Stinner
2cd0ddfe04
gh-141510: Fix frozendict.items() ^ frozendict.items() ( #145535 )
...
Add non-regression tests.
2026-03-05 14:14:04 +01:00
Xianpeng Shen
11840ca99a
gh-140681: Freeze pre-commit hooks and update zizmor links ( #140682 )
...
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-05 14:23:06 +02:00
Victor Stinner
7bdfce0d3a
gh-145056: Accept frozendict in xml.etree ( #145508 )
...
Element and SubElement of xml.etree.ElementTree now also accept
frozendict for attrib.
Export _PyDict_CopyAsDict() function.
2026-03-05 12:55:28 +01:00
Victor Stinner
c0ecf211b2
gh-145055: Accept frozendict for globals in exec() and eval() ( #145072 )
2026-03-05 12:35:43 +01:00
Victor Stinner
c8aa8de9a5
gh-141510: Use frozendict in the _opcode_metadata ( #144910 )
...
Enhance py_metadata_generator.py to skip duplicates.
Co-authored-by: Donghee Na <donghee.na@python.org>
2026-03-05 12:33:13 +01:00
Victor Stinner
2acfad9d57
gh-82626: Schedule removal of bool used as file descriptor ( #145469 )
2026-03-05 12:32:32 +01:00
Victor Stinner
0fe20fc170
gh-141510: Don't accept frozendict in PyDict_Watch() ( #145529 )
...
Don't accept frozendict in PyDict_Watch() and PyDict_Unwatch().
A frozendict cannot be modified, so it's not useful to watch for
modifications.
2026-03-05 12:31:29 +01:00
Hood Chatham
23a4e3ba3c
gh-145335: Skip Emscripten for os.execve() test ( #145528 )
...
Emscripten's os.execve() always fails with ENOEXEC.
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-05 12:29:34 +01:00
Pieter Eendebak
0eaf260d79
gh-145376: Fix refleak and null pointer deref in unusual error path of datetime module (GH-145476)
2026-03-05 10:21:49 +00:00
krylosov-aa
6acaf659ef
gh-145301: Fix double-free in hashlib and hmac module initialization (GH-145321)
...
gh-145301: Fix double-free in hashlib and hmac initialization
2026-03-04 19:48:25 -08:00
Donghee Na
8b54313670
gh-144991: Use runtime JIT threshold in _testinternalcapi (gh-145496)
2026-03-05 09:07:47 +09:00
Victor Stinner
72b3e374a3
gh-141510: Add frozendict support to python-gdb.py ( #145511 )
2026-03-05 00:57:54 +01:00
Pieter Eendebak
1aa1d76b7f
gh-145376: Fix reference leaks in deque ( #145421 )
...
Fix a reference leak if newblock() fails in _collections.deque.
2026-03-04 23:45:43 +01:00
Brett Cannon
4ebaf3f459
Use bytecodealliance/setup-wasi-sdk-action to install the WASI SDK ( #145445 )
2026-03-04 13:27:47 -08:00
Brett Cannon
b63dc8abdf
Refactor Platforms/WASI/__main__.py for lazy importing and future new subcommands ( #145404 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-04 13:27:23 -08:00
Stan Ulbrych
ae208d5665
Fix bugs in compute-changes.py logic for CIFuzz ( #145232 )
2026-03-04 22:43:44 +02:00
Steve Dower
a51b1b512d
gh-145506: Fixes CVE-2026-2297 by ensuring SourcelessFileLoader uses io.open_code (GH-145507)
2026-03-04 19:55:52 +00:00
Victor Stinner
0a51113a49
gh-141510: Optimize PyDict_Copy() for frozendict ( #145509 )
...
Implement fast-path for frozendict in PyDict_Copy().
2026-03-04 20:49:20 +01:00
Victor Stinner
95f56b1206
gh-141510: Return frozendict unmodified in PyDict_Copy() ( #145505 )
...
Add also the internal _PyDict_CopyAsDict() function.
2026-03-04 19:11:00 +00:00
Sam Gross
8a7eb8b2ab
gh-145500: Delete _PyType_GetMRO (gh-145501)
2026-03-04 13:32:43 -05:00
Itamar Oren
6cdbd7bc5d
gh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090)
...
Adds _PYLAUNCHER_INIDIR as a private variable since the launcher is deprecated and not getting new features.
2026-03-04 18:06:49 +00:00
Victor Stinner
a00392349c
gh-144741: Fix test_frame_pointer_unwind for libpython ( #145499 )
...
Fix test_frame_pointer_unwind when Python is built with
--enable-shared. Classify also libpython frames as "python".
2026-03-04 18:29:02 +01:00
Pieter Eendebak
18aec59fe5
gh-145376: Fix refleak in unusual error path in BaseExceptionGroup_new (GH-145474)
2026-03-04 14:34:24 +01:00
Pieter Eendebak
f9dac4e2eb
gh-145376: Avoid reference leaks in failure path of _functoolsmodule.c method partial_new (GH-145423)
2026-03-04 14:32:14 +01:00
Pieter Eendebak
3fe7849d9a
gh-145376: Fix refleak in error path of time_tzset (GH-145477)
2026-03-04 14:21:10 +01:00
Miro Hrončok
45e9343d7e
GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version, not runtime ( #144740 )
2026-03-04 13:59:50 +01:00
Victor Stinner
31343cf2bc
gh-142417: Restore private _Py_InitializeMain() function ( #145472 )
...
This reverts commit 07c3518ffb .
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-04 11:00:08 +01:00
Justin Kunimune
dc12d1999b
Fix incorrect statement about argparse.ArgumentParser.add_argument() ( #145479 )
...
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-03-03 21:41:26 +00:00
Ned Batchelder
15f6479c41
Docs: use a Sphinx extension to eliminate excessive links ( #145130 )
2026-03-03 15:48:43 -05:00
Tan Long
745947cda0
gh-135883: Fix sqlite3 CLI history scrolling with colored prompts ( #135884 )
2026-03-03 19:48:03 +01:00
Bartosz Sławecki
e6c3c04fab
gh-145452: Initialize PyLazyImport_Type during interpreter startup ( #145453 )
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-03 17:14:12 +01:00
Victorien
34df70c83c
Reference memoryview.tolist as a method ( #145412 )
2026-03-03 16:05:14 +00:00
Jelle Zijlstra
bd13cc09fa
gh-145376: Fix various reference leaks (GH-145377)
2026-03-03 16:23:30 +01:00
Filipe Laíns
246227392c
Add myself to initialization and import machinery codeowners ( #145473 )
2026-03-03 14:35:48 +00:00
bkap123
671a953dd6
gh-144475: Fix reference management in partial_repr (GH-145362)
2026-03-03 13:46:02 +00:00
Victor Stinner
52c8efa87d
gh-145335: Fix os functions when passing fd -1 as path ( #145439 )
...
os.listdir(-1) and os.scandir(-1) now fail with OSError(errno.EBADF)
rather than listing the current directory.
os.listxattr(-1) now fails with OSError(errno.EBADF) rather than
listing extended attributes of the current directory.
2026-03-03 13:57:08 +01:00
Michiel W. Beijen
db41717cd5
GH-145450: Document missing wave.Wave_write getter methods (GH-145451)
2026-03-03 13:44:56 +01:00
Stan Ulbrych
a929e80b9e
Add PyExc_OverflowError to the list of possible exceptions in fuzz_ast_literal_eval fuzzer (GH-145429)
2026-03-03 13:10:34 +01:00
Victor Stinner
c9d123482a
gh-144995: Optimize memoryview == memoryview ( #144996 )
...
Optimize memoryview comparison: a memoryview is equal to itself, there is no
need to compare values, except if it uses float format.
Benchmark comparing 1 MiB:
from timeit import timeit
with open("/dev/random", 'br') as fp:
data = fp.read(2**20)
view = memoryview(data)
LOOPS = 1_000
b = timeit('x == x', number=LOOPS, globals={'x': data})
m = timeit('x == x', number=LOOPS, globals={'x': view})
print("bytes %f seconds" % b)
print("mview %f seconds" % m)
print("=> %f time slower" % (m / b))
Result before the change:
bytes 0.000026 seconds
mview 1.445791 seconds
=> 55660.873940 time slower
Result after the change:
bytes 0.000026 seconds
mview 0.000028 seconds
=> 1.104382 time slower
This missed optimization was discovered by Pierre-Yves David
while working on Mercurial.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2026-03-03 12:15:32 +01:00
Petr Viktorin
f1de65b366
gh-145455: Show output of blurb & sphinx-build version commands (GH-145457)
...
In gh-145455, an outdated dependency caused an import error that was not
printed out (`2>&1`); the message instead said that the tools are missing.
Don't redirect stderr, to show warnings and failures.
Also, switch `blurb` to output a version on a single line (`--version` rather
than `help`), and, and don't redirect stdout either.
This results in two version info lines being printed out. These get drowned
in typical Sphinx output, and can be helpful when debugging.
2026-03-03 11:47:02 +01:00
Donghee Na
6908372fb8
gh-145214: Narrow _GUARD_TOS_ANY_{SET,DICT} by using probable type (gh-145215)
2026-03-03 09:58:38 +09:00
Daniel Hollas
ea90b032a0
gh-117865: Speedup import of inspect module ( #144756 )
...
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2026-03-02 23:39:07 +02:00
Filipe Laíns
46c5c57226
GH-145273: skip stdlib warning on module_search_paths_set ( #145442 )
2026-03-02 21:11:27 +00:00
C.A.M. Gerlach
9124bc194a
Hide "object" prefix on dunders in contextlib docs & selectivly link some more ( #145436 )
2026-03-02 23:10:26 +02:00
Filipe Laíns
f739e2ca62
Add sysconfig[VPATH] to test.pythoninfo ( #145434 )
2026-03-02 20:48:07 +00:00
Filipe Laíns
539a985fac
GH-145273: drop build_prefix check from missing stdlib warning ( #145437 )
2026-03-02 20:23:22 +00:00
Stan Ulbrych
f8d2f9fe67
gh-145118: Add frozendict support to type() ( #145124 )
2026-03-02 20:45:03 +01:00
Peter Bierma
592e8f0865
gh-130327: Always traverse managed dictionaries, even when inline values are available ( #130469 )
2026-03-02 14:32:06 -05:00
Filipe Laíns
eb611a8515
GH-145275: add -X pathconfig_warnings and PYTHON_PATHCONFIG_WARNINGS ( #145277 )
2026-03-02 19:19:05 +00:00
Filipe Laíns
3ab39d2308
GH-145273: warn when we can't find the standard library ( #145274 )
2026-03-02 18:51:45 +00:00