Summary
Background:
_ast_unparse.py and its helpers (_str_literal_helper, _ftstring_helper,
_write_ftstring_inner) show dense mismatches, likely due to shared expression and
formatting pipelines.
Task:
- Focus on ast-unparse and formatting helpers:
- Compare RustPython and CPython emission around return/except paths and control edges.
- Fix instruction order and jump target normalization in these code paths.
- Prefer a minimal diff strategy: align stack and control behavior first, then optimize.
Acceptance criteria:
- Notable reduction in mismatch clusters for all
_Unparser.* functions listed in the
report.
_ast_unparse.py aggregate mismatch no longer dominates report when running summary
over Lib (excluding test/vendor files).
Details
Summary
Background:
_ast_unparse.pyand its helpers (_str_literal_helper,_ftstring_helper,_write_ftstring_inner) show dense mismatches, likely due to shared expression andformatting pipelines.
Task:
Acceptance criteria:
_Unparser.*functions listed in thereport.
_ast_unparse.pyaggregate mismatch no longer dominates report when running summaryover Lib (excluding test/vendor files).
Details