Commit graph

130420 commits

Author SHA1 Message Date
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
AN Long
5c3a47b94a
gh-145335: Fix crash when passing -1 as fd in os.pathconf (#145390)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-03-02 19:07:49 +01:00
Sam Gross
02288bf022
gh-130555: Fix use-after-free in dict.clear() with embedded values (gh-145268) 2026-03-02 12:25:13 -05:00
Hai Zhu
107863ee17
gh-144569: Avoid creating temporary objects in BINARY_SLICE for list, tuple, and unicode (GH-144590)
* Scalar replacement of BINARY_SLICE for list, tuple, and unicode
2026-03-02 17:02:38 +00:00
Steve Dower
1cf5abedeb
gh-145307: Defer loading psapi.dll until ctypes.util.dllist() is called. (GH-145308) 2026-03-02 17:10:15 +01:00
Thomas A Caswell
201d251567
DOC: clarify and expand documentation about PYTHONUSERBASE and PYTHONNOUSERSITE (#144637) 2026-03-02 15:54:26 +00:00
zhong
b611db491d
gh-142781: Fix type confusion in zoneinfo weak cache (GH-142925)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-02 13:30:38 +01:00
Facundo Batista
e542255458
gh-144835: Added missing explanations for some parameters in glob and iglob. (#144836)
* Added missing explanations for some parameters in glob and iglob.

* News entry.

* Added proper 'func' indication in News file.

* Consistent use of backticks.

* Improved wording.

* consistent wording between the two docstrings

---------

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-03-02 08:56:28 -03:00
Bartosz Sławecki
8bcb3eaa67
gh-144851: Fix __lazy_import__ crash with user-defined filters (#144852) 2026-03-02 12:01:32 +01:00
Petr Viktorin
3b276f3f59
gh-144748: Make PyErr_CheckSignals raise the exception scheduled by PyThreadState_SetAsyncExc (GH-145178)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-03-02 11:47:32 +01:00
Stan Ulbrych
c9a5d9aae4
gh-100538: Add workflow to verify bundled libexpat (GH-145359)
Add workflow to verify bundled libexpat.
2026-03-01 11:48:28 -08:00
Furkan Onder
41fa2dbc0e
gh-137829: Fix shelve tests for backend compatibility (#137879) 2026-03-01 16:48:13 +01:00
Thomas Kowalski
976808505a
gh-145351: use --no-install-recommends (#145352) 2026-03-01 15:24:42 +00:00
edson duarte
6c417e44c9
gh-140715: Improve class reference links on datetime.rst (#123980)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-01 13:59:02 +02:00
Zachary Ware
c9b96b1e6f
gh-136728: Combine OpenSSL and AWS-LC CI configurations (#144805) 2026-03-01 11:18:23 +02:00
Jelle Zijlstra
3484ef6003
gh-145033: Implement PEP 747 (#145034) 2026-02-28 19:52:04 -08:00
Zachary Ware
a1ec746787
gh-144551: Update iOS builds to use OpenSSL 3.5.5 (GH-145372) 2026-02-28 22:26:47 +00:00
Zachary Ware
50c2e23f69
gh-144551: Update Android builds to use OpenSSL 3.5.5 (GH-145371) 2026-02-28 16:14:46 -06:00
Zachary Ware
f1446d3922
Destroy the turtle window after its doctests finish (GH-125294) 2026-02-28 21:12:05 +00:00
Thomas Kowalski
ef41f73611
gh-145349: Do not install ccache (#145350) 2026-02-28 22:37:15 +02:00