Commit graph

129665 commits

Author SHA1 Message Date
Mark Shannon
20aeb3a463
GH-143026: Fix assertion error in executor management. (GH-143104) 2025-12-23 17:19:34 +00:00
Tomas R.
25c294b6ea
gh-134584: Eliminate redundant refcounting from _CALL_TYPE_1 (GH-135818) 2025-12-23 17:01:10 +00:00
Ken Jin
c8b80f5e23
gh-134584: Add another contributor to whats new 3.15 (GH-143107)
Add another contributor to whats new 3.15
2025-12-23 16:47:46 +00:00
Hugo van Kemenade
f783cc37eb
Update pre-commit with zizmor and Ruff fixes (#143095) 2025-12-23 17:51:02 +02:00
Victor Stinner
6536fab194
gh-130796: Undeprecate locale.getdefaultlocale() (#143069) 2025-12-23 16:31:10 +01:00
Ken Jin
c4ab024530
gh-142448: Disable JIT tracing when monitoring is enabled (GH-142842) 2025-12-23 11:27:23 +00:00
Pablo Galindo Salgado
28da1fb7c0
gh-142368: Fix transient error handling in inspection tests (#143093) 2025-12-23 11:01:32 +00:00
Pablo Galindo Salgado
81c8eb85e1
gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
Stan Ulbrych
f9704f1d84
gh-84232: Fix pydoc docs.python.org link generation (#139995)
Co-authored-by: Éric <merwok@netwok.org>
2025-12-23 10:29:58 +02:00
Zheng Yu
a273bc99d2
gh-122431: Correct the non-negative error message in readline.append_history_file (GH-143075)
"positive" -> "non-negative", since zero is included.
2025-12-22 23:35:23 -05:00
Hai Zhu
5b5ee3c4bf
gh-134584: Eliminate redundant refcounting from _LOAD_ATTR_WITH_HINT (GH-143062)
Eliminate redundant refcounting from _LOAD_ATTR_WITH_HINT
2025-12-23 00:28:08 +00:00
Pablo Galindo Salgado
9e51301234
gh-138122: Allow tachyon to write and read binary output (#142730) 2025-12-22 23:57:20 +00:00
Ken Jin
714037ba84
gh-139922: Add tail call for MSVC for whats new in 3.15 (GH-143087) 2025-12-22 23:56:26 +00:00
Chris Eibl
be3c131640
GH-139922: Tail calling for MSVC (VS 2026) (GH-143068)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-22 23:01:34 +00:00
Ken Jin
665d2807a0
gh-139109: Add terminator to JIT code when halting due to invalid dependencies (#143033)
* Add terminator to JIT code when  halting due to invalid dependencies

* 📜🤖 Added by blurb_it.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-12-22 20:54:47 +00:00
Stan Ulbrych
3c0888b25b
gh-89152: Note truth testing exception in stdtypes.rst (#137640)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-12-22 11:36:44 -08:00
AZero13
a88d1b8dab
gh-143010: Prevent a TOCTOU issue by only calling open once (#143011)
* gh-143010: Prevent a TOCTOU issue by gh-143010: Prevent a TOCTOU issue by only calling open once

RDM: per  AZero13's research the 'x' option did not exist when this code was written,  This
modernization can thus drop the fd trick in _create_carefully and just use open with 'x' to achieve the same goal more securely.

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-12-22 12:48:11 -05:00
Chris Eibl
700e9fad70
GH-142513: fix missing return in executor_clear (GH-143073)
fix missing return in executor_clear
2025-12-22 17:10:52 +00:00
Kumar Aditya
487e91c120
gh-129069: fix more thread safety issues in list (#143019) 2025-12-22 21:45:28 +05:30
Kumar Aditya
e728b006de
gh-143057: avoid locking in tracemalloc C-APIs when it is not enabled (#143065) 2025-12-22 21:08:07 +05:30
Ken Jin
9ded3dd4e9
gh-142476: Fix Windows crashing with JIT (GH-143021)
Fix Windows crashing with JIT
2025-12-22 14:57:13 +00:00
Hugo van Kemenade
ff7f62eb23
gh-142927: Tachyon: Comma separate thousands and fix singular/plurals (#142934) 2025-12-22 14:15:57 +00:00
Yongtao Huang
3960878143
Remove unreachable code in mmapmodule error path on Windows (GH-143063)
mmapmodule: remove unreachable code in Windows error path

Remove an unreachable `return NULL` after `PyErr_SetFromWindowsErr()` in
the Windows mmap resize error path.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
2025-12-22 11:16:50 +01:00
Bartosz Sławecki
6213a512bf
gh-143046: Make asyncio REPL respect the -q flag (quiet mode) (#143047) 2025-12-22 07:05:15 +00:00
saucoide
09044dd42b
gh-80744: do not read .pdbrc twice when cwd == $home (#136816) 2025-12-21 08:58:07 -08:00
Gregory P. Smith
b8d3fddba6
gh-70647: Better promote how to safely parse yearless dates in datetime. (GH-116179)
* gh-70647: Better promote how to safely parse yearless dates in datetime.

Every four years people encounter this because it just isn't obvious.
This moves the footnote up to a note with a code example.

We'd love to change the default year value for datetime but doing
that could have other consequences for existing code.  This documented
workaround *always* works.

* doctest code within note is bad, dedent.

* Update to match the error message.

* remove no longer referenced footnote

* ignore the warning in the doctest

* use Petr's suggestion for the docs to hide the warning processing

* cover date.strptime (3.14) as well
2025-12-20 22:47:40 -08:00
Gregory P. Smith
8d2d7bb2e7
gh-142145: relax the no-longer-quadratic test timing (#143030)
* gh-142145: relax the no-longer-quadratic test timing

* require cpu resource
2025-12-20 23:42:06 +00:00
Sam Gross
2b4feee648
gh-122581: Use parser mutex in default build for subinterpreters (gh-142959) 2025-12-20 15:37:31 -05:00
Sam Gross
7607712b61
gh-120321: Avoid -Wunreachable-code warning on Clang (gh-143022) 2025-12-20 14:42:12 -05:00
Hai Zhu
3cc57505e5
gh-142834: pdb commands command should use last available breakpoint (#142835) 2025-12-20 09:27:34 -08:00
AZero13
5989095dfd
gh-143012: use Py_ssize_t cast for PyBytes_FromStringAndSize (#143013) 2025-12-20 10:37:10 +03:00
Hugo van Kemenade
5b5263648f
gh-142927: Tachyon: Start with user's default light/dark theme (#142987) 2025-12-20 02:36:09 +01:00
Sam Gross
e46f28c6af
gh-129069: Fix listobject.c data races due to memmove (gh-142957)
The use of memmove and _Py_memory_repeat were not thread-safe in the
free threading build in some cases. In theory, memmove and
_Py_memory_repeat can copy byte-by-byte instead of pointer-by-pointer,
so concurrent readers could see uninitialized data or tearing.

Additionally, we should be using "release" (or stronger) ordering to be
compliant with the C11 memory model when copying objects within a list.
2025-12-19 18:06:47 -05:00
Sam Gross
4ea3c1a047
gh-120321: Fix TSan reported race in gen_clear_frame (gh-142995)
TSan treats compare-exchanges that fail as if they are writes
so there is a false positive with the read of gi_frame_state in
gen_close.
2025-12-19 17:33:49 -05:00
Sam Gross
08bc03ff2a
gh-120321: Make gi_frame_state transitions atomic in FT build (gh-142599)
This makes generator frame state transitions atomic in the free
threading build, which avoids segfaults when trying to execute
a generator from multiple threads concurrently.

There are still a few operations that aren't thread-safe and may crash
if performed concurrently on the same generator/coroutine:

 * Accessing gi_yieldfrom/cr_await/ag_await
 * Accessing gi_frame/cr_frame/ag_frame
 * Async generator operations
2025-12-19 19:10:37 +00:00
Shamil
e2a7db7175
gh-142476: fix memory leak when creating JIT executors (GH-142492) 2025-12-19 19:07:11 +00:00
Ken Jin
6b4bc6e6a2
gh-134584: JIT: Borrow references for immortal promoted globals (GH-142921)
JIT: Borrow references for immortal promoted globals
2025-12-19 19:06:34 +00:00
stratakis
6a4f10325d
gh-142776: Ensure fp file descriptor is closed on all code paths in import.c (GH-142777) 2025-12-19 10:14:52 -08:00
Ken Jin
786f464c74
gh-142961: Fix constant folding len(tuple) in JIT (GH-142963) 2025-12-19 17:43:36 +00:00
Petr Viktorin
049c2526bf
gh-134160: Start "Extending and embedding" with a Diataxis-style tutorial (GH-142314)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Daniele Nicolodi <daniele@grinta.net>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-12-19 17:48:34 +01:00
Diego Russo
685272eb8a
JIT: Rename trampoline.c to shim.c (#142974) 2025-12-19 14:39:41 +00:00
Rogdham
4aef138325
gh-136282: Configparser: create unnamed sections via mapping protocol access (GH-136313) 2025-12-19 13:44:03 +01:00
Andrej
610aabfef2
gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (#142483)
If *a* is an integer, the sign of *a* is discarded in the C source code. Clarify this behavior to prevent foot guns, where a common use case might naively assume that flipping the sign will produce different sequences (e.g. for a train/test split of a synthetic data generator in machine learning).

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-19 00:29:35 -08:00
wangxiaolei
220f0b1077
gh-142560: prevent use-after-free in search-like methods by exporting buffer in bytearray (#142938) 2025-12-19 08:02:23 +00:00
Savannah Ostrowski
1391ee664c
GH-134584: Remove redundant refcount for BINARY_OP_SUBSCR_STR_INT (#142844) 2025-12-18 21:29:54 +00:00
Ethan Furman
e79c39101a
gh-118342: [Enum] update docs (GH-137290)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-18 18:31:37 +00:00
LloydZ
33d94abafd
gh-134584: Eliminate redundant refcounting from _BINARY_OP_SUBSCR_LIST_INT (GH-142926) 2025-12-18 18:25:36 +00:00
Sam Gross
f54d44d333
gh-129068: Make range iterators thread-safe (gh-142886)
Now that we specialize range iteration in the interpreter for the common
case where the iterator has only one reference, there's not a
significant performance cost to making the iteration thread-safe.
2025-12-18 13:11:51 -05:00
Kumar Aditya
e22c49522b
gh-142890: remove unnecessary interp parameter from dict functions and _PyDict_NotifyEvent (#142923) 2025-12-18 22:48:56 +05:30
Serhiy Storchaka
4a8ecbad80
gh-142681: Move NormalizationTest-3.2.0.txt to more safe place. (GH-142935) 2025-12-18 18:04:28 +01:00