Skip to content

🚫 Remove Python 3.10 Support#1034

Merged
shaneahmed merged 9 commits intodevelopfrom
dev-remove-python3.10
Mar 30, 2026
Merged

🚫 Remove Python 3.10 Support#1034
shaneahmed merged 9 commits intodevelopfrom
dev-remove-python3.10

Conversation

@shaneahmed
Copy link
Copy Markdown
Member

@shaneahmed shaneahmed commented Mar 12, 2026

This PR removes Python 3.10 support across TIAToolbox and updates code, tooling, and documentation to reflect Python 3.11+ as the new minimum supported version. This aligns the project with modern Python typing, timezone features, and the upstream ecosystem’s deprecation trajectory.

✅ Summary of Changes

Packaging & Tooling

  • Set minimum supported Python to 3.11 in:
    • setup.py (python_requires)
    • Conda environment YAMLs
    • pyproject.toml (Ruff target-version & mypy python_version)
  • Remove Python 3.10 from:
    • GitHub Actions matrices (python-package, mypy-type-check, pip-install)
    • Docker publish workflow

Docker Images

  • Remove Debian and Ubuntu Dockerfiles for Python 3.10.

Code Modernization

  • Switch from typing_extensions.Self → stdlib typing.Self.
  • Replace timezone.utcdatetime.UTC (Python 3.11+).
  • Update tests relying on specific Python version semantics (e.g., rename test_py310_inittest_py311_init).

Documentation

  • Update supported Python versions in:
    • docs/installation.rst
    • CONTRIBUTING.rst
    • README.md (example env creation now uses Python 3.11)

🔍 Reviewed Changes

Copilot reviewed 18 out of 18 modified files and produced 2 comments.

Summary per file
File Description
tiatoolbox/wsicore/wsireader.py Switch to datetime.UTC and update timezone handling.
tiatoolbox/annotation/storage.py Replace typing_extensions.Self with stdlib typing.Self.
tests/test_annotation_stores.py Update version‑specific test names/values to target 3.11.
setup.py Set python_requires >= 3.11 and drop 3.10 classifier.
requirements/*.conda.yml Require Python ≥ 3.11 across all conda env specs.
pyproject.toml Update Ruff target version and mypy python_version to 3.11.
docs/installation.rst Remove 3.10 from “tested versions” list.
docker/3.10/* Remove 3.10 Ubuntu/Debian Docker image definitions.
README.md Update conda example to Python 3.11.
CONTRIBUTING.rst Update contributor guidelines to Python 3.11+.
.github/workflows/* Remove Python 3.10 from all CI matrices.

@shaneahmed shaneahmed self-assigned this Mar 12, 2026
@shaneahmed shaneahmed added dev tools Changes/Updates in Development tools dependencies Pull requests that update a dependency file labels Mar 12, 2026
@shaneahmed shaneahmed added this to the Release v2.1.0 milestone Mar 12, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (f06bf3b) to head (024d14c).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1034      +/-   ##
===========================================
- Coverage    99.88%   99.88%   -0.01%     
===========================================
  Files           85       85              
  Lines        11568    11567       -1     
  Branches      1510     1510              
===========================================
- Hits         11555    11554       -1     
  Misses           6        6              
  Partials         7        7              

☔ View full report in Codecov by Sentry.
📢 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.

@shaneahmed shaneahmed changed the title 📌 Update Python Versions ❌ Update Python Versions Mar 26, 2026
@shaneahmed shaneahmed changed the title ❌ Update Python Versions ❌ Drop Python 3.10 Support Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes Python 3.10 support across TIAToolbox’s packaging metadata, CI/tooling configuration, and documentation, and updates code to use Python 3.11+ standard-library typing/timezone features.

Changes:

  • Bump minimum supported Python to 3.11 (setup metadata, Ruff target-version, mypy python_version, conda env specs).
  • Update CI matrices and Docker publishing to stop building/testing Python 3.10.
  • Modernize typing/timezone usage for 3.11+ (e.g., typing.Self, datetime.UTC) and update related tests/docs.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tiatoolbox/wsicore/wsireader.py Switch to datetime.UTC and update related timezone-aware parsing.
tiatoolbox/annotation/storage.py Replace typing_extensions.Self with stdlib typing.Self.
tests/test_annotation_stores.py Update Python compatibility test naming/target version.
setup.py Set python_requires >=3.11 and drop Python 3.10 classifier.
requirements/requirements.win64.dev.conda.yml Require Python >=3.11 in Windows dev conda env.
requirements/requirements.win64.conda.yml Require Python >=3.11 in Windows prod conda env.
requirements/requirements.dev.conda.yml Require Python >=3.11 in dev conda env.
requirements/requirements.conda.yml Require Python >=3.11 in prod conda env.
pyproject.toml Update Ruff target-version and mypy python_version to 3.11.
docs/installation.rst Update supported Python versions text.
docker/3.10/Ubuntu/Dockerfile Remove Python 3.10 Ubuntu Docker image definition.
docker/3.10/Debian/Dockerfile Remove Python 3.10 Debian Docker image definition.
README.md Update example conda env creation to Python 3.11.
CONTRIBUTING.rst Update contributor guidance to supported Python versions.
.github/workflows/python-package.yml Remove 3.10 from test matrix; update release job to 3.11.
.github/workflows/pip-install.yml Remove 3.10 from pip-install validation matrix.
.github/workflows/mypy-type-check.yml Remove 3.10 from mypy workflow matrix.
.github/workflows/docker-publish.yml Stop publishing 3.10 Docker image tags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shaneahmed shaneahmed changed the title ❌ Drop Python 3.10 Support ❌ Remove Python 3.10 Support Mar 30, 2026
@shaneahmed shaneahmed changed the title ❌ Remove Python 3.10 Support 🚫 Remove Python 3.10 Support Mar 30, 2026
@shaneahmed shaneahmed merged commit 275e4e9 into develop Mar 30, 2026
30 of 36 checks passed
@shaneahmed shaneahmed deleted the dev-remove-python3.10 branch March 30, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file dev tools Changes/Updates in Development tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants