Skip to content

fix: replace ast.Str and drop astor#5850

Open
lafirm wants to merge 5 commits into
SQLMesh:mainfrom
lafirm:chore/drop-astor
Open

fix: replace ast.Str and drop astor#5850
lafirm wants to merge 5 commits into
SQLMesh:mainfrom
lafirm:chore/drop-astor

Conversation

@lafirm

@lafirm lafirm commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #5837

  • Updated minimum Python requirement from 3.8 to 3.9 in documentation to match with the pyproject.toml
  • Removed astor from dependencies and mypy overrides in pyproject.toml, using ast.unparse introduced in Python 3.9
  • Replaced all astor.to_source calls with ast.unparse in sqlmesh/core/model/common.py and sqlmesh/utils/metaprogramming.py

Test Plan

  • Updated test expectations in tests/utils/test_metaprogramming.py to match the output format of ast.unparse.

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

lafirm added 5 commits June 19, 2026 17:20
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Python 3.14 compatibility error - AttributeError: module 'ast' has no attribute 'Str'

1 participant