◐ Shell
clean mode source ↗

Remove `_dis` module by ShaharNaveh · Pull Request #6690 · RustPython/RustPython

377-404: Verify module CodeFlags initialization matches intended co_flags (NEWLOCALS vs empty).

Compiler::new initializes the module ir::CodeInfo.flags as CodeFlags::NEWLOCALS (Line 380), while enter_scope uses CodeFlags::empty() for CompilerScope::Module (Line 749). If standard dis.py compatibility depends on exact co_flags, please confirm the module-level choice is intentional (and consistent with how CodeObject.co_flags is computed).


747-769: Scope default flags update looks consistent with the renamed CodeFlags.

Function-like scopes default to NEWLOCALS | OPTIMIZED, while module/class remain empty(). This aligns with using COROUTINE/GENERATOR as additional markers elsewhere.


1298-1323: make_qualname: using OPTIMIZED for “function parent” detection is reasonable—ensure no non-function scopes set it.

is_function_parent now keys off parent.flags.contains(CodeFlags::OPTIMIZED) (Line 1301) plus name guards. Please double-check there aren’t any non-function scopes that set OPTIMIZED while having a non-"<...>" name, or they’ll get .<locals>. qualnames unexpectedly.


1911-1919: Async return check updated correctly to CodeFlags::GENERATOR.


2064-2090: Function entry flags + varargs/kwargs flags updated correctly.

push_output(NEWLOCALS | OPTIMIZED, ...) plus VARARGS / VARKEYWORDS mutations look consistent with the rename and prior behavior.


3103-3120: Coroutine flag set via flags.set(COROUTINE, is_async) is clean and clear.


3233-3241: Type-params scope flags updated consistently.

Also applies to: 3664-3672


7042-7044: Generator marking updated correctly to CodeFlags::GENERATOR.


1-20: Please run formatting/lints/tests for the flag rename sweep.

Per repo guidelines for **/*.rs, make sure cargo fmt and cargo clippy are clean, and that dis-/opcode-metadata-related tests/snapshots still match expectations after the CodeFlags rename and _dis removal.