Skip to content

Stabilize _ast_unparse.py and F-string/Formatting Path #23

@youknowone

Description

@youknowone

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions