Serhiy Storchaka
962fb872eb
gh-145850: Change some implementation details in struct.Struct (GH-145851)
...
* calling it with non-ASCII string format will now raise a ValueError
instead of UnicodeEncodeError
* calling it with non-ASCII bytes format will now raise a ValueError
instead of struct.error
* getting the format attribute of uninitialized object will now raise
an AttributeError instead of RuntimeError.
2026-03-13 13:05:41 +02:00
Stan Ulbrych
e1c224624a
gh-145783: Propagate errors raised in NEW_TYPE_COMMENT ( #145784 )
2026-03-13 11:05:20 +00:00
bkap123
17eb0354ff
gh-145446: Add critical section in functools module for PyDict_Next (GH-145487)
2026-03-12 14:46:37 +01:00
Mark Shannon
453562a467
GH-145692: Convert DEOPT_IFs to EXIT_IFs (GH-145751)
...
* Convert DEOPT_IFs to EXIT_IFs for guards. Keep DEOPT_IF for intentional drops to the interpreter.
* Modify BINARY_OP_SUBSCR_LIST_INT and STORE_SUBSCR_LIST_INT to handle negative indices, to keep EXIT_IFs and DEOPT_IFs in different uops
2026-03-12 10:57:59 +00:00
Serhiy Storchaka
72456309e9
gh-143715: Deprecate incomplete initialization of struct.Struct() (GH-145580)
...
* Struct.__new__() will require a mandatory argument (format)
* Calls of __init__() method with a different format argument on initialized
Struct are deprecated
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-12 09:44:11 +02:00
Hai Zhu
f062014d38
gh-144540: Add _MAKE_HEAP_SAFE uop to eliminate unnecessary refcount operations in RETURN_VALUE and YIELD_VALUE (GH-144414)
2026-03-11 20:24:19 +00:00
Stan Ulbrych
4d0dce0c8d
Fix integer overflow for formats "s" and "p" in the struct module (GH-145750)
2026-03-10 18:57:34 +02:00
Serhiy Storchaka
3f33bf83e8
gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744)
...
Only set the format attribute after successful (re-)initialization.
2026-03-10 18:29:23 +02:00
Alexander Shadchin
2756d56eef
gh-85277: Fix building without stropts.h or empty stropts.h ( #143521 )
2026-03-10 17:02:57 +01:00
Steve Dower
ae0d2875bc
gh-145035: Allows removing the _pyrepl module to completely disable the modern REPL (GH-145159)
2026-03-10 14:58:32 +01:00
Matt Van Horn
2d35f9bc1c
gh-145492: Fix defaultdict __repr__ infinite recursion (GH-145659)
...
Co-Authored-By: Thomas Kowalski <thom.kowa@gmail.com>
2026-03-10 14:20:42 +01:00
Sergey Miryanov
478a315b7a
GH-145247: Implement _PyTuple_FromPair() ( #145325 )
...
Implement _PyTuple_FromPair() and _PyTuple_FromPairSteal().
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-10 11:44:20 +01:00
Stan Ulbrych
099943b122
Vary compiler flags in fuzz_pycompile ( #145236 )
...
* Vary compiler flags in fuzz_pycompile
* Drop `PyCF_SOURCE_IS_UTF8`
2026-03-09 22:51:00 +00:00
Filipe Laíns
64d6c75dd0
GH-145273: don't skip missing platstdlib warning if stdlib_zip is found ( #145544 )
2026-03-09 19:37:33 +00:00
Victor Stinner
39aa415296
gh-145376: Fix _cursesmodule.c build on FreeBSD/macOS ( #145669 )
2026-03-09 14:53:52 +01: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
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
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
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
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
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
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
Jelle Zijlstra
bd13cc09fa
gh-145376: Fix various reference leaks (GH-145377)
2026-03-03 16:23:30 +01: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
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
Filipe Laíns
46c5c57226
GH-145273: skip stdlib warning on module_search_paths_set ( #145442 )
2026-03-02 21:11:27 +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
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
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
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
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
Sam Gross
72eca2af59
gh-145230: Update lockbench (gh-145231)
...
Remove PyThread_type_lock (now uses PyMutex internally).
Add new benchmark options:
- work_inside/work_outside: control work inside and outside the critical section to vary contention levels
- num_locks: use multiple independent locks with threads assigned round-robin
- total_iters: fixed iteration count per thread instead of time-based, useful for measuring fairness
- num_acquisitions: lock acquisitions per loop iteration
- random_locks: acquire random lock each iteration
Also return elapsed time from benchmark_locks() and switch lockbench.py to use argparse.
2026-02-27 14:09:05 -05:00
莯凛
171e0facc4
gh-123853: Cleanup Windows 95 locale fallback support ( #144738 )
...
Closes #123853
2026-02-27 11:06:46 +01:00
Serhiy Storchaka
6ea84b2726
Fix unlikely potential reference leak in _locale._getdefaultlocale (GH-145250)
...
It occurs in a code which perhaps never executed.
2026-02-27 08:02:19 +00:00
A.Ibrahim
06b0920f12
gh-142787: Handle empty sqlite3 blob slices ( #142824 )
2026-02-26 23:40:25 +00:00
Sergey B Kirpichev
f3a381e54f
gh-141510: support frozendict's in the C decimal module (gh-145165)
2026-02-27 07:02:39 +09:00
Taegyun Kim
c2d3d6b0dd
gh-144316: Fix missing exception in _remote_debugging with debug=False ( #144442 )
2026-02-26 21:14:34 +00:00
Serhiy Storchaka
812ef66759
gh-145202: Fix crash in unicodedata's GraphemeBreakIterator and Segment (GH-145216)
...
Remove the tp_clear slots and make Segment members read-only.
Also add tests for reference loops involving GraphemeBreakIterator
and Segment.
2026-02-26 11:30:08 +02:00
Stan Ulbrych
56c4f10d6e
gh-88091: Fix unicodedata.decomposition() for Hangul Syllables (GH-144993)
2026-02-24 19:42:33 +02:00