* Factor shared interpreter stop-the-world guard
Move the existing collector barrier into the VM without changing its stop, restart or ownership behavior, preparing reuse by fork.
Assisted-by: dot:GPT-6.1
* Add interpreter-bound operation section primitive
Prepare attached-only ownership acquisition and detached observer parking with private per-interpreter scope stacks. Lifecycle wiring follows separately; no profiler consumer is enabled by this commit.
Assisted-by: dot:GPT-6.1
* Suspend operation sections at VM lifecycle boundaries
Integrate detach, stop-the-world, shutdown and interpreter-switch boundaries. Reuse the all-interpreter barrier for fork repair and add focused native ownership invariants.
Assisted-by: dot:GPT-6.1
* Replace operation sections with PyMutex critical sections
Add PyMutex with the lock.c protocol: LOCKED/HAS_PARKED bits, a bounded
spin, direct handoff to waiters parked longer than 1 ms, and detaching
while parked.
Rebuild critical sections on PyMutex with the stack kept as a tagged
pointer in ThreadSlot: single and two-mutex sections, recursive
top-most skipping, locking skipped while the world is stopped,
SuspendAll on detach/suspend/shutdown and Resume of the top-most
section on attach. Fork carries the stacks into the replacement slots.
Assisted-by: Claude Code:claude-opus-5-5
* Check attachment around critical-section suspension
Assert that a thread entering a critical section is attached, and
suspend sections in do_suspend only while the slot is still ATTACHED.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Use the existing WTF-8 representation interface for the base exception and name/path fields, avoiding lossy conversion of legal Python __repr__ results.
AI assistance: OpenAI Codex prepared the correction and validation. Model version is not exposed in this session.
Assisted-by: Codex:unknown (model version not exposed)
Keep Python-visible epoll descriptors in a raw host wrapper, preserving fromfd aliasing and explicit close errors without OwnedFd drop aborts. Use native epoll event layout behind a transparent host-only type and align positive timeout overflow with CPython milliseconds.
Assisted-by: OpenAI Codex:model-version-unavailable
Preserve WTF-8 dotted paths in protocol 4/5 global loading so private-name round trips also support surrogate-containing names.
Assisted-by: Codex:unknown (model version not exposed)
Extract the independent Python 3.15 ImportError representation change from the upgrade work. Preserve BaseException positional arguments and include explicitly present name/path attributes for ImportError and ModuleNotFoundError.
AI assistance: OpenAI Codex prepared the extraction and validation. Model version is not exposed in this session.
Assisted-by: Codex:unknown (model version not exposed)
* Use the RustPython Ruff fork 0.17.1 from git and place EOF errors by kind
- The ruff crates come from the RustPython/ruff `rustpython-0.17.1`
branch at 93967836c8 instead of the 0.16.10 crates.io release.
- `EofToken.known_location` is replaced by `EofErrorLocation`
(Tokenizer, Token, StartingFromToken), chosen from the parse error kind.
The keyword scan in `clause_keyword` is removed, since the parser now
reports a forced `:` as `ExpectedForcedToken`.
- An empty import at EOF ends at the end of the line read, and an empty
import before a newline is an empty range at the newline.
Assisted-by: Claude Code:claude-opus-5-5
* Report the obsolete `<>` from the parser outside Barry mode
- Bump the RustPython/ruff fork to 9290a88495, where the parser reports an
adjacent `<` and `>` in a comparison as "invalid syntax. Maybe you meant
'!=' instead of '<>'?" over both tokens.
- Outside Barry mode, `BarrySource` no longer searches the source text for
`<>`, so the parser's error is reported unchanged. A `<>` that starts a
statement is reported at the `<` only, and `<<>` at the `>`.
Assisted-by: Claude Code:claude-opus-5-5
* Align signal wakeup error handling with Python 3.15
Assisted-by: OpenAI Codex:model version unavailable
* Preserve CRT error state during signal wakeup writes
Assisted-by: OpenAI Codex:model version unavailable
* Represent nullable Windows CRT parameter handlers safely
Assisted-by: OpenAI Codex:model version unavailable
* Rework signal wakeup error delivery to follow signalmodule.c
- Report pending wakeup write/send errors after Python signal handlers
and VM pending calls, and re-arm the eval breaker when a handler or
pending call raises.
- Save and restore errno once in run_signal around trip_signal instead
of inside each write path; stop preserving _doserrno.
- Add crt_fd::write_noraise and use it for the Unix and Windows wakeup
writes, sharing the single-write helper with _write.
- Keep pending wakeup errors across fork.
- Revert the suppress_iph handler type change and the unrelated quote
change in test_signal.
Assisted-by: Claude Code:claude-opus-5-5
* Represent nullable Windows CRT parameter handlers as Option
_set_thread_local_invalid_parameter_handler takes and returns a nullable
function pointer; declare it as Option<InvalidParamHandler> so a NULL
previous handler is restored as None.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Normalize inherited exception formatting once so structured results and terminal details share uncolored traceback strings, even when colors are forced. Add synthetic ordinary and subtest failure/error coverage without changing existing assertions.
Implementation and focused validation were AI-assisted with OpenAI Codex.
Assisted-by: OpenAI Codex: model version unavailable
EnumerateArgs bound the iterable as PyIter, so argument binding called
__iter__ before start was converted and before surplus positional
arguments were rejected. An exception from __iter__ then replaced the
TypeError CPython raises for a bad start or a third argument.
Bind the iterable as an object and call get_iter() in py_new, after
start is converted, which is the order of CPython's enum_new_impl.
Assisted-by: Claude Code:claude-opus-5-5
CPython keeps a Neumaier compensation term while sum() accumulates an
exact float or complex, and reaches that path from an exact int start
too. RustPython added items one by one, so sum([0.1] * 10) returned
0.9999999999999999 instead of 1.0.
Port the int, float and complex fast paths of builtin_sum_impl, each
falling back to plain addition at the first item it does not handle.
Assisted-by: Claude Code:claude-opus-5-5
* Preserve regression collector outcomes and canonical process context
Record complete test identities, subtest diagnostics and fixture outcomes while keeping unittest event counts separate from once-per-case JSON totals. Reuse canonical process setup and avoid an unnecessary library-path override.
Assisted-by: OpenAI Codex: model version unavailable
* Fix regression runner subtest formatting and qualified discovery
Assisted-by: OpenAI Codex: model version unavailable
* Make runner traceback assertions independent of forced colors
Assisted-by: OpenAI Codex: model version unavailable
* Keep dev VM frames compact for stdlib imports
Carry the established integration VM optimization override into the regression runner split. Retain debug assertions, stack guards and Python recursion limits.
Assisted-by: OpenAI Codex: model version unavailable
* Report fatal explicit-home encodings initialization failures
Retain explicit standard-library initialization errors for the command-line host, preserving default embedding fallback and the original exception cause.
Assisted-by: OpenAI Codex: model version unavailable
* Enable canonical fatal startup path configuration coverage
Retire the verified expected failure through update_lib, preserving the explicit local path-environment adaptation and all other markers.
Assisted-by: OpenAI Codex: model version unavailable
* Update storage and developer-tool libraries to Python 3.15
Migrate eight behavioral modules and two related production cleanups with whole canonical suites, preserving the existing dynamic Windows DBM guard through the updater.
Assisted-by: OpenAI Codex:model version unavailable
* Preserve the import required by the existing DBM platform guard
Assisted-by: OpenAI Codex:model version unavailable
* Use explicit source blocks instead of module-specific updater adapters
Preserve reviewed local fragments through the existing target-bound migration metadata. Remove dedicated module rules, flags and test scaffolding while retaining generic marker and doctest handling.
Assisted-by: OpenAI Codex: model version unavailable
* Generalize selected assignment migration beyond test support
Use generic assignment/export flags and an explicit Lib Python target with existing source/destination hash checks. Retain the existing dependency-checked operation without module-specific aliases.
Assisted-by: OpenAI Codex: model version unavailable
Copy nine behavioral asyncio modules and the independent ftplib unused-assignment cleanup from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Migrate their whole canonical suites with existing RustPython guards preserved.
Assisted-by: OpenAI Codex:model version unavailable
* Align import, numeric and warning edge cases with Python 3.15
Carry four independent compatibility fixes from the 3.15 upgrade: preserve import cache lookup errors, handle surrogate module names, qualify numeric conversion diagnostics, and accept frozen warning globals. Match pinned CPython d220409a13b77de7a6c30abe16ea90db01528edc.
Assisted-by: OpenAI Codex:model version unavailable
* Preserve the integer contract of builtin module detection
Return -1 for the separately initialized sys/builtins core modules, 1 for registered definitions and 0 for absent or unencodable names, matching pinned CPython import.c and its initialization table.
Assisted-by: OpenAI Codex:model version unavailable
* Normalize successful index conversions to exact integers
Match PyNumber_Index after its internal protocol call: preserve exceptions and warning timing, then copy bool or int-subclass payloads to an exact int without calling __index__ again.
Assisted-by: OpenAI Codex:model version unavailable
* Retire passing surrogate-import expected failures
Canonical cases now pass on the repaired import paths, including hosted Windows validation. Preserve their bodies and platform guards through update_lib.
Assisted-by: OpenAI Codex:model version unavailable
* Update ten leaf standard-library modules to Python 3.15
Migrate mail, TOML, zoneinfo and CLI leaves in dependency order with canonical tests and preserved RustPython guards.
Assisted-by: OpenAI Codex:model version unavailable
* Defer warning initialization for lazy standard-library imports
Match CPython startup option processing and load the Python display helper on the first native warning.
Assisted-by: OpenAI Codex:model version unavailable
* Update the canonical webbrowser consumer for argparse colors
Copy the complete pinned CPython 3.15 webbrowser module and tests via update_lib. The canonical CLI test disables coloring while preserving all assertions. This consumer overlaps the pending HTTP/doc split #9193.
Assisted-by: OpenAI Codex:model version unavailable