* Keep escaped generator frames and wrap asyncgen throw
Mark gi_frame/cr_frame/ag_frame as escaped so locals survive
deallocation, and let frame.clear() drop those locals after
owner finalize. Route throw() through finalize_send_result so
StopAsyncIteration is wrapped like send(). Add ag_suspended
and drop never-started frame locals on close().
Assisted-by: Grok:grok-4.6
* Store escaped on iframe; skip unused cold alloc
Keep the escaped flag on InterpreterFrame so mark_escaped
and has_escaped do not allocate FrameColdData. Clear optional
cold fields only when they exist. Transfer frame owner in
close() the same way send/throw already do.
Assisted-by: Grok:grok-4.6
* Replace escaped flag with take_ownership
gi_frame returns the frame object. Close uses a uniquely-referenced
check to clear locals or take_ownership onto a husk. frame.clear()
finalizes a generator-owned frame and only clears FRAME_OBJECT
frames. close() leaves the generator suspended when it yields on
GeneratorExit.
Assisted-by: Grok:grok-4.6
* Drop frame mutex; steal frame_obj atomically
take_ownership stores None in an atomic slot instead of locking
and swapping a husk. gi_code reads the kept executable. Resume
exclusivity stays on the running claim.
Assisted-by: Grok:grok-4.6
This directory contains all of the Python files that make up the standard
library for RustPython.
Most of these files are copied over from the CPython repository (the 3.7
branch), with slight modifications to allow them to work under RustPython. The
current goal is to complete the standard library with as few modifications as
possible. Current modifications are just temporary workarounds for bugs/missing
feature within the RustPython implementation.
The first big module we are targeting is unittest, so we can leverage the
CPython test suite.