feat: Superset 4.1+ and SA 2.0-only support (v2.0.0)#37
Open
nwoolmer wants to merge 2 commits intoquestdb:mainfrom
Open
feat: Superset 4.1+ and SA 2.0-only support (v2.0.0)#37nwoolmer wants to merge 2 commits intoquestdb:mainfrom
nwoolmer wants to merge 2 commits intoquestdb:mainfrom
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
select_starsignature from(table_name: str, schema=None)to(table: Table)matching the Superset 4.1+ APIexecutesignature to include the requireddatabasepositional param (Superset 4.1+ API)strip_comments_from_sqlcall withengine=kwarg (Superset 4.1+ API)SA_V2flag, version-conditional engine params, anddbapi()methodpackagingdependency (no longer needed for version detection)SQLAlchemy>=2.0andapache-superset>=4.1.0API change analysis
The Superset
BaseEngineSpecAPI changed at the 4.0 → 4.1 boundary. Theselect_starandexecutesignatures are identical across 4.1.0, 5.0.0, and 6.0.0, so this PR supports all of them.select_starexecutetable_name: str, schema: str | Nonecursor, query, **kwargstable: Tablecursor, query, database, **kwargsDepends on
Test plan
select_starworks with Superset 4.1+ (table: Table param)executeworks with Superset 4.1+ (database param)test_sa2_compat.py)🤖 Generated with Claude Code