Skip to content

feat: Superset 4.1+ and SA 2.0-only support (v2.0.0)#37

Open
nwoolmer wants to merge 2 commits intoquestdb:mainfrom
nwoolmer:phase2/superset-4.1+
Open

feat: Superset 4.1+ and SA 2.0-only support (v2.0.0)#37
nwoolmer wants to merge 2 commits intoquestdb:mainfrom
nwoolmer:phase2/superset-4.1+

Conversation

@nwoolmer
Copy link
Contributor

@nwoolmer nwoolmer commented Mar 4, 2026

Summary

  • Breaking change: drops SQLAlchemy 1.4 and Superset <4.1 support
  • Updates select_star signature from (table_name: str, schema=None) to (table: Table) matching the Superset 4.1+ API
  • Updates execute signature to include the required database positional param (Superset 4.1+ API)
  • Updates strip_comments_from_sql call with engine= kwarg (Superset 4.1+ API)
  • Drops SA 1.4 compat code: removes SA_V2 flag, version-conditional engine params, and dbapi() method
  • Removes packaging dependency (no longer needed for version detection)
  • Pins SQLAlchemy>=2.0 and apache-superset>=4.1.0
  • Bumps version to 2.0.0

API change analysis

The Superset BaseEngineSpec API changed at the 4.0 → 4.1 boundary. The select_star and execute signatures are identical across 4.1.0, 5.0.0, and 6.0.0, so this PR supports all of them.

Version select_star execute
3.x–4.0 table_name: str, schema: str | None cursor, query, **kwargs
4.1–6.0 table: Table cursor, query, database, **kwargs

Depends on

Test plan

  • Verify select_star works with Superset 4.1+ (table: Table param)
  • Verify execute works with Superset 4.1+ (database param)
  • Verify SA 2.0 dialect tests pass (test_sa2_compat.py)
  • Verify Docker build succeeds

🤖 Generated with Claude Code

nwoolmer and others added 2 commits March 4, 2026 16:29
- Add import_dbapi() classmethod alongside dbapi() (fixes questdb#9, questdb#31)
- Version-conditional create_engine params (future/implicit_returning
  only passed on SA <2.0)
- Fix inspector to use connection-based execution (Engine.execute()
  removed in SA 2.0)
- Declare runtime dependencies in pyproject.toml
- Remove SQLAlchemy <2 cap from test dependencies
- Add Python 3.12/3.13 classifiers, bump version to 1.2.0
- Update Dockerfile from EOL buster to bookworm, Python 3.13
- Add SA 2.0 compatibility test suite

Closes questdb#9, closes questdb#31
Refs questdb#35

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Breaking change: drops SQLAlchemy 1.4 and Superset <4.1 support.

- Update select_star signature: table_name/schema -> table: Table (4.1+ API)
- Update execute signature: add database positional param (4.1+ API)
- Update strip_comments_from_sql call with engine= kwarg
- Drop SA 1.4 compat: remove SA_V2 flag, version conditionals, dbapi()
- Remove packaging dependency (no longer needed for version detection)
- Pin SQLAlchemy>=2.0, apache-superset>=4.1.0
- Bump version to 2.0.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.

1 participant