Skip to content

SG-45254 Drop Python 3.7/3.8 compat from build tooling (keep 3.9) - #88

Draft
julien-lang wants to merge 1 commit into
masterfrom
ticket/SG-45254-drop-py37-compat
Draft

julien-lang wants to merge 1 commit into
masterfrom
ticket/SG-45254-drop-py37-compat

Conversation

@julien-lang

Copy link
Copy Markdown
Member

Problem

tk-toolchain still carried Python 3.7/3.8 compatibility shims and stale classifiers, left over from before those versions were dropped.

Changes

  • python_requires: >=3.7.0 -> >=3.9.0 (drop 3.7/3.8, keep 3.9).
  • Simplify the sphinx dependency to sphinx==7.0.0 (the sphinx==5.3.0 fallback only existed for Python < 3.9).
  • Remove the jinja2==3.0.3 pin (it only existed for the old sphinx / py<3.9 path; sphinx 7 works with modern jinja on 3.9+).
  • Remove the now-unused import sys (it was only used by the removed sphinx version conditional).
  • Classifiers: drop 3.7, keep 3.9/3.10/3.11, add 3.13.
  • conf.py intersphinx: link Python docs 3.9 -> 3.10.

Why keep 3.9

CI still runs the Python 3.9 jobs (per SG-40695 we keep testing 3.9 for compatibility as long as possible), and tk-toolchain is pip install-ed into every CI job including those. So it must remain installable on 3.9 - python_requires stays at >=3.9.0, not >=3.10.

Notes

  • No version bump here, to avoid conflicting with the other open tk-toolchain PRs; versioning is left to the release process.

Related

  • Part of SG-40695 (drop Python 3.7/3.9 compat). Companion decision: tk-ci-tools and tk-internal intentionally keep their 3.9 CI runs, so they need no change.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review comments; the changes retain Python 3.9 support.

Pull request overview

Updates tk-toolchain to support Python 3.9+ while removing obsolete Python 3.7/3.8 compatibility.

Changes:

  • Raises the minimum Python version and updates classifiers through Python 3.13.
  • Simplifies Sphinx dependencies and removes the obsolete Jinja2 pin.
  • Updates the Python intersphinx documentation target.
File summaries
File Description
tk_toolchain/cmd_line_tools/tk_docs_generation/sphinx_data/conf.py Updates the Python documentation reference.
setup.py Updates Python requirements, dependencies, and classifiers.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.95%. Comparing base (538f78e) to head (ab4698f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #88   +/-   ##
=======================================
  Coverage   48.95%   48.95%           
=======================================
  Files          19       19           
  Lines         721      721           
=======================================
  Hits          353      353           
  Misses        368      368           
Flag Coverage Δ
Linux 48.54% <ø> (ø)
Python-3.10 48.54% <ø> (ø)
Python-3.11 48.95% <ø> (ø)
Python-3.13 48.95% <ø> (ø)
Python-3.9 48.54% <ø> (ø)
Windows 48.53% <ø> (ø)
macOS 48.68% <ø> (ø)

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.

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