20 Commits
Author SHA1 Message Date
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 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
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 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 16e333bded Align asyncio initialization and future state with Python 3.15 (#9136)
* Align asyncio initialization and future state with Python 3.15

Reject native Future and Task reinitialization, validate task contexts, and restore task registration after failed eager context entry. Generate matching asyncio and concurrent Future sources and tests with update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve the existing pending-task reinitialization regression.

Assisted-by: OpenAI Codex:model version unavailable

* Remove asyncio snippet duplicating canonical reinitialization coverage

Keep the exact-final Lib tests as the reinitialization coverage instead of adding a new snippet for the same contract. Native and library implementation bytes remain unchanged.

Assisted-by: OpenAI Codex:model version unavailable

* Validate both objects in asyncio awaited-by helpers

Match CPython by ignoring non-native Future/Task waiters in add and discard. Keep the existing native reentrant hashing fixture reachable using Future subclasses and use native instances for its membership checks.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:02:39 +00:00
Shahar Naveh a2fabfa064 Update some of changed libs and tests from 3.14.5 -> 3.14.6 (part 1) (#8084) 2026-06-12 23:49:15 +09:00
Shahar Naveh 840f8c0322 Update asyncio to 3.14.5 (#8012) 2026-06-02 09:48:45 +00:00
CPython Developers b83d155235 Update asyncio from v3.14.2 2026-02-02 00:43:07 +09:00
Jeong, YunWonandCPython Developers e01f26c1f6 Update inspect from v3.14.2 (#6815)
* Update inspect from v3.14.2

* temp asyncio.event._set_event_loop_policy

* mark inspect tests

---------

Co-authored-by: CPython Developers <>
2026-01-20 21:34:34 +09:00
Terry Tianlin Luan c5deb740ac Update asyncio library (#6601)
* Updated asyncio to v3.13.11

* Removed expectedFailure from `test_async_case.py`
2026-01-15 17:35:01 +09:00
Jeong, YunWonandCPython Developers 1068219c56 Update Lib/asyncio from CPython v3.12.3 (#3858)
Co-authored-by: CPython Developers <>
2024-05-09 05:02:46 +09:00
snowapril b2eff4ae53 add missing __class_getitem__ from cpython 3.10
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
minoring 754563554e Add some function to __all__ to run tests
This change is result from the supporting __all__ in modules
2020-08-15 18:11:07 +09:00
Noah 06a4796711 Add msvcrt.open_osfhandle 2020-06-21 16:47:42 -05:00
Noah 9507a9f795 Add some functions from asyncio from Python 3.8 2020-03-21 00:35:38 -05:00
coolreader18 458c68263d Fix tempfile to not use random.Random 2019-11-23 11:20:42 -06:00
Noah 4cf2672876 Add _multiprocessing stub 2019-11-23 11:20:41 -06:00
coolreader18 b5505b4e73 Add asyncio.run from CPython 3.7 2019-11-23 11:20:41 -06:00
coolreader18 6679ea1287 Don't import some platform-specific modules 2019-11-23 11:19:21 -06:00
coolreader18 40a2acbcad Add necessary Lib files for asyncio from CPython 3.6.0 2019-11-23 11:19:21 -06:00