Query the existing object flag without interning or content lookup. Mark only a successful pool insertion before releasing its write lock so a concurrent lookup cannot return the entry before its flag is set.
Assisted-by: OpenAI Codex: model version unavailable
Co-authored-by: Codex <codex@openai.com>
* Adopt pymath remainder fix on Windows
Pin pymath to the merged CPython-compatible remainder implementation and remove the passing Windows expected-failure marker.
Investigation, implementation, and validation assisted by Codex.
Assisted-by: Codex:GPT-5
* Keep deferred object deallocation iterative
Run deferred deallocators inside a guarded trashcan context so their end calls cannot recursively drain the same queue. Reset the depth on unwind and test the drain invariant. Fixes stack overflow while dropping deeply nested Element trees on Windows.
Investigation, implementation, validation, and focused review assisted by Codex.
Assisted-by: Codex:GPT-5
* Fix 32-bit sequence hashes, repetition errors, and range state
Use the declared 64-bit hash width for tuple hashing on every target, raise MemoryError for oversized sequence allocations, and preserve arbitrary-precision positions in long range iterators. Keep exhausted iterators exhausted instead of wrapping their counters.
Add Rust regression tests and verify the canonical Python suites with an optimized Windows x86 interpreter. Implementation, investigation, validation, and focused review assisted by Codex.
Assisted-by: Codex:GPT-5
* Fix UTF-8 startup option precedence and refresh canonical tests
Resolve the first explicit UTF-8 option before environment validation and align startup diagnostics with CPython 3.15. Refresh canonical encoding tests through update_lib and narrow the existing environment test failure to Windows. Support only monotonic expected-failure narrowing in updater metadata with focused regression tests.
Assisted-by: OpenAI Codex: model version unavailable
* Normalize configured standard-stream codec names
Resolve explicit stdio encodings through CodecInfo.name before creating standard streams, matching CPython initialization. Preserve ordinary TextIOWrapper spelling and existing standard-stream error policies; leave canonical tests unchanged.
Assisted-by: OpenAI Codex: model version unavailable
* Retire passing standard-stream UTF-8 expected failure
The configured-codec normalization fix makes canonical test_stdio pass in both Linux CI attempts. Remove only its stale expectedFailure through update_lib, preserving canonical assertions and all other platform guards.
Assisted-by: OpenAI Codex: model version unavailable
---------
Co-authored-by: Codex <codex@openai.com>
* Sync site startup processing and tests with CPython 3.15
Preserve existing RustPython identity, path expectations, and four _pth expected failures via explicit updater metadata.
Assisted-by: OpenAI Codex: model version unavailable
* Honor standalone executable ._pth startup configuration
Apply explicit path isolation before CLI environment settings, preserve canonical empty-file and prefix handling, and retire three expected failures proven by test_site.
Assisted-by: OpenAI Codex: model version unavailable
* Retire passing Windows underpth expectation
The canonical DLL-named test passed in both Windows CI attempts on e1527c53. Remove only its obsolete expectedFailure through update_lib.
Assisted-by: OpenAI Codex: model version unavailable
---------
Co-authored-by: Codex <codex@openai.com>
* Update Windows registry behavior and canonical 3.15 tests
Add DeleteTree with nullable wide paths, audit emission, native errors, and thread release; compare HKEY handles as CPython does while retaining upstream identity hashing. Migrate canonical winreg and winapi tests from CPython d220409a13b77de7a6c30abe16ea90db01528edc.
Assisted-by: OpenAI Codex: model version unavailable
* Accept nullable subkeys in winreg OpenKey
Keep sub_key required while accepting None, matching CPython and the canonical HKEY comparison test prerequisite. Forward a null path to RegOpenKeyExW, retain owned wide strings across thread release, and emit the input and result audit events without leaking the returned handle on an audit error.
Assisted-by: OpenAI Codex: model version unavailable
---------
Co-authored-by: Codex <codex@openai.com>
* Add canonical cross-interpreter serialization tests and fixture bridges
Import the complete CPython test_crossinterp module and provide its capsule bridges using existing serialization and validation logic. Keep fixture modes private instead of expanding SharedValue or interpreter lifecycle APIs.
Assisted-by: OpenAI Codex: model version unavailable
* Simplify canonical cross-interpreter fixture dispatch
Match CPython 3.15.0 mode dispatch with one private constructor instead of six forwarding entry points. Keep generic marshal data distinct from code transport, preserve capsule ownership checks and pure-script validation, and leave the canonical tests unchanged.
Assisted-by: OpenAI Codex: model version unavailable
---------
Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
* Support PEP 798 comprehension unpacking
Extract the remaining Python 3.15 comprehension unpacking implementation
from the integration branch. Use existing list/set/dict update operations
and an explicit inner iterator loop for generator unpacking. Align the
public DictComp AST representation and schema with CPython.
Migrate test_unpack_ex and test_unparse with scripts/update_lib from
CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve existing Rust tests;
add no duplicate regression tests or snippets.
AI-assisted source extraction, canonical migration, and independent source
review with OpenAI Codex. Runtime validation is not yet complete.
Assisted-by: OpenAI Codex:model version unavailable
* Improve selected unpacking diagnostics and refresh canonical exception tests
Normalize six supported comprehension-unpacking diagnostics using existing parser context. Restrict the dictionary-spread hint to its first entry to avoid changing unrelated diagnostics.
Migrate the whole test_exceptions module from CPython d220409a13b77de7a6c30abe16ea90db01528edc with the existing updater, preserving only its two existing RustPython markers. Ruff sources and dependency pins are unchanged.
Six focused check/build/strict Clippy gates passed. A paired 34-input compile-only comparison retains six canonical diagnostic improvements, with eight of fifteen canonical cases still differing; this is not full test_exceptions or CI validation.
* Fix mapping-rest error locations and retire stale encoding xfail
* Match remaining unpacking diagnostics without changing Ruff
Use exact retained AST and error ownership to normalize the remaining CPython 3.15 unpacking diagnostics. Reparse only the owned call argument slice with the unchanged Ruff parser when its original recovery loses generator clauses.
Validated all 30 canonical compile-only cases in exec and doctest-style single modes against CPython 3.15.0, plus finite surrounding controls. Targeted compiler Clippy and source-bound builds passed. Full CI is pending. Cspell alone was omitted with the maintainer’s explicit one-commit approval because its npm bootstrap downloads returned HTTP 403; all other applicable configured commit hooks ran.
AI assistance: dot authored, reviewed, and validated the changes. The runtime does not expose its exact model version.
Assisted-by: dot: model version not exposed
---------
Co-authored-by: Codex <codex@openai.com>
A static type with no tp_new of its own whose base is object now gets
DISALLOW_INSTANTIATION instead of inheriting object's tp_new, following
type_ready_set_new. Such types no longer expose an inherited __new__.
A static type that inherits a non-NULL tp_new from its base must have the
same basicsize as that base; type initialization panics otherwise. Types
flagged HEAPTYPE are exempt, like classes created at runtime.
_IOBase is flagged HEAPTYPE so that it keeps inheriting object's tp_new.
FutureIter, TaskStepMethWrapper, hamt, InstructionSequence and
itertools._grouper get constructors of their own.
Assisted-by: Claude:claude-opus-5-5
Assisted-by: Grok:grok-4.7
* Preserve Unicode in thread unraisable messages
Keep the callable representation as WTF-8 for unraisable hooks and audit callbacks. Preserve the existing String entry point and stderr fallback; this does not claim lossless stderr rendering.
Assisted-by: OpenAI Codex:model unavailable
* Use the WTF-8 string conversion constructor
Use the existing From<&str> implementation to copy the message prefix without changing Unicode semantics.
Assisted-by: OpenAI Codex:model unavailable
* Preserve cross-interpreter marshal error causes
Wrap failures from existing code/function serialization helpers as NotShareableError, matching the CPython 3.15 marshal boundary while retaining the original exception cause. No new test C API or lifecycle behavior.
Assisted-by: OpenAI Codex:model-unavailable
* Enforce syslog interpreter boundaries and sync queue cleanup
Reject subinterpreter openlog/closelog before audit or host mutation, and
reject implicit syslog opening after audit when the process logger is not
already open, matching CPython 3.15 guard placement and error text.
Already-open logging and setlogmask remain unchanged.
Migrate concurrent/interpreters/_queues.py through scripts/update_lib to
CPython d220409a13b77de7a6c30abe16ea90db01528edc, removing unused eager
pickle import and exception targets. Native serialization imports pickle
on demand; module import timing and debug locals may nevertheless differ.
No new fixtures or interpreter lifecycle mechanisms are introduced.
Assisted-by: OpenAI Codex:model version unavailable
Move the existing conversion helper into the production time module and reuse it from sleep, preserving conversion bodies and internal C-API argument binding.
Assisted-by: OpenAI Codex:model version unavailable
Use decoded logical instructions rather than the preceding raw operand byte. Check referenced constants by None identity and decode common constants without panicking.
Assisted-by: OpenAI Codex:model unavailable
* Fix rounding and bounds in existing PyTime test helpers
Extract the already-exposed conversion helper prerequisite from the broader #9143 surface without adding new test C-API exports or changing time.sleep.
Assisted-by: Codex:unknown
* Complete PyTime conversion fixtures in _testinternalcapi
Stack the eight consumed conversion APIs on the existing-helper prerequisite in #9317. Keep the arithmetic local to the real fixture consumers; do not expose _testcapi or change sleep/lifecycle behavior.
Assisted-by: Codex:unknown
---------
Co-authored-by: Codex <codex@openai.com>
* Use closing-token locations for interpolated body warnings
Track CPython string-parser fragment anchors separately from escape source offsets. Preserve scoped error-line text and mode-specific final newlines with lazy sparse location indexing.
Assisted-by: OpenAI Codex:model-version-unavailable
* Fix lint checks for interpolated warning diagnostics
Assisted-by: OpenAI Codex (model version unavailable)
* Match CPython interpolated warning phases and fragment diagnostics
Reconstruct body and format-spec decoder fragments, preserve tokenizer/parser action order and pending Single/type-comment errors, and match Unicode protection plus scoped numeric and ordinary-token diagnostics.
Assisted-by: OpenAI Codex:model-version-unavailable
* Use physical final-line locations for ordinary exec warnings
Keep warning and error coordinates consistent across bare CR, CRLF, and LF while retaining file-input synthetic newlines.
Assisted-by: OpenAI Codex:model-version-unavailable
Use the collected lexical warning order for valid Exec/Eval inputs without parser-origin escape events. Keep tokenizer errors terminal and retain mixed-origin, invalid-source, and Single fallback behavior.
Assisted-by: OpenAI Codex:model-version-unavailable
* Count positional arguments before converting any
FuncArgs::bind_for rejected surplus positional arguments only after
FromArgs::from_args had converted every declared parameter. A
conversion can run user code (__iter__ for PyIter, __index__ for
ArgIndex), so filter(None, it, 0), hex(x, 1) and pairwise(it, 0) raised
whatever that code raised instead of the TypeError CPython reports
before it touches any argument.
Check the count against FromArgs::arity() before from_args runs. For
that bound to be safe:
- The default arity() has no upper bound, since a manual impl may take
positional arguments itself. KwArgs, (), DirFd, OpenDirFd and csv's
FormatOptions declare the bound they actually have.
- A derived struct adds the upper bound of each flattened field.
- A tuple sums upper bounds with saturating_add.
Assisted-by: Claude Code:claude-opus-5-5
* Note why arity upper bounds saturate
Comment that an unbounded upper bound is usize::MAX, which is why the
tuple and derived arity() sums use saturating_add, and drop the CPython
mention from the positional count check comment.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Publish readiness only after the main interpreter has completed its first operation, and bound the detached subinterpreter readiness wait. Preserve the original progress assertions, main deadline, and safepoint.
AI assistance covered diagnosis, source changes, review, and focused validation.
Assisted-by: OpenAI Codex:model-version-unavailable
* Reuse unchanged string results in affix removal and partitioning
Assisted-by: Codex:GPT-6
* Qualify the ASCII macro in the string test
Assisted-by: Codex:GPT-6
* Sync Python 3.15 core library tests and repr type errors
Synchronize ten selected library paths from CPython 3.15.0 at
d220409a13b77de7a6c30abe16ea90db01528edc using the canonical updater,
retaining existing RustPython adapters and failure markers.
Match generic __repr__ invalid-result errors to the qualified type-name
format required by the canonical ExceptionGroup regression, preserving
string results and exceptions raised by the implementation.
Implementation, source review, and validation were AI-assisted. The model
version identifier is unavailable; automated checks are not human
verification. Bounded validation covers 43 passes and one canonical skip,
not the full repository suites.
Assisted-by: OpenAI Codex:model version unavailable
* Preserve original escape decoder consumed length after callbacks
Keep the original input length as consumed after successful unicode-escape
and raw-unicode-escape decoding, including error-handler input replacement.
Only report the current cursor when a non-final decode stops on incomplete
input, matching CPython's codec wrappers and incomplete exits.
Fix the canonical Unicode escape mutation regression that failed CI on
Linux, macOS and Windows. Preserve all Lib tests and existing assertions.
Bounded Linux validation: 55 passes and one canonical skip, CLI build and
strict common/VM Clippy passed. Full repository suites were not run.
Implementation, source review, and validation were AI-assisted. The model
version identifier is unavailable; automated checks are not human
verification.
Assisted-by: OpenAI Codex:model version unavailable
---------
Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
Keep constructor fast paths separate from per-instance vectorcall support.
Track automatic eligibility without discarding raw support required by
PyVectorcall_Call, and recheck eligibility in retained callable wrappers.
Implementation and source review were AI-assisted. The model version
identifier is unavailable; automated checks are not human verification.
Assisted-by: OpenAI Codex:model version unavailable
Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
Match ordinary single compilation by allowing later numeric warnings raised as errors to take precedence after a parser-origin escape warning. Preserve tokenizer-origin guards and the separate prompt path.
Assisted-by: Codex:unknown
Reuse the parser warning collector only for valid, recovery-eligible source. Preserve malformed-source and tokenizer-origin interpolation fallback.
Assisted-by: OpenAI Codex:model-version-unavailable
* Allow same-size bytearray.resize with exported buffers
Use the existing export snapshot or exclusive payload access to allow
same-size requests without a recursive read lock in codec callbacks.
Continue rejecting exported length changes and preserve zero filling.
Enable the CPython regression and consolidate resize coverage in the
existing bytearray snippet, including a bounded concurrent callback test.
Assisted-by: Codex:GPT-6
* remove redundant tests
* Align ctypes call ownership and C error state with Python 3.15
Keep native raised errors separate from handled exceptions and preserve them across teardown callbacks. Import the related canonical ctypes call and type contracts.
Assisted-by: OpenAI Codex: model version unavailable
* Enumerate ctypes shared libraries natively on Linux and Android
Copy loader-owned names before Python filesystem decoding and update the related canonical ctypes utility and discovery tests from CPython 3.15. Preserve existing platform paths and dllist test markers.
Assisted-by: OpenAI Codex: model version unavailable
* Enable canonical dllist system enumeration coverage on Linux
Regenerate the pinned test through update_lib patches with reviewed marker data. Preserve other platform conditions and the unavailable extension-fixture guard.
Assisted-by: OpenAI Codex: model version unavailable
* Match Python float and long-double C argument representations
Use the existing Python float formatter for float and double C argument representations. Keep long-double arguments on the canonical generic-address representation path. Preserve the unchanged canonical parameter repr assertions.
Assisted-by: OpenAI Codex: model version unavailable
* Use globals module names for eval and exec warnings
Forward the supplied scope module through compilation warnings while
preserving typed compile entrypoints and missing-name filename fallback.
* Retire the resolved exec warning-filter expected failure
Regenerate test_builtin through update_lib with all other adaptations
preserved after hosted CI reports the canonical method succeeds.
Follow CPython PyFloat_AsDouble without calling float-subclass overrides.
Keep index precedence and other conversion behavior unchanged.
Assisted-by: OpenAI Codex
Match CPython 3.15 await-result diagnostics and reject coroutine results
from custom __await__ consistently with the nondefaulted path. Preserve
native-coroutine unwrapping and wrapper state handling.
Assisted-by: OpenAI Codex:model-version-unavailable
Recognize numeric Expr::Constant values when validating signed literal
patterns, alongside parser-produced NumberLiteral nodes. Python AST
conversion uses the former representation. Accept unary plus as well as
minus and fold signed real/imaginary and complex patterns consistently.
Boolean and non-numeric constants remain excluded. Preserve the existing
parser-produced literal path and do not change source grammar.
Assisted-by: OpenAI Codex:model-version-unavailable