Commit 275e4e9
🚫 Remove Python 3.10 Support (#1034)
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.utc` → `datetime.UTC` (Python 3.11+).
- Update tests relying on specific Python version semantics (e.g., rename `test_py310_init` → `test_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**.
<details>
<summary>Summary per file</summary>
| 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. |
</details>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent f06bf3b commit 275e4e9
File tree
19 files changed
+26
-77
lines changed- .github/workflows
- docker/3.10
- Debian
- Ubuntu
- docs
- requirements
- tests
- tiatoolbox
- annotation
- wsicore
19 files changed
+26
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
0 commit comments