Skip to content

Drop Python 3.9, test on 3.10 and 3.14 - #4136

Merged
T4rk1n merged 3 commits into
devfrom
chore/python-3.10-3.14
Nov 10, 2026
Merged

T4rk1n merged 3 commits into
devfrom
chore/python-3.10-3.14

Conversation

@T4rk1n

@T4rk1n T4rk1n commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Drops Python 3.9. Dash now requires Python 3.10, and CI tests on 3.10 and 3.14 (was 3.9 and 3.12).

Changes

  • setup.py: python_requires=">=3.10", classifiers 3.10 through 3.14.
  • testing.yml: every ["3.9", "3.12"] matrix is now ["3.10", "3.14"]. Percy moves with the upper version (3.14). Single-version jobs (build, typing, table, benchmarks) stay on 3.12.
  • Lint (main and DCC) runs on 3.10 only: the pinned black 22.3.0 and pylint 3.0.3 crash on 3.14. A linter bump is now unblocked but needs a repo-wide reformat, so it is left for its own PR.
  • Removed 3.9 workarounds: pylint --ignored-modules=mcp, the mimesis version split, MCP test skips, the mypy test gate and its python_version>="3.12" install marker, a dead 3.8 fallback in the component generator.

Fix found along the way

On Python 3.10, isinstance(list[str], type) is True, so issubclass(list[str], Component) raised TypeError for MCP tools with annotations like list[str]. CI never caught it because MCP tests were skipped on 3.9 and only ran on 3.12. test_mcpd009 and test_mcpm003 fail on 3.10 before the fix and pass after.

Notes

  • jupyterlab<4 pulls y-py, which has no 3.14 wheel. pip builds it from source with Rust (present on GitHub runners), so the 3.14 installs are a bit slower.
  • Verified locally: unit tests on 3.10 and 3.14.10, MCP and callback integration tests with dash_duo on both, compliance tests and lint on 3.10.

Require Python 3.10, move the CI matrix to 3.10 and 3.14, and remove the
3.9-only workarounds. Lint runs on 3.10 only since the pinned black and
pylint crash on 3.14. Fix MCP tools with list[str] style annotations
crashing on 3.10, which CI never covered before.
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Dash performance benchmarks

✅ all within thresholds

scenario metric p90 (ms) median growth baseline p90 note
✅ callback_chain chain_ms 442.7 425.1 0.97x 499.1
✅ callback_chain graph_ms 2.5 2.5 1.0x 2.4
✅ callback_fanout fanout_ms 83.1 78.2 0.86x 92.5
✅ deep_nesting render_ms 71.7 63.9 1.05x 56.8
✅ full_children_replace replace_ms 5343.3 1992.1 18.32x 4697.1
✅ initial_render_large render_ms 663.3 575.5 0.95x 694.4
✅ initial_render_small render_ms 101.3 93.9 0.97x 104.0
✅ patch_append_nested append_ms 129.8 92.3 2.54x 192.3
✅ patch_append_toplevel append_ms 129.6 86.6 2.41x 140.2
✅ patch_scalar_update_large update_ms 154.7 140.2 1.03x 202.9
✅ wildcard_all_resolve wildcard_ms 311.0 293.6 0.93x 313.6
✅ wildcard_all_resolve graph_ms 1.1 1.1 1.0x 1.3

growth = late-third / early-third per-op time; ~1 is flat, a large value means the per-op cost scales with accumulated state.

machine scale vs baseline: 0.98x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on initial_render_small.

@KoolADE85

Copy link
Copy Markdown
Contributor

This also closes #4038

@T4rk1n
T4rk1n merged commit ce7fc72 into dev Nov 10, 2026
61 of 62 checks passed
@T4rk1n
T4rk1n deleted the chore/python-3.10-3.14 branch November 10, 2026 14:20
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.

2 participants