GitHub user rusackas added a comment to the discussion: Roadmap to SQLAlchemy 2

Status check on current `master` (2026-08-24), since the last update here was 
"blocked awaiting FAB resolution":

**The core bump is done and stable.** #42803 (SQLAlchemy 2.0 + flask-sqlalchemy 
3.1.1) merged 2026-08-13 and has held for 11 days since, including routine 
dependabot patch bumps (currently `sqlalchemy>=2.0.52,<2.1`). A later revert 
attempt (#43260) was proposed but closed rather than merged, so whatever FSA 
3.x session-scoping issue was blocking things in early August got resolved by 
the time #42803 actually landed.

What's left, for anyone picking up loose ends:

**Upstream-blocked, nothing to do but track:**
- `aurora-data-api`, `d1`, `kusto`, `solr` dialects are each hard-pinned to 
SQLAlchemy 1.4 by their own upstream package (no 2.0 work on their side). 
Documented via `known_incompatibilities` metadata in the respective 
`db_engine_specs/*.py` and in `pyproject.toml`.
- `sqlalchemy-bigquery` works fine under 2.0 but the upstream package was 
archived 2026-05-16 — an orphaned-dependency risk independent of this migration.

**Small follow-ups:**
- `sqlalchemy-ocient`'s 2.0 compatibility is flagged "unverified" in 
`pyproject.toml` (lower confidence than the other driver bumps in #42542) — 
worth actually testing.
- #42871 (the original tracking PR for the raw version bump) is now closed as 
superseded by #42803.
- `SQLALCHEMY_WARN_20` in unit-test CI was a silent no-op under 2.0 (it only 
had meaning pre-bump) — removed in #43495.
- `superset/utils/pandas_sqlalchemy_compat.py` is a documented-as-obsolete shim 
(it says so in its own docstring) that's been a no-op since the bump landed — 
the module plus its call site in `superset/__init__.py` can be deleted.

**Not blocking, but worth naming since "how far can we go" came up:**
- The codebase still leans heavily on the legacy `Session.query()` API (~586 
call sites) vs. 2.0-style `select()`/`session.execute()` (~11 files). Fully 
supported either way under 2.0, so this is a modernization opportunity rather 
than debt — a large, non-urgent refactor if anyone wants to pick at it 
incrementally.
- `flask_appbuilder.Model.__allow_unmapped__ = True` (set globally in 
`superset/__init__.py`) preserves legacy annotation behavior across all 
models/mixins. Migrating models to typed `Mapped[...]` declarations can happen 
incrementally without needing to flip that flag off as a gate.
- 16 `relationship(..., cascade_backrefs=False)` call sites remain — correct 
and required under 2.0.52 today, but the parameter itself is deprecated 
upstream and may need to go in a future SQLAlchemy release.

**FAB:** currently pinned `>=5.2.2,<6.0.0` and not presenting as a blocker 
given the bump's stability since 08-13.

**Docs:** `UPDATING.md` already has an accurate section covering the bump and 
the driver caveats above — no gap there.

Net: for the 7.0 release, this is done. What remains is either genuinely out of 
Superset's hands (upstream dialect support) or optional cleanup/modernization 
that doesn't need to gate anything.

GitHub link: 
https://github.com/apache/superset/discussions/40273#discussioncomment-18141531

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to