Skip to content

chore: drop Python 3.10 support, require Python 3.11+ - #42045

Merged
rusackas merged 4 commits into
masterfrom
chore/drop-python-3.10-support
Jul 20, 2026
Merged

rusackas merged 4 commits into
masterfrom
chore/drop-python-3.10-support

Conversation

@rusackas

@rusackas rusackas commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

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.

  • CI: dropped the previous (3.10) tier from .github/actions/setup-backend/action.yml and 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 in bump-python-package.yml; dropped the py310 Docker build preset from docker.yml, tag-release.yml, and scheduled-docker-image-refresh.yml; bumped the stale apache/superset-cache:3.10-slim-trixie registry-cache references (already inconsistent with the main Dockerfile's 3.11.14-slim-trixie base) to 3.11-slim-trixie across superset-frontend.yml and the three docker-compose*.yml files.
  • Packaging: requires-python = ">=3.11" and dropped the 3.10 classifier in pyproject.toml, superset-core/pyproject.toml, and superset-extensions-cli/pyproject.toml (plus their README badges); ruff target-version bumped to py311; dropped the now-dead pyhive[hive]>=0.6.5;python_version<'3.11' marker from the hive/spark extras (always-false once the floor is 3.11).
  • Docs: 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 in issue-reporting.md all 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.*: bumped python:3.10-slim-trixie → python:3.11-slim-trixie in the four release-tooling Dockerfiles.
  • UPDATING.md: added an entry under ## Next.
  • Code shims removed: superset/app.py, superset/middleware/legacy_prefix_redirect.py, and superset/utils/backports.py each had a sys.version_info >= (3, 11) branch to backport wsgiref.types / enum.StrEnum on 3.10. Since 3.11 is now the floor, these collapse to unconditional imports (and a stale # type: ignore[arg-type] in app.py, which mypy now flags as unused, was removed along with the comment explaining it).
  • Closing fix(deps): pin syntaqlite below 0.5.0 for Python 3.10 compatibility #42007: that PR proposed reverting syntaqlite below 0.5.0 because 0.5.0+ unconditionally imports enum.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 | Y is available since 3.10 but not required until now; ~217 files under superset/ still use the old-style typing imports. A dedicated ruff --fix --select UP pass (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.
  • Exception groups (except*, 3.11) could simplify a few command layers that currently aggregate multiple errors manually — worth a targeted look, not a blanket change.
  • CPython 3.11's performance improvements are a free win from this change alone; no code changes needed.

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).
  • Confirmed superset/middleware/legacy_prefix_redirect.py and superset/utils/backports.py still import and behave correctly with the unconditional 3.11+ imports.
  • Confirmed 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

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

bito-code-review Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #8a90af

Actionable Suggestions - 0
Review Details
  • Files reviewed - 12 · Commit Range: 332fe2e..332fe2e
    • RELEASING/Dockerfile.from_local_tarball
    • RELEASING/Dockerfile.from_svn_tarball
    • RELEASING/Dockerfile.make_docs
    • RELEASING/Dockerfile.make_tarball
    • docs/admin_docs/configuration/mcp-server.mdx
    • pyproject.toml
    • scripts/check-env.py
    • superset-core/pyproject.toml
    • superset-extensions-cli/pyproject.toml
    • superset/app.py
    • superset/middleware/legacy_prefix_redirect.py
    • superset/utils/backports.py
  • Files skipped - 21
    • .github/ISSUE_TEMPLATE/bug-report.yml - Reason: Filter setting
    • .github/actions/setup-backend/action.yml - Reason: Filter setting
    • .github/workflows/bump-python-package.yml - Reason: Filter setting
    • .github/workflows/docker.yml - Reason: Filter setting
    • .github/workflows/pre-commit.yml - Reason: Filter setting
    • .github/workflows/scheduled-docker-image-refresh.yml - Reason: Filter setting
    • .github/workflows/superset-extensions-cli.yml - Reason: Filter setting
    • .github/workflows/superset-frontend.yml - Reason: Filter setting
    • .github/workflows/superset-python-integrationtest.yml - Reason: Filter setting
    • .github/workflows/superset-python-unittest.yml - Reason: Filter setting
    • .github/workflows/tag-release.yml - Reason: Filter setting
    • UPDATING.md - Reason: Filter setting
    • docker-compose-light.yml - Reason: Filter setting
    • docker-compose-non-dev.yml - Reason: Filter setting
    • docker-compose.yml - Reason: Filter setting
    • docs/developer_docs/contributing/development-setup.md - Reason: Filter setting
    • docs/developer_docs/contributing/issue-reporting.md - Reason: Filter setting
    • docs/developer_docs/index.md - Reason: Filter setting
    • superset-core/README.md - Reason: Filter setting
    • superset-extensions-cli/README.md - Reason: Filter setting
    • superset/mcp_service/README.md - Reason: Filter setting
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • 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 [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@github-actions github-actions Bot added doc Namespace | Anything related to documentation github_actions Pull requests that update GitHub Actions code risk:ci-script PR modifies scripts that execute in CI (supply chain risk) and removed dependencies:python labels Jul 14, 2026
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 332fe2e
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a566831f72d6c00084de23d
😎 Deploy Preview https://deploy-preview-42045--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.91%. Comparing base (4b07d43) to head (397533f).
⚠️ Report is 102 commits behind head on master.

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     
Flag Coverage Δ
hive 38.94% <100.00%> (-0.11%) ⬇️
javascript 70.46% <ø> (ø)
mysql 57.63% <100.00%> (-0.26%) ⬇️
postgres 57.68% <100.00%> (-0.26%) ⬇️
presto 40.90% <100.00%> (-0.14%) ⬇️
python 59.10% <100.00%> (-0.22%) ⬇️
sqlite 57.30% <100.00%> (-0.26%) ⬇️
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.

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

Copy link
Copy Markdown
Contributor

The flagged issue is correct. Using a floating tag like 3.11-slim-trixie in a Dockerfile used for release builds introduces non-determinism, as the underlying image can change over time, leading to unreproducible artifacts. To resolve this, you should pin the base image to a specific patch version, matching the approach used in the main Dockerfile.

Since I do not have access to the actual RELEASING/Dockerfile.from_local_tarball file in this environment, I cannot apply the fix directly. However, you should update line 17 of that file to use a pinned version, for example:

# 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-trixie

Regarding other comments on this PR: I have checked the provided pr_comments.csv file, but it appears to be empty (containing only the header row). Therefore, there are no other comments to address.

RELEASING/Dockerfile.from_local_tarball

FROM python:3.11.14-slim-trixie

@bito-code-review

bito-code-review Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #6b0eef

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 332fe2e..f9df4da
    • superset/app.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • 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 [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

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]>

@hainenber hainenber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've pushed a commit to drop Python3.10 references in Makefile, aside from that, all good

@rusackas

Copy link
Copy Markdown
Member Author

Thanks for the Makefile cleanup @hainenber, appreciate you catching that!

@hainenber

Copy link
Copy Markdown
Contributor

ah darn, my push made my approval invalid

@villebro villebro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rusackas
rusackas merged commit 5a17ae1 into master Jul 20, 2026
66 checks passed
@rusackas
rusackas deleted the chore/drop-python-3.10-support branch July 20, 2026 15:16
@github-project-automation github-project-automation Bot moved this from Work in Progress to Lazy Consensus Reached in Apache Superset 7.0 Jul 20, 2026
@villebro villebro moved this from Lazy Consensus Reached to Completed in Apache Superset 7.0 Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Namespace | Anything related to documentation github_actions Pull requests that update GitHub Actions code preset-io risk:breaking-change Issues or PRs that will introduce breaking changes risk:ci-script PR modifies scripts that execute in CI (supply chain risk) size/L

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants