Skip to content

fix(deps): pin syntaqlite below 0.5.0 for Python 3.10 compatibility#42007

Draft
rusackas wants to merge 2 commits into
apache:masterfrom
rusackas:fix-syntaqlite-py310
Draft

fix(deps): pin syntaqlite below 0.5.0 for Python 3.10 compatibility#42007
rusackas wants to merge 2 commits into
apache:masterfrom
rusackas:fix-syntaqlite-py310

Conversation

@rusackas

Copy link
Copy Markdown
Member

SUMMARY

Master CI has been intermittently red since #41952 bumped syntaqlite 0.4.2 → 0.6.0.

syntaqlite 0.5.0+ (including 0.6.0) imports StrEnum from the stdlib enum module unconditionally:

# syntaqlite/__init__.py
from enum import IntEnum, StrEnum

enum.StrEnum was only added in Python 3.11, yet the package still declares requires-python>=3.10. Superset supports Python 3.10, and superset/sql_validators/sqlite.py imports syntaqlite on the app-init import path (init_viewsdatabases.apivalidate_sqlsql_validators), so any test that builds the app fails at import time on Python 3.10:

File ".../syntaqlite/__init__.py", line 21, in <module>
    from enum import IntEnum, StrEnum
ImportError: cannot import name 'StrEnum' from 'enum'

Why it slipped through PR CI and only broke master: the Python-Unit / Python-Integration matrices run the previous (Python 3.10) leg only on pushes to master — PRs run the current (3.11) leg only. So #41952 merged green, and the break surfaces on the next push to master that touches Python files (the changes filter skips the matrix otherwise, which is why some master commits still show green).

FIX

  • Revert the pin to the last 3.10-safe range: <0.5.0 for the sqlite extra, >=0.4.2,<0.5.0 for development, and syntaqlite==0.4.2 in requirements/development.txt. (0.4.2 has no StrEnum import; 0.5.1 already added it.)
  • Add a Dependabot ignore entry for syntaqlite so it is not immediately re-bumped past 0.5.0 until Superset drops Python 3.10.
  • Add explanatory comments at each pin so the constraint isn't "fixed" blindly later.

TESTING INSTRUCTIONS

On Python 3.10, before this change python -c "import superset.sql_validators.sqlite" raises ImportError: cannot import name 'StrEnum'; after pinning back to syntaqlite==0.4.2 the import succeeds. CI's Python-Unit / Python-Integration previous (3.10) legs go green.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration
  • Introduces new feature or API
  • Removes existing feature or API

Upstream fix would be for syntaqlite to guard the StrEnum import (as Superset itself does in superset/utils/backports.py) or to raise its requires-python to >=3.11. This PR just unblocks master in the meantime.

🤖 Generated with Claude Code

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>
@bito-code-review

bito-code-review Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #2745c6

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 15ae40c..15ae40c
    • pyproject.toml
    • requirements/development.txt
  • Files skipped - 1
    • .github/dependabot.yml - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.06%. Comparing base (256cc71) to head (ba68b34).
⚠️ Report is 1 commits behind head on master.

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     
Flag Coverage Δ
hive 39.04% <ø> (ø)
mysql 57.88% <ø> (ø)
postgres 57.94% <ø> (?)
presto 41.03% <ø> (ø)
python 59.32% <ø> (+1.29%) ⬆️
sqlite 57.55% <ø> (ø)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants