Commit graph

130467 commits

Author SHA1 Message Date
Victor Stinner
39aa415296
gh-145376: Fix _cursesmodule.c build on FreeBSD/macOS (#145669) 2026-03-09 14:53:52 +01:00
Petr Viktorin
44855458a4
Document that PyType_GetModule returns a borrowed ref (GH-145612) 2026-03-09 14:32:28 +01:00
Filipe Laíns
3a0c716ad4
GH-145278: freeze encodings (partially) and linecache (#145279) 2026-03-09 13:28:00 +00:00
Pieter Eendebak
886bc6e14b
gh-145376: Fix various reference leaks in Objects/ and Modules/ (#145385)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-03-09 14:19:36 +01:00
Pieter Eendebak
8060aa5d7d
gh-145376: Fix various refleaks in Objects/ (#145609) 2026-03-09 14:17:27 +01:00
Pieter Eendebak
201e18312c
gh-145376: Fix reference leaks in _lprof.c (#145539) 2026-03-09 13:50:45 +01:00
Chris Eibl
b4460925a4
Fix intermittent test_ci_fuzz_stdlib failures (GH-145641) 2026-03-09 10:23:34 +01:00
Hood Chatham
015613384f
gh-145219: Add Emscripten cross-build and clean configurability (#145581)
Modifies the Emscripten build script to allow for custom cross-build directory
names, and to only clean Emscripten-specific paths (optionally including the
build python).

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-09 02:25:21 +00:00
James
5a15a52dd1
gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (#145643)
* Match tutorial output to real interpreter output

* Avoid invalid escape sequence in example

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

---------

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-08 18:41:47 -04:00
Hugo van Kemenade
149c465750
Fix bug notifier for issues with no body text (#145603) 2026-03-07 16:53:13 +02:00
Ramin Farajpour Cami
2cf6b2caad
gh-145623: Fix crashes on uninitialized struct.Struct objects (gh-145624) 2026-03-07 22:31:45 +09:00
Pieter Eendebak
0aeaaafac4
gh-145376: Fix refleak in queuemodule.c out-of-memory path (#145543) 2026-03-07 14:35:08 +05:30
AN Long
46761c9760
gh-116738: Make mmap.set_name thread-safe (#145555)
* Add critical section around mmap.set_name to make it thread-safe

* Add news entry

* Apply suggestion from @aisk
2026-03-07 17:14:44 +09:00
Victor Stinner
9159287f58
gh-144175: Add PyArg_ParseArray() function (#144283)
Add PyArg_ParseArray() and PyArg_ParseArrayAndKeywords()
functions to parse arguments of functions using the METH_FASTCALL
calling convention.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-06 21:57:44 +00:00
Pieter Eendebak
c1d7768321
gh-145376: Fix crashes in md5module.c and hmacmodule.c (#145422)
Fix a possible NULL pointer dereference in `md5module.c` and a double-free in `hmacmodule.c`.
Those crashes only occur in error paths taken when the interpreter fails to allocate memory.
2026-03-06 20:00:06 +00:00
Sam Gross
1d091a336e
gh-145566: Skip stop-the-world when reassigning __class__ on newly created objects (gh-145567) 2026-03-06 12:01:06 -05:00
Andrew Barnes
b28e5f58eb
gh-69223: Document that add_argument() returns an Action object (#145538) 2026-03-06 16:10:12 +00:00
Victor Stinner
6c8c72f7fe
gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (#145589)
Prefer VMADDR_CID_LOCAL instead of VMADDR_CID_ANY for bind() in the
server. Skip the test if bind() fails with EADDRNOTAVAIL.

Log vsock CID in test.pythoninfo.
2026-03-06 16:51:36 +01:00
Benedikt Johannes
d931725bc8
gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (#144371)
Disallow usage of control characters in status in wsgiref.handlers
to prevent HTTP header injections.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-06 13:22:21 +01:00
Hugo van Kemenade
d3b6faf975
Docs: import datetime as dt in examples (#145315) 2026-03-06 13:18:11 +02:00
Victor Stinner
349639cfa4
gh-141510: Use frozendict in the stdlib (#144909)
Co-authored-by: Donghee Na <donghee.na@python.org>
2026-03-06 10:25:09 +01:00
Victor Stinner
4fce98a920
gh-141510: Change marshal version to 6 (#145551)
Fix SliceTestCase: test also that version 4 fails with ValueError.
2026-03-06 10:23:11 +01:00
Hood Chatham
c3fb0d9d96
gh-145177: Support multiple Emscripten versions for Emscripten buildbot (#145180)
Adds an `--emsdk-cache` argument to the Emscripten build script and an
emscripten_version.txt file. If the `--emsdk-cache` argument is passed, the build script
will look in `emscripten_version.txt` to get the expected emsdk version is installed in
a folder called e.g., 4.0.12 in the directory indicated by the `--emsdk-cache` argument,
and run the build with that Emscripten tooling activated.
2026-03-06 08:42:41 +08:00
Alex Malyshev
7232883adf
gh-145557: Check ctypes is available in test_external_inspection (#145558)
Currently TestGetStackTrace.test_self_trace_after_ctypes_import() will fail if
the _ctypes extension is not built.  Make it match test_ctypes by skipping
the test in that case.
2026-03-05 19:03:30 +00:00
Yash Kaushik
e0945443a0
doc: Clarify logger creation example in logging HOWTO (GH-145540) 2026-03-05 17:48:48 +00:00
Victor Stinner
37e421bb43
gh-141510: Complete What's New in Python 3.15 for frozendict (#145537)
Mention updated stdlib modules and built-in functions.

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-05 17:44:58 +01:00
Victor Stinner
0c29f83caa
gh-141510: No longer accept frozendict in PyDict_Copy() (#145542)
Rename _PyDict_Copy() to anydict_copy().

Replace PyObject_IsInstance(op, &PyFrozenDict_Type) with
PyFrozenDict_Check().
2026-03-05 15:26:54 +01:00
Shrey Naithani
dbe0007ab2
gh-145417: Do not preserve SELinux context when copying venv scripts (#145454)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-05 15:19:49 +01:00
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