Skip to content

fix: replace ast.Str and drop astor#5850

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

fix: replace ast.Str and drop astor#5850
lafirm wants to merge 6 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 lafirm force-pushed the chore/drop-astor branch from b8fad95 to fa54bba Compare June 23, 2026 06:48
lafirm added 5 commits June 24, 2026 08:30
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>
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
@lafirm lafirm force-pushed the chore/drop-astor branch from fa54bba to 2fe6224 Compare June 24, 2026 03:00
@StuffbyYuki

Copy link
Copy Markdown
Collaborator

@lafirm Can you check the failed ci test? Also, do you think it's worth considering a brief changelog/release note: python_env payloads feed model data_hash, so users with Python macros may see a one-time fingerprint change on upgrade (e.g. lambda : → lambda:)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants