Commit Graph
17661 Commits
Author SHA1 Message Date
youknowdot 6e82636bee Add Python 3.15 encoding normalization helper (#9115)
Extract _codecs._normalize_encoding and delegate encodings.normalize_encoding
to it using the final CPython 3.15 library source. Preserve case and dots,
validate UTF-8 before NUL truncation, and retain wrapper warnings and bytes
conversion. Add bounded regression assertions without changing registry keys.

Lib/encodings/__init__.py was updated via scripts/update_lib migrate from
CPython d220409a13b77de7a6c30abe16ea90db01528edc, with byte-identical output.

AI assistance: OpenAI Codex implemented and source-reviewed this split,
ran update_lib, prepared bounded regressions and performed focused automated
validation. No human manual testing is claimed.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 00:53:59 +09:00
1ndahous3 db33af9c3e Validate socket receive sizes and bound truncated results (#9108)
* Validate socket receive sizes and bound truncated results

Assisted-by: Codex:gpt-6

* Fix socket receive checks across platforms

Assisted-by: Codex:gpt-6
2026-10-14 23:56:06 +09:00
dependabot[bot] 1269277af5 build(deps): bump indexmap from 2.14.0 to 2.14.2 (#8993)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.14.0 to 2.14.2.
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.14.0...2.14.2)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-version: 2.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 23:54:07 +09:00
Jeong, YunWonanddot 2a09ee02bd Align compiler and VM bytecode contracts with CPython 3.15 (#9105)
* Align compiler and VM with final CPython 3.15 bytecode

Reconstruct the compiler-only baseline from validated487ae47 on the current main and frozen mapping prerequisitec78d811. Preserve the full source delta while dropping obsolete prerequisite ancestry; detailed old-to-new provenance is retained in the recovery artifact.

Assisted-by: OpenAI Codex: model identifier unavailable

* Fix final script validation, exception cleanup and private cache contracts

Replay reviewed compiler CI repairs 2191a9d, 1f1fe04, a2dacaf on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure.

Assisted-by: OpenAI Codex: model identifier unavailable

* Align canonical compiler fixtures and generator frame state

Replay reviewed compiler CI repairs 476bb74 on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure.

Assisted-by: OpenAI Codex: model identifier unavailable

* Preserve code-name owners and final warning and constant-fold contracts

Replay reviewed compiler CI repairs 6482adf on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure.

Assisted-by: OpenAI Codex: model identifier unavailable

* Skip unavailable monitoring C API tests before tool registration

Replay reviewed compiler CI repairs 246c309 on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure.

Assisted-by: OpenAI Codex: model identifier unavailable

* Assert exact final constant-list iterable folding

Replay reviewed compiler CI repairs 7ecedcf on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure.

Assisted-by: OpenAI Codex: model identifier unavailable

* Align local monitoring events and exception lifecycle state with final 3.15

Replay reviewed compiler CI repairs ec206b1, 191fe58 on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure.

Assisted-by: OpenAI Codex: model identifier unavailable

* Align 3.15 code objects and codegen with CPython

- Store co_consts, co_names, co_localsplusnames, co_localspluskinds,
  co_linetable, co_exceptiontable and co_name as objects on PyCode;
  build co_code and the varnames/cellvars/freevars tuples lazily in
  _co_cached, with co_code deoptimized through deopt_code.
- Move the compiler constant cache (_PyCode_ConstantKey,
  const_cache_insert) to builtins/code/const_cache.rs.
- Write every code field with w_object in marshal and pass the read
  field objects to MarshalBag::make_code through CodeFields.
- Emit RETURN_GENERATOR/POP_TOP in enter_scope and place SETUP_CLEANUP
  after them; drop the generator part of insert_prefix_instructions.
- Add PyCode::first_traceable (_co_firsttraceable) for
  _PyFrame_IsIncomplete and sys.monitoring.
- Follow the CPython DISABLE branches in sys.monitoring, the
  check_matched signature in warnings, the 3.15 % format error
  messages for str and bytes, code_returns_only_none, and the FOR_ITER
  stack analysis.
- Compute IMPORT_NAME flags with in_exception_handler.
- Replace the linetable/exceptiontable byte tests in codegen with
  dis(show_positions=True) insta snapshots in _opcode.
- Remove the opcode metadata verification tooling, byte-exact
  scripts, private cache tests and redundant snippets.
- Restore test_code.py and test_monitoring.py to v3.15.0 plus
  RUSTPYTHON markers.

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

* Remove generator snippet checks covered by Lib/test

Drop extra_tests/snippets/generator_iterator_prefix.py. Its loop,
delegation, async, f_back and never-awaited checks are covered by
test_generators, test_coroutines, test_asyncgen, test_yield_from and
test_monitoring. Move the remaining checks into existing files:
genexpr prefix tracing and monitoring into stdlib_sys.py, and the
caller frame seen from the eager iterator into stdlib_sys_getframe.py.

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

* Emit the generator prefix for top-level await modules

Module code compiled with PyCF_ALLOW_TOP_LEVEL_AWAIT and marked
ste_coroutine now starts with RETURN_GENERATOR; POP_TOP. The prefix and
RESUME emission move into emit_scope_prefix, shared by enter_scope and
the module entry points, as in codegen_enter_scope. Fixes
test_builtin.test_compile_top_level_await.

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

* Allow the c_long cast in _opcode.stack_effect

c_long is i32 on Windows, where clippy reports the cast to i32 as
unnecessary.

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

* Update malachite crates to 0.14.0

pymath requires malachite-bigint ^0, so the example projects, which
have no lock file, resolve it to 0.14.0 while the workspace pinned
0.13.0, and fail to build.

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

---------

Co-authored-by: dot <dot@youknowone.org>
2026-10-14 22:38:42 +09:00
youknowdot b429155ff6 Update Malachite to 0.14 for standalone example builds (#9118)
Align the workspace BigInt dependencies with fresh pymath resolution. Update only the Malachite family and its required wide/safe_arch dependencies.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-14 13:33:19 +00:00
youknowdotandyouknowdot 016ed92f9e Update email from CPython 3.15 (#9114)
Regenerate sixteen Lib files with scripts/update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve inherited test markers without manual Lib edits.

Assisted-by: OpenAI Codex:model version unavailable

Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
2026-10-14 21:46:45 +09:00
youknowdot a85a6cd762 Sync stdlib utilities from CPython 3.15.0 final (#9111)
Regenerate nine utility modules and associated tests with scripts/update_lib
from CPython d220409a13b77de7a6c30abe16ea90db01528edc.
Preserve existing mimetypes fixes by excluding that module from this split.

OpenAI Codex assisted with source audit, update_lib execution, and focused
release validation: 64 tests passed, one existing WASI-only skip.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-14 21:45:57 +09:00
Jeong, YunWon 0816af6543 Update malachite crates to 0.14.0 (#9117)
pymath requires malachite-bigint ^0, so the example projects, which
have no lock file, resolve it to 0.14.0 while the workspace pinned
0.13.0, and fail to build.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-14 20:54:27 +09:00
Leesoo Ahn bc8080a52f Fix pwd.getpwuid raising OSError for unknown uids (#9106)
When a uid does not exist, some NSS backends (systemd-userdb, sssd,
LDAP) make getpwuid_r() return a non-zero errno such as ENOENT. POSIX
expects success with a NULL result instead. That errno was surfacing as
FileNotFoundError and broke test_pwd.test_errors.

Match CPython's pwdmodule.c: raise MemoryError only for ENOMEM, and
treat any other failure as "not found" (KeyError).

Assisted-by: Antigravity:Claude Opus 5.5
2026-10-14 20:40:37 +09:00
28393e932d Implement PEP 814 frozendict (#8951)
* Restore consolidated frozendict implementation on current main

Preserve reverse dictionary iterator fixes and the 3.15 frame imports. Keep library refreshes separate pending the runtime dependency sequencing decision.

Assisted-by: OpenAI Codex:model identifier unavailable

* Support scoped canonical test updates in update_lib

Index conditional test classes and methods without crossing namespaces, reject ambiguous targets, and preserve inherited override indentation. Add hash-pinned whole-test copying that verifies execution context and exact source bytes, with focused Python fixtures.

Assisted-by: OpenAI Codex:model identifier unavailable

* Align frozendict copy support and tests with CPython 3.15

Import exact-final copy.py with update_lib; defer Mapping ABC registration to the later library stage. Generate only proven marker corrections, retain observed debug recursion-limit expected failures, and copy the complete canonical builtin-doc discovery test using hash-pinned update_lib copy-test.

Assisted-by: OpenAI Codex:model identifier unavailable

* Preserve decorator rationale during canonical test copying

Reject differing decorator source blocks even when their ASTs match. Cover inline and multiline marker comments, guarded async methods, and CLI no-write behavior.

Assisted-by: OpenAI Codex:model identifier unavailable

* Finish frozendict with borrowed PyAnyDict views

Use the landed PyRef target model for a transparent dict/frozendict header
view, retaining objects explicitly with PyRef<PyAnyDict>. Keep targets
sealed and preserve mutable-only entry points. Borrow frame globals from
the object header rather than movable reference wrappers.

Unify exact-TypeError key diagnostics with final CPython semantics,
including callback failure propagation and no explicit cause. Keep the
Python regressions in builtin_dict and test reference layout/ownership
in Rust. Preserve existing canonical library updates.

Assisted-by: OpenAI Codex:model identifier unavailable

* Align frozendict with CPython and use CPython 3.15 tests

- Name the target type in unhashable key errors through
  PyDict::update_arg (dict_update_arg), replacing the separate
  PyFrozenDict::merge_into copy of the merge logic.
- Split the | operator into dict_or (_PyDict_Or) and frozendict_or.
- Return the argument from frozendict(frozendict) only when the called
  type is frozendict.
- Call through the vectorcall slot in PyCallable::invoke when there
  are no keyword arguments, instead of special-casing frozendict.
- Add ensure_builtins (_PyEval_EnsureBuiltins) for eval/exec, and
  insert __builtins__ for source strings regardless of globals type.
- Read __warningregistry__ and __name__ from stored globals entries and
  accept only None or str for the module name in setup_context.
- Remove the unused PyFrozenDict::from_object.
- Migrate test_dict.py, mapping_tests.py, test_copy.py and
  test_builtin.py to v3.15.0 with update_lib, and add
  test_import/data/syntax_warnings.py.
- Drop builtin_dict.py frozendict tests covered by those modules,
  keeping the descriptor and namespace integration tests.

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

* Update crates/vm/src/builtins/dict.rs

---------

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2026-10-14 16:42:56 +09:00
dependabot[bot] bef501fcd1 build(deps): bump taiki-e/install-action from 2.87.21 to 2.87.26 (#9100)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.21 to 2.87.26.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/4cef1412cce204788f482e778a0b9187f9626a29...f7e5d7c961414b23f5b25b2da9294395d08513ad)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 09:53:11 +09:00
Jeong, YunWonanddot e61d23b32e Serialize stop-the-world transactions across interpreters (#9094)
* Serialize stop-the-world transactions across interpreters

Coordinate individual stop requests with process-wide collection, retain snapshot owners through rollback, and release transferred ownership after restart.

Assisted-by: OpenAI Codex: model identifier unavailable

* Reject reentrant stop-the-world transactions

Use non-reused logical requester identities to fail before waiting on the same thread, while preserving cross-thread restart and fork ownership.

Assisted-by: OpenAI Codex: model identifier unavailable

---------

Co-authored-by: dot <dot@youknowone.org>
2026-10-14 09:42:31 +09:00
Leesoo Ahn e157f645a2 Fix grp.getgrnam raising OSError for unknown groups (#9101)
Some NSS modules (e.g. sss, systemd) return ENOENT from
getgrnam_r/getgrgid_r for a missing group. Treat any lookup error
as "not found" and raise KeyError, matching CPython. This fixes
test_shutil's test_chown and test_make_archive_owner_group.

Assisted-by: Antigravity:claude-opus-5-5
2026-10-14 09:36:18 +09:00
dependabot[bot] c0c6306233 build(deps): bump github/gh-aw/actions/setup from 0.89.21 to 0.91.3 (#9099)
Bumps [github/gh-aw/actions/setup](https://github.com/github/gh-aw) from 0.89.21 to 0.91.3.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/gh-aw/compare/c35393777e5604a63721d09512263b1383301d4f...382f4b025fefaa7d6b2492c3608f098340bf6536)

---
updated-dependencies:
- dependency-name: github/gh-aw/actions/setup
  dependency-version: 0.91.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 09:35:14 +09:00
dependabot[bot] 29e3531295 build(deps): bump https://github.com/streetsidesoftware/cspell-cli (#9103)
Bumps [https://github.com/streetsidesoftware/cspell-cli](https://github.com/streetsidesoftware/cspell-cli) from v10.2.0 to 10.3.0.
- [Release notes](https://github.com/streetsidesoftware/cspell-cli/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell-cli/compare/v10.2.0...v10.3.0)

---
updated-dependencies:
- dependency-name: https://github.com/streetsidesoftware/cspell-cli
  dependency-version: 10.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 09:34:20 +09:00
dependabot[bot] 10b1110608 build(deps): bump https://github.com/astral-sh/ruff-pre-commit (#9102)
Bumps [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) from v0.16.9 to 0.16.10.
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.9...v0.16.10)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.16.10
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 09:33:48 +09:00
dependabot[bot] 2aacf9dba9 build(deps): bump reviewdog/action-actionlint from 1.77.0 to 1.79.1 (#9098)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.77.0 to 1.79.1.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/2085657ab2c7f48c58edcc767fba576f63bea76b...1758727be30241166609dad4c97588b6ad411f32)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-version: 1.79.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-13 22:54:54 +09:00
dependabot[bot] bbb0f78e97 build(deps): bump j178/prek-action from 3.0.0 to 3.0.1 (#9097)
Bumps [j178/prek-action](https://github.com/j178/prek-action) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](https://github.com/j178/prek-action/compare/4e14d07f9231acabce116ccfca13b13dd9755ece...1382ad72dea72f9d53832f2bcb65b3e87a947204)

---
updated-dependencies:
- dependency-name: j178/prek-action
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-13 22:54:42 +09:00
Jeong, YunWonanddot 723dee027e Initialize PyRef marker in native base conversion (#9096)
Fix the missing field in the new into_base initializer without changing its pointer or ownership transfer.

Assisted-by: OpenAI Codex: model identifier unavailable

Co-authored-by: dot <dot@youknowone.org>
2026-10-13 21:58:28 +09:00
Jeong, YunWonand1ndahous3 0803a55df5 Convert native base references without consulting the Python class (#9090)
PyRef::into_base and Py::to_base cast the pointer directly instead of
going through a class-based downcast. into_base no longer reaches
unreachable_unchecked when the object's MRO omits the native base, and
to_base drops the equivalent debug assertion.

Extracted from #8963.

Assisted-by: Codex:gpt-6
Assisted-by: Claude:claude-opus-5-5

Co-authored-by: 1ndahous3 <9205230+1ndahous3@users.noreply.github.com>
2026-10-13 20:50:13 +09:00
Jiwoo Ahn 7c3c7a73c7 ci: run all passing extra_tests snippets on wasm-wasi via exclude list (#9083)
- Problem: WASM_WASI_SNIPPETS only declared 2 of 244 extra_tests/snippets
  files, so every newly-fixed snippet needed a manual ci.yaml edit to gain
  wasm-wasi coverage
- Fix: loop over extra_tests/snippets/*.py directly and skip only the 57
  files that still fail, hang, or are intentionally-failing
  (WASM_WASI_SNIPPET_EXCLUDE), so fixed and future snippets run automatically
- Verified: built wasm32-wasip1 from current upstream/main, ran all 244
  snippets; the 187 non-excluded files pass 3x repeated runs with no
  flakiness (~48s total, well under the 30-minute job budget); the 57
  excluded files were categorized (missing modules, threading disabled in
  this build, 32-bit overflow, no process support on WASI, wasm call-stack
  limits, socket stub, sandbox path issues, and a couple of individual bugs)

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

Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
2026-10-13 20:47:53 +09:00
Jeong, YunWonanddot 10cb49430a Detach during blocking Windows multiprocessing socket I/O (#9093)
Snapshot locked send buffers before waiting and preserve the host-captured Winsock error across VM reattachment.

Assisted-by: OpenAI Codex: model identifier unavailable

Co-authored-by: dot <dot@youknowone.org>
2026-10-13 20:47:12 +09:00
youknowdot e09846b4eb Fix bytearray membership racing with resizing (#9091)
* Fix bytearray membership racing with resizing

Search exact bytes and int needles under the data read lock instead of
taking a temporary export. This prevents a concurrent slice replacement
from receiving BufferError for a callback-free membership operation.

Preserve export protection for generic index/buffer callbacks and actual
memoryviews. Add Python coverage for these contracts.

AI assistance: Codex/OpenAI diagnosed the race, implemented and reviewed
the patch and regression snippet, and ran the reported validation. The
runtime did not expose an exact model version.

Assisted-by: Codex:model-version-unavailable

* Handle bool needles and consolidate bytearray regression coverage

Include exact builtin bool in the callback-free integer membership path.
Keep int subclasses and generic conversion paths under export protection.
Move this PR's regression coverage into the existing bytearray snippet
and cover True/False membership as requested in review.

AI assistance: Codex/OpenAI implemented and independently reviewed the
review follow-up and ran the reported validation. The runtime did not
expose an exact model version.

Assisted-by: Codex:model-version-unavailable
2026-10-13 05:19:27 +00:00
Jeong, YunWonanddot 8f47ced2c7 Stabilize Windows all-thread traceback reads with stop-the-world (#9092)
Use the existing normal dump_traceback stop-the-world path on Windows before traversing raw interpreter frames. Preserve registry-lock release before resuming threads. Signal and watchdog paths are unchanged.

Assisted-by: OpenAI Codex:model identifier unavailable

Co-authored-by: dot <dot@youknowone.org>
2026-10-13 14:12:22 +09:00
youknowdot 8b66b7c48f Unify PyObjectRef ownership with extensible PyRef views (#9080)
Represent PyObjectRef through PyRef<PyObject> while preserving typed
ownership, payload projection, and drop behavior. Use the sealed target
selector for borrowed set/frozenset union views and typed tuple elements.

Keep tuple storage erased behind invariant typed slice views, with checked
conversions and reference-count ownership tests. Preserve exact tuple
identity for normalized nonempty full slices. Integrate the ownership
contract into the public object module documentation and retain focused
Rust ownership/layout tests without modifying bundled Lib sources.

Spell the set/frozenset union owner directly as PyRef<PyAnySet> without
a second owned alias; retain the sealed internal view registration.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-13 14:11:37 +09:00
youknowdotandyouknowdot 85edb52b65 Update enum from CPython 3.15.0rc2 (#8942)
Sync enum and its regression tests from CPython v3.15.0rc2 (435c9e5a798c99653e3ab64ce29baed0e4f3dfee). Preserve the two existing RustPython expected-failure decorators. Keep this first migration slice limited to enum without changing the declared Python target or native runtime.

AI assistance: Codex/OpenAI reconstructed the upstream sync, reviewed the diff, and ran validation. The runtime did not expose the exact model version.

Assisted-by: Codex:model-version-unavailable

Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
2026-10-13 10:50:51 +09:00
youknowdot 140761e80b Accept dict subclasses as warning module globals (#9062)
Preserve overridable loader lookup while reading module names from stored dictionary data.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-13 10:47:23 +09:00
Jeong, YunWon c3e1276229 Release unused capacity after more short reads (#9089)
Call shrink_to_fit on the result buffer in os.pread, os.getrandom,
WindowsConsoleIO.read, _winapi.PeekNamedPipe, _winapi.ReadFile,
_multiprocessing.recv and the openssl MemoryBIO.read.

Assisted-by: Claude:claude-opus-5-5
Assisted-by: Grok:grok-4.7
2026-10-13 10:33:55 +09:00
1ndahous3 85d5956dbb Release unused capacity after short reads (#9028)
Assisted-by: Codex:gpt-6
2026-10-12 22:29:24 +09:00
youknowdot 129330f95c Report Windows signal wakeup socket errors (#9023)
Capture Winsock failures with bounded atomic storage and report them through sys.unraisablehook on the interpreter thread. Honor warn_on_full_buffer for WSAEWOULDBLOCK. Include bounded Windows socket regressions without changing Unix or CRT wakeup writes.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 22:28:05 +09:00
youknowdot cae11f6965 Sync email, mock, logging, and console behavior with Python 3.15 (#9079)
* Sync library behavior with CPython 3.15.0

Import exact d220409a13b77de7a6c30abe16ea90db01528edc sources through scripts/update_lib migrate, preserving the existing logging test marker. Retain focused Python license and mock property regressions outside Lib. This later Python-stage change requires native binascii wrapcol support; listener DNS runtime validation remains out of scope.

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep the library update limited to upstream files

Remove the two PR-added extra_tests snippets as requested in review. Preserve the script-migrated CPython library files and their canonical tests unchanged.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 22:17:26 +09:00
youknowdot c0694d955c Reject stale GenericAlias parameters on Python 3.15 (#9069)
* Reject GenericAlias parameters added after caching

Validate stale cached parameters and retain the Python regression without obsolete reference prerequisites.

Assisted-by: OpenAI Codex:model identifier unavailable

* Compute GenericAlias parameters lazily for Python 3.15

Populate the parameter cache on first lookup or subscription. Preserve cached identity and outer lookup replacement, propagate descriptor failures, and release displaced parameters outside the cache lock. Add Python regressions for timing, retries, reentrancy, recursion and concurrent callbacks.

Assisted-by: OpenAI Codex:model identifier unavailable

* Check GenericAlias recursion at lazy parameter materialization

Align the existing cyclic and deeply nested fixtures with certified CPython 3.15. Keep RecursionError assertions, cover both parameter lookup and subscription on both interpreters, and retain the separate deep-hash regression.

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep finite GenericAlias stack stress native-specific

Preserve shared cyclic recursion checks and all RustPython stress assertions. Finite acyclic depth is not a portable CPython C-stack limit across optimized builds.

Assisted-by: OpenAI Codex:model identifier unavailable

* Materialize union parameters lazily like GenericAlias

Share the reentrant-safe parameter cache between aliases and unions. Preserve parameter identity without applying union argument equality or flattening. Cover nested alias timing, descriptor retry, reentrant replacement, empty caches and concurrent callbacks in Python regressions checked against final CPython 3.15.

Assisted-by: OpenAI Codex:model identifier unavailable

* Consolidate union regressions in the typing snippet

Preserve all existing regression bodies and coverage while following the requested snippet organization.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 16:15:01 +09:00
youknowdot e8cb0c7355 Implement Python 3.15 Windows event-log APIs (#9086)
* Implement Python 3.15 Windows event-log APIs

Extract RegisterEventSource, DeregisterEventSource, ReportEvent and six constants from the existing Python 3.15 work. Match final CPython conversion and Win32 call contracts, with Windows-only argument rejection coverage that cannot perform host operations.

Assisted-by: OpenAI Codex:model identifier unavailable

* Match final unsigned event-log argument errors

Keep every pre-host rejection case and distinguish negative ValueError from positive OverflowError, as the final Python 3.15 Clinic converters do.

Assisted-by: OpenAI Codex:model identifier unavailable

* Rename Windows API regressions to the shared snippet

Preserve all existing regression bodies and coverage while following the requested snippet organization.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 16:13:03 +09:00
youknowdot 5f3daa5386 Implement Python 3.15 base64 APIs (#9085)
* Implement Python 3.15 base64 encoding and decoding

Follow CPython 3.15.0 final d220409a13b77de7a6c30abe16ea90db01528edc for base64 options, alphabets, padding and canonical decoding. Keep reverse-table caches in traced module-native state and preserve module-bound callable semantics. Add bounded Python regressions without editing Lib.

Assisted-by: OpenAI Codex:model identifier unavailable

* Complete binascii codecs for canonical Python 3.15 tests

Migrate Lib/test/test_binascii.py unchanged from CPython 3.15.0 final using scripts/update_lib and replace the superseded custom base64 snippet. Implement the base32, Base85, Ascii85 and hex ignorechars APIs required by the canonical suite. Share the existing module-bound original-key alphabet cache across base32/base64/base85 and preserve argument and buffer cleanup semantics. Keep the existing base64 kernels and VM state integration unchanged.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 16:12:24 +09:00
youknowdot 597a4221d2 Serialize bytearray exports with resizing (#9087)
* Serialize bytearray exports with resizing

Keep descriptor acquisition and export retention under the bytearray read lock, and recheck exports after acquiring a resize lock. Guard initializer and sequence deletion writes, preserve zero-index initialization callbacks, and match RawIOBase.read buffer ownership without bypassing export checks.

Add bounded Python export-lifetime and concurrent decode/memoryview regression coverage.

Assisted-by: OpenAI Codex:model identifier unavailable

* Release bytearray initializer storage and check deletion indices

Reset initializer storage before zero-count callbacks and returns. Validate integer deletion indices with a nonblocking snapshot before export rejection where possible, then revalidate under the resize guard. Preserve fast export rejection when contended to avoid codec callback deadlocks.

Add Python regressions for exported-empty rejection, initializer capacity release, callback ordering, and ordinary deletion error precedence.

Assisted-by: OpenAI Codex:model identifier unavailable

* Fix bytearray concatenation buffer callback reentrancy

Acquire both operand exports before borrowing their bytes and release them in CPython order. Cover reentrant initialization, mutable callbacks and export cleanup through public concatenation APIs.

Assisted-by: OpenAI Codex:model identifier unavailable

* Stage bytearray buffer callbacks outside receiver locks

Keep operation-specific export and release ordering for comparisons, searches, affix tuples and translation. Resolve padding arguments before borrowing the receiver, and retain buffer owners through computation without holding bytearray locks across Python callbacks.

Add bounded Python regressions for callback mutation, reentrant initialization, lazy affixes, subclass protocols and ordered cleanup.

Assisted-by: OpenAI Codex:model identifier unavailable

* Consolidate bytearray regressions in the builtin snippet

Preserve all existing regression bodies and coverage while following the requested snippet organization.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 16:10:29 +09:00
youknowdot 1a1605dee9 Use active builtins in descriptor and method reductions (#9057)
Use frame-aware getattr lookup consistently across descriptor and method reductions. Preserve defining types and exception order, and perform generic builtin-mapping subclass lookup only once.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 14:49:33 +09:00
youknowdot 9ea138c889 Canonicalize f-string field spacing in annotations (#9077)
Ignore incidental formatted-value whitespace while retaining brace-leading safeguards and literal/debug text. Include compile-only annotation-constant coverage.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 13:38:23 +09:00
youknowdot 896e07d9fa Implement mkfifo with directory descriptor support (#9056)
Support directory-relative FIFO creation. Retry interrupted path opens while releasing the interpreter and honoring signal-handler exceptions; preserve raw directory descriptors across callbacks.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 13:36:37 +09:00
youknowdot f39da82d9d Prefer resolved executable symlinks in POSIX virtual environments (#9058)
Resolve executable symlinks for virtual-environment paths while retaining macOS framework launcher behavior. Include directory-canonicalization and launcher regressions, using core for UTF-8 checks.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 02:07:08 +09:00
youknowdot 924ef2f434 Match hashlib constructor name type diagnostics (#9066)
Use native type names, None spelling, and UTF-8 byte precision for invalid name arguments without changing accepted strings or hashing behavior.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 02:06:41 +09:00
youknowdot 4638b6a5f3 Raise IndexError for oversized SQLite blob indices (#9048)
Use index-sized conversion, preserve __index__ exceptions, and bound native type names to the UTF-8-safe diagnostic limit. Include in-memory blob read and write regressions without changing callback ownership.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 01:10:08 +09:00
youknowdot 37fdf4d2d9 Fix native ABC checks when __class__ is missing (#9067)
Retain the native fallback and Python regression without modifying bundled Lib sources.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 01:08:16 +09:00
1ndahous3 a10744303f Release SQLite aggregate instances outside locks (#9014)
Assisted-by: Codex:gpt-6
2026-10-11 23:50:12 +09:00
youknowdot 2ab8af332f Preserve Expat qualified names without namespace expansion (#9070)
Retain raw element and attribute prefixes when namespace_separator is None. Keep expanded names and parser configuration unchanged, with regression coverage in the pyexpat snippet.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-11 23:48:08 +09:00
youknowdot 1fa883b9b5 Match Element.remove argument type diagnostics (#9068)
Match native type names, None spelling, and UTF-8 byte limits while preserving removal behavior. Keep all six regression cases in the existing XML snippet.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-11 23:47:18 +09:00
youknowdot 4e3b2f4039 Keep REPL history-save errors from replacing exit status (#9081)
Restore the two-line fix from #9078 onto main after it was merged into the Python 3.15 staging branch.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-11 22:52:19 +09:00
youknowdot d88c9350fb Restore Python 3.15 TextIOWrapper chunk-size deletion semantics (#9082)
Check initialization and attachment before rejecting deletion, and use the final reference error message. Preserve initialized, uninitialized, detached, ASCII-subclass, and non-ASCII-subclass regression cases with their exact Python 3.15 outcomes. No bundled Lib files change.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-11 21:36:02 +09:00
youknowdotandJeong, YunWon 06007c81fa Begin the Python 3.15 target and essential-library migration (#8950)
* Target Python 3.15 using the final upstream reference

Update active version and comparison configuration to Python 3.15.0. Preserve the alpha implementation status, actual bytecode format, and existing libraries pending separate migration. Align generated library-upgrade workflow pins without changing permissions or actions.

Assisted-by: OpenAI Codex:model identifier unavailable

* Adapt essential snippet contracts to Python 3.15 final

Preserve existing coverage while following verified final behavior for script metadata, builtin signatures and loading, AST fixture construction, memoryview diagnostics, mmap search bounds, and struct format errors. The unchanged final comparator exposes the earlier expectations; focused native baseline failures establish the required implementation changes.

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep final-reference regression paths and remove expired sysconfig argument

Preserve reverse multiplication syntax and native exact overflow diagnostics. Accept the two source-proven CPython 3.15 specialization messages only in affected reverse str/bytes/tuple cases. Use an actually out-of-range Windows datetime errno fixture. Remove the sysconfig check_home argument at its existing canonical 3.15 removal test boundary.

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep README wording unchanged in Python 3.15 transition

Assisted-by: OpenAI Codex:model identifier unavailable

* Match Python 3.15 repetition specialization and keep universal tests

Use exact sequence-type guards and preserve generic fallback diagnostics. Validate both cold and warmed expressions without implementation-specific assertions. Reject stale CPython source checkouts and cross-version library caches.

Assisted-by: OpenAI Codex:model identifier unavailable

* Limit in-place specialization additions to exact sequence repetition

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep subclass regression scoped to repetition dispatch

Assisted-by: OpenAI Codex:model identifier unavailable

* Provision final CPython 3.15 with pinned uv builds

Assisted-by: OpenAI Codex:model identifier unavailable

* Enforce Python 3.15 AST constructor requirements

Reject retired missing-field and arbitrary-keyword forms while preserving defaults and explicit placeholders. Sync only matching final CPython constructor test hunks.

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep seeded Python ahead of its Windows DLL directory

Assisted-by: OpenAI Codex:model identifier unavailable

* Keep opcode metadata tied to the implemented bytecode format

The interpreter target and reference tests use Python 3.15.0, but the current Rust opcode enum retains the 3.14 bytecode format. Generate metadata from its matching source rather than importing unsupported instruction families.

Assisted-by: OpenAI Codex:model identifier unavailable

* Align CSV, logarithm and decimal formatting with Python 3.15

Propagate dialect lookup errors except AttributeError, retry integer logarithms after float overflow, and update the decimal conversion diagnostic. Exercise the final reference contracts without implementation-specific branches.

Assisted-by: OpenAI Codex:model identifier unavailable

* Bind the logarithm index result before borrowing its integer

Assisted-by: OpenAI Codex:model identifier unavailable

* Align required canonical test expectations with Python 3.15

Take only demonstrated contract changes from CPython v3.15.0, d220409a13b77de7a6c30abe16ea90db01528edc: removed module __cached__, Struct format exception classes, and decimal-format diagnostic. Preserve unrelated tests and expectations.

Assisted-by: OpenAI Codex:model identifier unavailable

* Track pending frozendict pickle support during the 3.15 transition

Keep the two existing frozendict pickle tests running as expected failures until #8951 supplies the builtin. Unexpected success will signal removal of these temporary markers.

Assisted-by: OpenAI Codex:model identifier unavailable

* Support final Python 3.15 Windows negative timestamps

Use FILETIME for pre-epoch conversions and preserve precise Windows timestamp errors.

Assisted-by: OpenAI Codex:model identifier unavailable

* Derive historical Windows timezone offsets from wall time

FILETIME reports historical DST as unknown, so calculate the actual offset rather than selecting standard-time bias.

Assisted-by: OpenAI Codex:model identifier unavailable

* Identify decimal formatting arguments in Python 3.15 errors

Track consumed positional arguments, including star width and precision, and preserve mapping key representations in decimal conversion diagnostics.

Assisted-by: OpenAI Codex:model identifier unavailable

* Reuse mapping format keys for lookup and error context

Assisted-by: OpenAI Codex:model identifier unavailable

* Borrow mapping diagnostic keys as Python objects

Assisted-by: OpenAI Codex:model identifier unavailable

* Avoid empty components in the reference Python library path

Assisted-by: OpenAI Codex:model identifier unavailable

* Isolate RustPython bytecode caches during the 3.15 transition

Assisted-by: OpenAI Codex:model identifier unavailable

* Sync final Windows timestamp test expectations

Import only the final CPython platform-limit guards and mktime roundtrip expectation required by the existing Windows CI suite.

Assisted-by: OpenAI Codex:model identifier unavailable

* Restore official Python setup for 3.15 final

Use the existing pinned setup-python action now that its official catalog supplies CPython 3.15.0. Remove the temporary standalone provisioning action and its sparse-checkout entry while retaining interpreter outputs and requested versions.

Assisted-by: OpenAI Codex:model identifier unavailable

* Align merged runtime contracts with Python 3.15 final

Restrict mappingproxy ordering, use final codec registry normalization, and prefer index conversion before float conversion for sleep. Retain universal Python assertions and import the matching final codec/time canonical test hunks plus the non-ASCII codec-name deprecation warning.

Upstream source: CPython d220409a13b77de7a6c30abe16ea90db01528edc. The existing codec normalization implementation and bytecode contract remain unchanged.

Assisted-by: OpenAI Codex:model identifier unavailable

* Limit Windows launcher version check to its interpreter

Exclude only the CPython py.exe version-identity case from RustPython CI. The installed launcher reports its own final version, while RustPython correctly remains alpha. Preserve the other 45 launcher cases and all RustPython version assertions without modifying Lib.

Assisted-by: OpenAI Codex:model identifier unavailable

---------

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2026-10-11 12:57:49 +09:00
youknowdotandJeong, YunWon 4dc50cc472 Validate mmap assignments against current storage (#9071)
* Preserve ParamSpec bounds as in Python 3.14.8

Extract the backported bound-validation removal and align the CPython reference pin to 3.14.8 so both snippet interpreters exercise the same contract.

Assisted-by: OpenAI Codex:model identifier unavailable

* Align TextIOWrapper chunk-size deletion with Python 3.14.8

The 3.14.8 reference pin exposes the Argument Clinic deletion guard moved before initialization and attachment checks by CPython 90a1f02b7da0c356d10a23f1faee7dc063f887ed. Preserve assignment checks and align the exact deletion error, including subclass type names.

Assisted-by: OpenAI Codex:model identifier unavailable

* Validate mmap assignments against current storage

Use the existing mapping guard for bounds and writes after argument conversion, including empty assignments. Match the Python 3.14.8 ordering while preserving export guards and ownership APIs.

Assisted-by: OpenAI Codex:model identifier unavailable

* Align mmap boundary regression with Python 3.14.8

Include the matching upstream GH-158027 test-data correction: use an integer RHS so the unchanged IndexError assertion checks index bounds after conversion. Preserve the runtime assignment and storage guards.

Assisted-by: OpenAI Codex:model identifier unavailable

---------

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2026-10-11 12:35:15 +09:00
youknowdot 8d27253fa2 Canonicalize nested template format specs in annotations (#9076)
Use the existing f-string body unparser for template interpolation format specs, while preserving the outer interpolation source text. Add compile-only Python annotation-constant coverage.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-11 09:17:01 +09:00