- Add bytearray.resize() method
- BytesIO: support keyword arg for initial_bytes
- BytesIO.seek: clamp negative positions to 0
- BytesIO.close: raise BufferError on active exports
- BytesIO.getbuffer: check closed state
- Set UnsupportedOperation.__module__ to "io"
- Rewrite compile_dict to preserve insertion order with ** unpacking
- Fix function call error messages to include function name and
keyword-only argument counts
- Fix missing keyword-only argument error to list all missing args
- Fix starred expression error messages to match CPython
- Fix "cannot unpack non-iterable" error message
- Remove resolved expected failure markers in test_extcall and
test_unpack_ex
* Fix annotation scope, deadlock, MRO, and HEAPTYPE issues
Annotation scope:
- Remove module-level annotation re-scan that created phantom
sub_tables, breaking annotation closure for comprehensions
- Add async comprehension check in symbol table with
is_in_async_context(); annotation/type-params scopes are
always non-async
- Save/restore CompileContext in enter/exit_annotation_scope
to reset in_async_scope
Deadlock prevention:
- Fix TypeVar/ParamSpec/TypeVarTuple __default__ and
evaluate_default by cloning lock contents before acquiring
a second lock or calling Python
Other fixes:
- Add HEAPTYPE flag to Generic for correct pickle behavior
- Guard heaptype_ext access in name_inner/set___name__/
set___qualname__ with safe checks instead of unwrap
- Fix MRO error message to include base class names
- Add "format" to varnames in TypeAlias annotation scopes
- Fix single-element tuple repr to include trailing comma
* Unmark failing markers
Annotation scope:
- Remove module-level annotation re-scan that created phantom
sub_tables, breaking annotation closure for comprehensions
- Add async comprehension check in symbol table with
is_in_async_context(); annotation/type-params scopes are
always non-async
- Save/restore CompileContext in enter/exit_annotation_scope
to reset in_async_scope
Deadlock prevention:
- Fix TypeVar/ParamSpec/TypeVarTuple __default__ and
evaluate_default by cloning lock contents before acquiring
a second lock or calling Python
Other fixes:
- Add HEAPTYPE flag to Generic for correct pickle behavior
- Guard heaptype_ext access in name_inner/set___name__/
set___qualname__ with safe checks instead of unwrap
- Fix MRO error message to include base class names
- Add "format" to varnames in TypeAlias annotation scopes
- Fix single-element tuple repr to include trailing comma
Annotation scopes now inherit can_see_class_scope from parent scopes
(not just direct Class parents), allowing annotations in generic
methods inside classes to access class variables via __classdict__.
Remove 3 expectedFailure markers from test_type_params.
- Reject nonlocal binding for type parameters in symboltable
- Enable __class_getitem__ on memoryview, Template, Interpolation
- Fix __set_name__ error note to quote attribute name
- Set re.Match and re.Pattern module to "re" instead of "_sre"
- Migrate parking_lot::Mutex to PyMutex in typevar.rs
- Collapse nested if-let chains in typing_type_repr (clippy)
- Remove 5 expectedFailure markers from test files
- Implement _ConstEvaluator type in _typing module with STRING
format support via typing_type_repr (port of _Py_typing_type_repr)
- Add evaluate_bound, evaluate_constraints, evaluate_default
pygetset properties to TypeVar, ParamSpec, TypeVarTuple
- Emit format validation in evaluator scopes
(compile_type_param_bound_or_default, TypeAlias value scopes)
so evaluators raise NotImplementedError for unsupported formats
- Add non-default-after-default SyntaxError in scan_type_params
- Fix ParamSpec default_value to use Mutex for proper caching
- Fix TypeVar constructor: evaluate_constraints set to None
instead of constraints tuple for eager-constructed TypeVars
- Pass format=1 (FORMAT_VALUE) to all lazy evaluator calls
- Remove 6 expectedFailure markers from test_type_params
- Replace chrono-based gmtime/localtime/mktime/strftime/asctime/ctime
with direct libc calls (gmtime_r, localtime_r, mktime, strftime)
on unix, keeping chrono as fallback for non-unix platforms
- Add checked_tm_from_struct_time for struct_time field validation
- Accept None in gmtime/localtime/ctime (OptionalArg<Option<>>)
- Fix StructTimeData field order: tm_zone before tm_gmtoff
- Fix PyStructTime slot_new to accept optional dict argument
- Add interactive REPL mode: auto-print expression results in single mode
- Implement Destructor for PyGenerator and PyCoroutine
- Add locals_dirty tracking and locals_to_fast() for frame sync
- Add per-line tracing with prev_line tracking in execution loop
- Fix gen_throw to close sub-iterator on GeneratorExit (gen_close_iter)
- Pass callable object as arg in c_call/c_return/c_exception trace events
- Distinguish [Errno] vs [WinError] for CRT vs Win32 API errors
- Fix tee thread safety with AtomicBool running flag
- Fix division error messages to match expected format
* Replace `once_cell` with `std::sync::OnceLock`/`core::cell::OnceCell`
- Replace `once_cell::sync::{Lazy, OnceCell}` with
`std::sync::{LazyLock, OnceLock}`
- Replace `once_cell::unsync::{Lazy, OnceCell}` with
`core::cell::{LazyCell, OnceCell}`
- Inline `get_or_try_init` at call sites (unstable in std as of 1.93)
- Replace `OnceCell::with_value()` with `OnceCell::from()` in codecs.rs
- Remove `once_cell` direct dependency from common and vm crates
* Auto-format: cargo fmt --all
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Wait for module initialization to complete when a module is
already in sys.modules but still being initialized by another
thread. Check __spec__._initializing and call
_lock_unlock_module to block until the import finishes.