fix(deps): pin syntaqlite below 0.5.0 for Python 3.10 compatibility#42007
fix(deps): pin syntaqlite below 0.5.0 for Python 3.10 compatibility#42007rusackas wants to merge 2 commits into
Conversation
syntaqlite 0.5.0+ (including 0.6.0, pinned in apache#41952) imports `StrEnum` from the stdlib `enum` module unconditionally. `StrEnum` only exists on Python 3.11+, yet the package still declares `requires-python>=3.10`, so importing it raises `ImportError` on Python 3.10. Superset still supports Python 3.10. The `Python-Unit` and `Python-Integration` matrices run a `previous` (3.10) leg on pushes to master (PRs only run `current`/3.11), so the break only surfaces on master after merge - which is why apache#41952 landed green but broke master CI on the next Python-touching push. Revert the pin to the last 3.10-safe range (<0.5.0 / 0.4.2) and add a Dependabot ignore for syntaqlite so it is not re-bumped until Superset drops Python 3.10. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #2745c6Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42007 +/- ##
==========================================
+ Coverage 64.42% 65.06% +0.63%
==========================================
Files 2747 2747
Lines 153801 153801
Branches 35266 35266
==========================================
+ Hits 99086 100067 +981
+ Misses 52804 51824 -980
+ Partials 1911 1910 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SUMMARY
Master CI has been intermittently red since #41952 bumped
syntaqlite0.4.2 → 0.6.0.syntaqlite0.5.0+ (including 0.6.0) importsStrEnumfrom the stdlibenummodule unconditionally:enum.StrEnumwas only added in Python 3.11, yet the package still declaresrequires-python>=3.10. Superset supports Python 3.10, andsuperset/sql_validators/sqlite.pyimportssyntaqliteon the app-init import path (init_views→databases.api→validate_sql→sql_validators), so any test that builds the app fails at import time on Python 3.10:Why it slipped through PR CI and only broke master: the
Python-Unit/Python-Integrationmatrices run theprevious(Python 3.10) leg only on pushes to master — PRs run thecurrent(3.11) leg only. So #41952 merged green, and the break surfaces on the next push to master that touches Python files (thechangesfilter skips the matrix otherwise, which is why some master commits still show green).FIX
<0.5.0for thesqliteextra,>=0.4.2,<0.5.0fordevelopment, andsyntaqlite==0.4.2inrequirements/development.txt. (0.4.2has noStrEnumimport;0.5.1already added it.)ignoreentry forsyntaqliteso it is not immediately re-bumped past0.5.0until Superset drops Python 3.10.TESTING INSTRUCTIONS
On Python 3.10, before this change
python -c "import superset.sql_validators.sqlite"raisesImportError: cannot import name 'StrEnum'; after pinning back tosyntaqlite==0.4.2the import succeeds. CI'sPython-Unit/Python-Integrationprevious(3.10) legs go green.ADDITIONAL INFORMATION
Upstream fix would be for
syntaqliteto guard theStrEnumimport (as Superset itself does insuperset/utils/backports.py) or to raise itsrequires-pythonto>=3.11. This PR just unblocks master in the meantime.🤖 Generated with Claude Code