5072 Commits
Author SHA1 Message Date
youknowdotandCodex e833153a4f Fix UTF-8 startup option precedence and refresh canonical tests (#9422)
* 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>
2026-10-28 18:23:22 +09:00
youknowdotandCodex 12b804554d Sync site startup processing and tests with CPython 3.15 (#9421)
* 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>
2026-10-28 18:22:00 +09:00
youknowdotandCodex 07b1cdba31 Update Windows registry behavior and canonical 3.15 tests (#9420)
* 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>
2026-10-28 17:35:55 +09:00
youknowdotandCodex 648b3b886b Support Python 3.15 array half and complex formats (#9419)
Add e, Zf and Zd storage, typecode routing, component byteswap and portable pickle decoding, preserving half float32 narrowing and complex sequence comparison semantics. Migrate test_array unchanged from CPython d220409 via update_lib. Replace byte-allocation ownership casts with aligned typed copies and correct signed pickle format selection.

Assisted-by: OpenAI Codex: model version unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:35:27 +09:00
youknowdotandCodex 674b6d8b1b Support native complex memoryview formats and NaN equality (#9418)
Sync canonical CPython 3.15 memoryview tests through update_lib migrate. Reuse existing buffer codecs and preserve released-view equality.

Assisted-by: Codex:model-version-unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:34:58 +09:00
youknowdotandCodex bd185e9052 Match Python 3.15 resource limit compatibility (#9417)
Accept only native-width negative aliases of RLIM_INFINITY with a deprecation warning, and expose available saved-limit constants. Migrate test_resource from CPython d220409a13b77de7a6c30abe16ea90db01528edc using scripts/update_lib, retaining the existing crash skip.

Assisted-by: OpenAI Codex: model version unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:34:24 +09:00
youknowdotandCodex a10f122ee3 Support large immutable fcntl and ioctl buffers for Python 3.15 (#9416)
Sync canonical fcntl/ioctl tests through update_lib and preserve owned syscall buffers across blocking calls.

Assisted-by: OpenAI Codex: model version unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:33:53 +09:00
youknowdotandCodex b9bb860cfb Account for SimpleQueue buffer capacity in sizeof (#9415)
Follow Rust container memory accounting and migrate the canonical Python 3.15 queue tests with scripts/update_lib. Mark only the CPython-specific object-layout size assertion as expectedFailure through explicit updater metadata.

Assisted-by: OpenAI Codex: model version unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:33:25 +09:00
youknowdotandCodex 167a999fcb Support Python 3.15 zlib checksum combination and version deprecation (#9414)
* Support Python 3.15 zlib checksum combination and version deprecation

Forward checksum combination to the existing zlib-rs backend, retaining CPython checksum masking, conversion warnings, and signed length bounds. Deprecate __version__ through module __getattr__. Sync the canonical test_zlib with scripts/update_lib.

Implementation and source review assisted by OpenAI Codex; focused compilation and Clippy passed. Canonical runtime tests remain pending.

Assisted-by: OpenAI Codex: model version unavailable

* Fix zlib combine ABI conversions for cross-platform Clippy

Mark checksum results must-use and make the C unsigned-long and length conversions explicit per ABI. Preserve Windows GNU's 32-bit z_off64_t and large-file length handling without lint suppression.

OpenAI Codex assisted with implementation and source review. Standalone common-crate Clippy passed; Windows validation remains with CI.

Assisted-by: OpenAI Codex: model version unavailable

---------

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:33:04 +09:00
youknowdotandCodex a20c0b8954 Retire obsolete stdlib paths after Python 3.15 relocations (#9413)
* Retire obsolete stdlib paths after Python 3.15 relocations

Verify canonical replacements before retiring 39 upstream-removed or relocated files. Preserve RustPython originals and update stale module/test metadata.

Assisted-by: Codex:GPT-6.1

* Preserve the frozen no-threading fallback after stdlib retirement

Replace the internal symlink with the exact previously referenced implementation, keeping the removed public _dummy_thread module retired.

Assisted-by: Codex:GPT-6.1

---------

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:30:21 +09:00
Jeong, YunWon 1ba0099126 Fix Windows runtime validation and 32-bit string size overflows (#9412)
Validate overlapped receive buffer sizes before starting I/O and preserve spawnv non-TypeError argument failures. Check replacement, tab expansion, and string join sizes before allocation to avoid 32-bit capacity overflows.

Implementation, regression investigation, and validation assisted by Codex.

Assisted-by: Codex:GPT-5
2026-10-28 17:29:51 +09:00
youknowdotandCodex dc8ea56566 Update 16 stdlib test modules from CPython 3.15 (#9411)
* Update 16 stdlib test modules from CPython 3.15

Sync with scripts/update_lib migrate from CPython d220409a13b77de7a6c30abe16ea90db01528edc, preserving existing RustPython markers.

Assisted-by: Codex:GPT-6.1

* Limit SEND completion tracing to generators and coroutines

Match CPython INSTRUMENTED_END_SEND receiver semantics: other awaitables returning values must not synthesize caller StopIteration trace events. Preserve actual exceptions, builtin generator/coroutine completion and trampoline paths.

Assisted-by: Codex:GPT-6.1

---------

Co-authored-by: Codex <codex@openai.com>
2026-10-28 17:29:13 +09:00
youknowdotandyouknowdot 058bebf0f0 Add canonical cross-interpreter serialization tests and fixture bridges (#9408)
* 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>
2026-10-28 10:11:59 +09:00
Mathieu Dupuy a463449e35 csv: support non-ASCII Unicode dialect characters (#9367)
* scripts: make check_redundant_patches.py executable

The redundant-test-patches pre-commit hook uses `language: script`, which
requires the executable bit, and fails on every commit touching Lib/test.

Assisted-by: Claude:claude-sonnet-5-5

* csv: support non-ASCII Unicode dialect characters

Store delimiter, quotechar and escapechar as `char` instead of `u8`, and
run the reader state machine and the writer over code points, so that a
single non-ASCII character such as `€` is accepted like in CPython. The
field size limit is now counted in characters rather than bytes.

Fixes #8408

Assisted-by: Claude:claude-sonnet-5-5
2026-10-28 01:23:02 +09:00
b25ab5e76b Align XML backend and canonical libraries with Python 3.15 (#9197)
* Align XML parsing and libraries with Python 3.15

Retain the existing XML backend accounting changes and their explicit registry publication limitation. Preserve canonical XML tests and existing RustPython guards, including multiline marker explanations through update_lib.

Assisted-by: OpenAI Codex:model version unavailable

* Retire proven XML guards and sync canonical consumers

Assisted-by: OpenAI Codex:model version unavailable

* Rebase vendored xml onto 1.4.0

Replace the vendored crate sources with the published xml 1.4.0 archive
and reapply the amplification accounting patch on top of it. The two
lexer hunks that conflicted with the new line-ending normalization are
merged into the 1.4.0 read loop. The patch no longer normalizes CR in
entity values or collapses CRLF in attribute values, because the 1.4.0
lexer and attribute reader already do so.

Update the checksums, recorded upstream commit, archive hash and
provenance notes, and require version 1.4 for the path dependency.

Assisted-by: Claude Code:claude-opus-5-5

* Remove stale SAX external resolver expected failure

Linux and macOS canonical CI both demonstrate that the existing
unsupported-scheme resolver test passes. Retire only its expected-failure
decorator through update_lib, preserving its canonical assertions.
This does not implement external DTD parsing.

AI assistance: dot diagnosed CI, migrated the marker, and reviewed the
source delta and normal-hook validation; the model version is not exposed.

Assisted-by: dot: model version not exposed

---------

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
2026-10-27 21:02:59 +09:00
youknowdotandCodex 75df7a8c2e Implement PEP 798 comprehension unpacking (#9342)
* 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>
2026-10-27 13:29:59 +09:00
Jeong, YunWon 1df1daea3e Fix Windows runtime compatibility issues (#9406)
Correct socket address handling, untracked mappings, directory enumeration, winsound validation, and executable path discovery. Report the vendored Unicode version independently of the Rust toolchain.

Assisted-by: Codex:GPT-5
2026-10-27 13:28:36 +09:00
youknowdot 1052e613ed Preserve interpreter-boundary diagnostics and syslog restrictions (#9365)
* 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
2026-10-26 14:15:38 +09:00
youknowdotandCodex 557995b3e5 Sync canonical gated test sources and Lib metadata (#9369)
Assisted-by: OpenAI Codex: model version unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-26 10:12:14 +09:00
youknowdot dca9dfdf38 Add canonical Python 3.15 optional native integration sources (#9368)
Copy curses frontend sources and canonical curses, DBM, Tcl and DTrace
integration tests from CPython v3.15.0 through update_lib. Preserve
upstream optional-native/resource/configuration gates and canonical file
modes, without adding native implementations or custom skips.

Validate source identity, hooks and default/frozen compile-only checks.
Native runtime integration and probe execution remain unvalidated.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-26 10:10:47 +09:00
youknowdot 163b8c557c Add canonical Python 3.15 sampling collector sources (#9366)
Copy the remaining live collector package, related canonical tests, and
Python logo asset from CPython v3.15.0 through update_lib. Keep source
availability distinct from supported live sampling or curses execution.

Exclude the child monitor and its tests: introducing that module would
activate --subprocesses before native child discovery is implemented.
Preserve all upstream resource gates without adding skips or shims.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-26 10:09:16 +09:00
youknowdot 0dca682e45 Update Python 3.15 test harness helpers and discovery (#9364)
Assisted-by: OpenAI Codex: model version unavailable
2026-10-25 15:14:33 +00:00
youknowdot d1c3cb745a Add canonical offline sampling profiler tests (#9360)
Import test_async.py and test_profiler.py with scripts/update_lib migrate
from CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc.

Validate the 37 existing offline async graph and statistics-rendering
tests without changing canonical assertions or markers.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-25 21:30:50 +09:00
youknowdot 901eb883a7 Add canonical sampling profiler CLI for offline replay (#9358)
Import the CLI, entry point, error type, coordinator dependency, and CLI
tests with scripts/update_lib migrate from CPython 3.15.0 at
d220409a13b77de7a6c30abe16ea90db01528edc.

This frontend follows the existing offline collector/codec support. Live
attach, run, and dump remain unsupported and unvalidated.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-25 10:16:32 +00:00
youknowdot 2efa217efe Restore canonical traceback Levenshtein coverage (#9346)
Import the unchanged Python 3.15.0 fixture with the official library updater
and retire the missing-fixture expectedFailure after validating the existing
distance and threshold tests. Preserve all assertions and unrelated markers.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-25 15:12:19 +09:00
1ndahous3 db4878080a Collect cycles through sets, frozensets and set iterators (#9343)
Assisted-by: Codex:GPT-6
2026-10-25 15:10:43 +09:00
youknowdotanddependabot[bot] 8c0c242dc8 Align profiler bindings and capability checks with Python 3.15 (#9340)
* Align offline profiler argument binding with Python 3.15

Accept the canonical keyword names for binary sample writes and native
context exits. Resolve the argument layout before numeric callbacks,
then preserve float-subclass payloads while accepting numeric protocols
for required and optional profile statistics.

AI-assisted source extraction, implementation, and source review with
OpenAI Codex. Runtime validation remains pending.

Assisted-by: OpenAI Codex:model version unavailable

* Restore the offline profiler capability flag

Preserve the original mega branch's zero-valued process_vm_readv
capability export. The native live unwinder remains unsupported; this
restores the public feature query without claiming live inspection support
or changing canonical test helpers.

AI-assisted source preservation and review with OpenAI Codex.

Assisted-by: OpenAI Codex:model version unavailable

* Restore finite-EOF table bounds for offline profiles

Match CPython's EOF-wide table count and decoding windows while retaining
checked offsets, allocation limits, cursor bounds, and replay checks.
This restores the original mega's finite-file contract without changing
canonical tests or the already validated argument-binding implementation.

Assisted-by: OpenAI Codex:model version unavailable

* Preserve symtable warning exceptions and original filenames (#9282)

Keep warning-hook exceptions untouched instead of rewriting SyntaxError
subclasses. Thread the original Python filename through parser warning
emission and fresh warning-as-error SyntaxError construction, preserving
fsdecoded bytes paths and lone surrogates.

Assisted-by: OpenAI Codex:model-version-unavailable

* build(deps): align the Cranelift 0.136 dependency family (#9341)

* build(deps): bump the wasmtime group across 1 directory with 2 updates

Bumps the wasmtime group with 2 updates in the / directory: [cranelift](https://github.com/bytecodealliance/wasmtime) and [cranelift-module](https://github.com/bytecodealliance/wasmtime).


Updates `cranelift` from 0.135.2 to 0.136.3
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/commits)

Updates `cranelift-module` from 0.135.3 to 0.136.3
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/commits)

---
updated-dependencies:
- dependency-name: cranelift
  dependency-version: 0.136.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: wasmtime
- dependency-name: cranelift-module
  dependency-version: 0.136.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: wasmtime
...

Signed-off-by: dependabot[bot] <support@github.com>

* Align cranelift-jit with the 0.136 dependency family

Update cranelift-jit alongside cranelift and cranelift-module so the JIT shares their LibCall, FuncId, and Module trait identities. Regenerate only the affected dependency lock entries, preserving the original dependency PR changes.

AI assistance covered the dependency diagnosis, alignment, and static review.

Assisted-by: OpenAI Codex:model-version-unavailable

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Support selective canonical function migration

Add hash-pinned function selection to the official Lib migration tool,
preserving canonical source bytes and rejecting ambiguous dependencies.

Assisted-by: OpenAI Codex:model version unavailable

* Detect CPython runtimes for canonical inspection feature checks

Add native runtime-cookie detection and import the exact Python 3.15
inspection helpers and tests through the official Lib migration tool.
Preserve the offline profiler argument and finite-EOF corrections.

Assisted-by: OpenAI Codex:model version unavailable

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-25 15:09:49 +09:00
youknowdotandyouknowdot c70e9b8443 Sync selected Python 3.15 core library tests and repr type errors (#9321)
* 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>
2026-10-23 18:01:14 +09:00
youknowdot d8b8e47d74 Sync canonical asyncio, marshal and offline profiling libraries (#9315)
Migrate nine substantial stdlib and canonical test modules from CPython
v3.15.0 through scripts/update_lib, preserving RustPython adaptations.
Include offline stack formatting without live process inspection or
changes to the held profiling frontend and test-support closure.

Assisted-by: Codex:unknown
2026-10-23 17:56:04 +09:00
youknowdot 6c171fffe1 Align mapping collection and call unpacking with Python 3.15 (#9302)
* Align mapping collection and call unpacking with Python 3.15

Preserve iterator exceptions and exact-list results when collecting mapping
methods, defer callable formatting, and retain exact-dict stored hashes.
Synchronize complete test_extcall with CPython v3.15.0.

Assisted-by: Codex:unknown

* Update pickle and pickletools libraries for Python 3.15

Synchronize the six coherent serialization modules with CPython v3.15.0
through update_lib, retaining existing RustPython adaptations.

Assisted-by: Codex:unknown
2026-10-22 23:23:15 +09:00
youknowdotandCodex 0b0a360764 Use __main__ when compiling filesystem scripts (#9301)
Forward script compiler warnings through the typed module-aware entry point. Sync canonical command-line script coverage from CPython d220409a13b77de7a6c30abe16ea90db01528edc with the existing RustPython marker preserved.

Assisted-by: OpenAI Codex:model-version-unavailable

Co-authored-by: Codex <codex@openai.com>
2026-10-22 12:02:16 +00:00
youknowdot 4cb36ea8f2 Synchronize core language tests with Python 3.15 (#9300)
Regenerate eight canonical language and container test modules using
scripts/update_lib at CPython d220409a13b77de7a6c30abe16ea90db01528edc.
Retain RustPython adaptations except the formatting expected-failure
marker confirmed stale by an XPASS and a subsequent unmarked pass.

AI-assisted source selection, synchronization, dependency review and
bounded validation using OpenAI Codex.

Assisted-by: Codex:unknown
2026-10-22 11:14:40 +00:00
SeungJe Jeong e57c8db83a Allow same-size bytearray.resize with exported buffers (#9217)
* 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
2026-10-22 19:37:21 +09:00
youknowdot ccab27c12a Synchronize developer tools with Python 3.15 (#9298)
Regenerate bdb, pdb, codeop, modulefinder and the canonical modulefinder
test using scripts/update_lib at CPython 3.15.0
d220409a13b77de7a6c30abe16ea90db01528edc.

AI-assisted source selection, synchronization, dependency review and
bounded validation using OpenAI Codex.

Assisted-by: Codex:unknown
2026-10-22 09:36:51 +00:00
youknowdot 1ba1107115 Align ctypes call ownership and C error state with Python 3.15 (#9218)
* 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
2026-10-22 18:16:22 +09:00
youknowdot 1ffba21557 Synchronize regression harness helpers with Python 3.15 (#9297)
Regenerate nine canonical modules using scripts/update_lib at CPython
3.15.0 d220409a13b77de7a6c30abe16ea90db01528edc. Keep the discovery
package split out until its missing test family is available.

AI-assisted source selection, synchronization, review and bounded
validation using OpenAI Codex. No native capability claims are added.

Assisted-by: Codex:unknown
2026-10-22 18:14:03 +09:00
youknowdot e102ccdae1 Use globals module names for eval and exec warnings (#9294)
* 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.
2026-10-22 18:10:44 +09:00
Jeong, YunWonandyouknowdot f0b1e82652 Add tracing profiler and Python 3.15 offline profiling tools (#9271)
* Add deterministic profiler and canonical Python 3.15 tools

Use the merged operation critical sections with interpreter-bound profiler
entry checks and short payload borrows. Trace owned code references for GC.
Import the canonical tracing and offline profiling output closure via the
repository updater, retaining existing test markers.

Assisted-by: dot:GPT-6.1

* Clarify standalone profiling license cross-reference

Preserve license terms and copyright notices; point to the reproduced
Apache text below instead of CPython's original OpenSSL section above.

Assisted-by: dot:GPT-6.1

* Defer unsupported sampling package from profiler extraction

Keep the deterministic tracing profiler and its canonical tools together.
Defer the entirely new sampling production, tests, assets and their license
as one closure until native record and binary-collector support is ready.
Retain canonical pstats for deterministic empty-profile handling; its
upstream sampled-file sorting issue is not patched here.

Assisted-by: dot:GPT-6.1

* Stage profiling root as a namespace until sampling is available

Omit the whole newly added canonical package initializer rather than
advertise an absent sampling module or hand-edit canonical __all__.
Explicit profiling.tracing and cProfile imports remain available.
The namespace root intentionally lacks canonical metadata/automatic exports.

This addresses test___all__ failures in the prior Linux, macOS and Windows
CI runs. No test assertions, skips or canonical file contents are changed.

Assisted-by: dot:GPT-6.1

* Match canonical static builtin profiler labels and metadata

Normalize the raw builtin receiver instead of its call-argument accessor.
Snapshot static method module metadata at construction, matching CPython,
so explicit module mutation and deletion remain observable. Avoid a
profiler-time fallback that would obscure deleted metadata.

Correct float.__getformat__ to CPython's classmethod calling convention,
including subclass binding, rather than special-casing its profiler label.

Assisted-by: dot:GPT-6.1

* Support collision-safe frozen package containers

Generate empty frozen packages only for source namespace directories with
real frozen descendants. Preserve genuine modules and packages across
frozen-library registrations while retaining real-real replacement order.

Record the container marker in FrozenModule and its library envelope;
legacy module/package encodings remain unchanged. This is closed-tree
frozen packaging, not full PEP 420 namespace merging.

Add structural codec, mock generator, and registration-priority checks.

* Revert frozen package containers before restoring canonical profiling root

The container implementation changed filesystem namespace precedence.
Restore the existing importer and frozen envelope unchanged; the following
offline sampling closure restores the canonical regular package root.

This reverses d5a8049234.

Assisted-by: dot:GPT-6.1

* Restore canonical profiling package with offline sampling codec

Provide native records, status constants and genuine uncompressed binary
reader/writer APIs for canonical offline tools. Keep the unsupported live
process capability absent and preserve existing canonical test gates.
Restore the complete selected sampling production/test/assets closure via
update_lib, including its asyncio frame-schema dependency. The prior frozen
container extension is reverted separately; canonical packages work with
both filesystem and frozen imports without changing namespace semantics.

Assisted-by: dot:GPT-6.1

* Keep platform-dependent C long normalization explicit

Allow only the c_long-to-i32 conversion lint: Windows uses the same type,
while LP64 requires the existing truncation to match CPython normalization.
No runtime behavior or test assertions change.

Assisted-by: dot:GPT-6.1

* Include profiling notices in library and desktop packages

Bundle a byte-identical copy of the root profiling notice in rustpython-pylib
and include the root notice in configured desktop resources. Avoid a symlink
so Windows checkouts preserve the actual notice text. Terms are unchanged.

Assisted-by: dot:GPT-6.1

* Keep profiling asset license notice in pylib crate

* Serve frozen profiling assets through native resource readers

* Preserve canonical profiling asset line endings on checkout

---------

Co-authored-by: youknowdot <dot@youknowone.org>
2026-10-22 11:18:03 +09:00
youknowdot 5aab0db07d Align duplicate-parameter diagnostics with Python 3.15 (#9287)
* Align duplicate-parameter diagnostics with Python 3.15

Preserve source names and locations in both symbol-table paths, and migrate
the existing canonical codeop expectation through update_lib.

Assisted-by: OpenAI Codex: model version unavailable

* Sync positional-only duplicate-parameter expectations

Migrate the full pinned CPython 3.15.0 test file through update_lib. Its only delta is six existing expected messages, completing the dependent canonical wording coverage.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-22 10:16:23 +09:00
youknowdot 3b87cbe559 Mark wrapper descriptors as method descriptors (#9286)
* Mark wrapper descriptors as method descriptors

Match CPython 3.15 wrapper_descriptor flags so existing method lookup
can use the descriptor's direct receiver-prepending dispatch path.

Assisted-by: OpenAI Codex:model-version-unavailable

* Retire fixed wrapper monitoring expected failure

Regenerate test_monitoring from pinned CPython 3.15.0 with the updater, preserving every other adaptation. The METHOD_DESCRIPTOR flag now supplies the canonical receiver in int.__repr__ CALL/C_RETURN events.

Assisted-by: OpenAI Codex:model-version-unavailable
2026-10-22 10:15:53 +09:00
youknowdot 4bd4320932 Align coroutine await-result diagnostics with Python 3.15 (#9284)
Report the qualified awaitable and returned type when __await__ does not
produce an iterator, preserving the existing coroutine/iterator checks.
Migrate test_coroutines.py from pinned CPython v3.15.0 through update_lib.

Assisted-by: OpenAI Codex:model-version-unavailable
2026-10-22 10:13:11 +09:00
youknowdot b976859e8d Sync canonical Python 3.15 GUI libraries and tests (#9283)
Refresh the IDLE, Tkinter and turtle family through update_lib, including
the direct canonical text-only helper and image fixture dependencies.
Preserve capability/display guards without changing native Tk support.

Assisted-by: OpenAI Codex:model-version-unavailable
2026-10-22 10:12:45 +09:00
Jeong, YunWonandyouknowdot bcfad3554e Align symbol table introspection with Python 3.15 (#9277)
Accept the module keyword when building symbol tables and emit only parser
warnings through the existing bounded warning path. Preserve source filenames
and warning-to-SyntaxError conversion without compiling bytecode.

Expose canonical lambda and generator-expression names while retaining
already-bracketed comprehension names. Synchronize symtable and its tests
from pinned CPython 3.15.0 through update_lib, including cell introspection.

Assisted-by: OpenAI Codex:model-version-unavailable

Co-authored-by: youknowdot <dot@youknowone.org>
2026-10-22 01:54:22 +09:00
cf56c1fa09 build(deps): bump xml from 1.3.0 to 1.4.0 (#9253)
* build(deps): bump xml from 1.3.0 to 1.4.0

Bumps [xml](https://github.com/kornelski/xml-rs) from 1.3.0 to 1.4.0.
- [Changelog](https://github.com/kornelski/xml-rs/blob/main/Changelog.md)
- [Commits](https://github.com/kornelski/xml-rs/compare/1.3.0...1.4.0)

---
updated-dependencies:
- dependency-name: xml
  dependency-version: 1.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove stale XML test expected failure

Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
2026-10-21 19:58:21 +09:00
1ndahous3 11a6455c61 Fix ctypes assignment conversion and backing-buffer retention (#9251)
* Fix ctypes assignment conversion and backing-buffer retention

Assisted-by: Codex:GPT-6

* Preserve ctypes assignment metadata and pointer-width writes

Assisted-by: Codex:GPT-6

* Enable passing Windows console tests

Assisted-by: Codex:GPT-6
2026-10-21 12:06:39 +09:00
youknowdotandJeong YunWon 70c3f6c06d Align signal wakeup errors and delivery with Python 3.15 (#9199)
* 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>
2026-10-20 20:08:49 +09:00
youknowdot 1be1628666 Report fatal explicit-home startup failures (#9227)
* 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
2026-10-20 09:27:23 +09:00
youknowdot 58b54c4f40 Update ten storage and developer-tool modules to Python 3.15 (#9209)
* 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
2026-10-19 22:12:12 +09:00
youknowdot 5235a893be Update asyncio libraries and ftplib cleanup to Python 3.15 (#9211)
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
2026-10-19 20:34:29 +09:00
youknowdot 7f5cc0e35c Align import, numeric and warning edge cases with Python 3.15 (#9210)
* 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
2026-10-19 20:34:04 +09:00