Repository navigation
chore: drop Python 3.10 support, require Python 3.11+ - #42045
Conversation
CI, packaging metadata, and docs now reflect Python 3.11 as the minimum supported version. Also collapses the sys.version_info compat shims in superset/app.py, superset/middleware/legacy_prefix_redirect.py, and superset/utils/backports.py, which existed solely to support running on Python 3.10 (StrEnum and wsgiref.types were both added in 3.11). Removing the 3.10 floor also drops the now-dead pyhive<0.7.0 marker for python_version<'3.11' and obsoletes the need to pin syntaqlite below 0.5.0 for 3.10 compatibility. Closes #42007 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Code Review Agent Run #8a90afActionable 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 |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42045 +/- ##
==========================================
- Coverage 65.06% 64.91% -0.15%
==========================================
Files 2747 2756 +9
Lines 153806 154969 +1163
Branches 35266 35440 +174
==========================================
+ Hits 100072 100598 +526
- Misses 51824 52459 +635
- Partials 1910 1912 +2
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:
|
…i_app arg Dropping the sys.version_info conditional import in app.py also dropped the `# type: ignore[arg-type]` mypy needs for the wsgi_app reassignment after the conditional AppRootMiddleware rewrap, unrelated to the Python version gate itself. Restores the exact comment/ignore already present on master (identical code, unmodified there). Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
The flagged issue is correct. Using a floating tag like Since I do not have access to the actual # Change this:
FROM python:3.11-slim-trixie
# To this (using the specific version pinned in your main Dockerfile):
FROM python:3.11.14-slim-trixieRegarding other comments on this PR: I have checked the provided RELEASING/Dockerfile.from_local_tarball |
Code Review Agent Run #6b0eefActionable 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 |
supersetbot's "dev"/"lean" presets hardcode --build-arg PY_VER=3.10-slim-bookworm, which lands ahead of our --extra-flags and overrides the Dockerfile's own 3.11 default. Now that requires-python is >=3.11, that stale pin makes uv resolve apache-superset-core against Python 3.10 and fail. Append our own PY_VER override, which wins as the last occurrence of the flag. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: hainenber <[email protected]>
hainenber
left a comment
There was a problem hiding this comment.
LGTM. I've pushed a commit to drop Python3.10 references in Makefile, aside from that, all good
|
Thanks for the Makefile cleanup @hainenber, appreciate you catching that! |
|
ah darn, my push made my approval invalid |
SUMMARY
Removes Python 3.10 from the supported version matrix. Python 3.11 is now the minimum supported version (3.12 remains the "next" tier).
Why now: UPDATING.md, PR #31503 explicitly scoped the 3.10 support commitment to "the Superset 5.0 lifecycle" (that entry formally deprecated 3.9, not 3.10 — 3.10 itself was never given its own deprecation notice). Master is now building Superset 7.0, two majors past that commitment window, and upstream Python 3.10 reaches end-of-life in October 2026. Between the lapsed 5.0-era promise and the approaching upstream EOL, this is a natural point to move the floor rather than requiring a fresh deprecation cycle.
previous(3.10) tier from.github/actions/setup-backend/action.ymland the four workflow matrices that consumed it (pre-commit.yml,superset-extensions-cli.yml,superset-python-integrationtest.yml,superset-python-unittest.yml); bumped the hardcoded 3.10 pin inbump-python-package.yml; dropped thepy310Docker build preset fromdocker.yml,tag-release.yml, andscheduled-docker-image-refresh.yml; bumped the staleapache/superset-cache:3.10-slim-trixieregistry-cache references (already inconsistent with the mainDockerfile's3.11.14-slim-trixiebase) to3.11-slim-trixieacrosssuperset-frontend.ymland the threedocker-compose*.ymlfiles.requires-python = ">=3.11"and dropped the 3.10 classifier inpyproject.toml,superset-core/pyproject.toml, andsuperset-extensions-cli/pyproject.toml(plus their README badges); rufftarget-versionbumped topy311; dropped the now-deadpyhive[hive]>=0.6.5;python_version<'3.11'marker from thehive/sparkextras (always-false once the floor is 3.11).docs/developer_docs/index.md,docs/developer_docs/contributing/development-setup.md,docs/admin_docs/configuration/mcp-server.mdx,superset/mcp_service/README.md, the bug-report issue template's Python-version dropdown, and the example versions inissue-reporting.mdall now say 3.11/3.12. Historical/versioned doc snapshots and CHANGELOG entries were left untouched.scripts/check-env.py: the local environment-check script's ideal/supported Python ranges moved from 3.10-ideal/3.9–3.11-supported to 3.11-ideal/3.11–3.12-supported.RELEASING/Dockerfile.*: bumpedpython:3.10-slim-trixie→python:3.11-slim-trixiein the four release-tooling Dockerfiles.UPDATING.md: added an entry under## Next.superset/app.py,superset/middleware/legacy_prefix_redirect.py, andsuperset/utils/backports.pyeach had asys.version_info >= (3, 11)branch to backportwsgiref.types/enum.StrEnumon 3.10. Since 3.11 is now the floor, these collapse to unconditional imports (and a stale# type: ignore[arg-type]inapp.py, which mypy now flags as unused, was removed along with the comment explaining it).syntaqlitebelow0.5.0because0.5.0+unconditionally importsenum.StrEnum, which doesn't exist on Python 3.10. With 3.10 dropped,syntaqlite>=0.6.0,<0.7.0(already the pin on master) works fine as-is — no further pin changes needed here.FOLLOW-UPS (3.11-enabled cleanup, not done in this PR to keep the diff scoped)
Optional[X]/Union[X, Y]→X | None/X | Yis available since 3.10 but not required until now; ~217 files undersuperset/still use the old-style typing imports. A dedicatedruff --fix --select UPpass (pyupgrade rules) could modernize these mechanically in a follow-up PR.typing.Self(3.11) could replace some-> "ClassName"return annotations in builder-style methods.except*, 3.11) could simplify a few command layers that currently aggregate multiple errors manually — worth a targeted look, not a blanket change.TESTING INSTRUCTIONS
pre-commit run --all-files(ruff, ruff-format, pylint, zizmor, etc. all pass; mypy independently verified clean on the three touched Python files via a standalone mypy 2.3.0 run, since this sandbox's cached pre-commit mypy environment has a pre-existing x86_64/arm64 mismatch unrelated to this change).superset/middleware/legacy_prefix_redirect.pyandsuperset/utils/backports.pystill import and behave correctly with the unconditional 3.11+ imports.from wsgiref.types import ...fails on Python 3.10 (ModuleNotFoundError) and succeeds on 3.11+/3.12, verifying the new floor is actually enforced by the code, not just documentation.ADDITIONAL INFORMATION