◐ Shell
clean mode source ↗

ast: Populate _field_types with real type objects by youknowone · Pull Request #6981 · RustPython/RustPython

- Add FieldType enum and FIELD_TYPES static table mapping all
  AST node classes to their ASDL field types
- Resolve markers to real Python type objects (GenericAlias,
  Union, plain types) at module init in populate_field_types()
- Set class-level None defaults for optional fields
- Replace hardcoded LIST_FIELDS and class-name checks in
  slot_init with _field_types-based lookup
- Add expr_context default to Load(), fix ImportFrom.level
  default (now None instead of 0)
- Fix __class_getitem__ None check, compile() formatting
- Remove 14 @expectedfailure decorators from test_ast

@youknowone marked this pull request as ready for review

February 3, 2026 12:56

@youknowone