From 17d43c5dd0b8f44cf453e20944fc4a45dec38b2f Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Wed, 11 Nov 2026 22:19:23 +0100 Subject: [PATCH 1/2] Support Python 3.10 to 3.15 GitHub's runners no longer offer Python 3.9, so the tests can't run on it anymore. Drops Python 3.9, which has reached its end of life, and adds Python 3.15 and PyPy 3.12, in the package's metadata, in the test environments of Tox and in the tests on GitHub. --- .github/workflows/test.yml | 4 ++-- .vscode/tasks.json | 28 ++++++++++++++-------------- pyproject.toml | 4 ++-- tox.ini | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de98b69..0ec4eda 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,15 +27,15 @@ jobs: - macos-latest - windows-latest python-version: - - '3.9' - '3.10' - '3.11' - '3.12' - '3.13' - '3.14' - - pypy-3.9 + - '3.15' - pypy-3.10 - pypy-3.11 + - pypy-3.12 steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 37a7d47..8cd8b29 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -80,9 +80,9 @@ } }, { - "label": "Test Python 3.9", + "label": "Test Python 3.10", "type": "shell", - "command": "tox -e py39", + "command": "tox -e py310", "group": { "kind": "test", "isDefault": false @@ -93,9 +93,9 @@ } }, { - "label": "Test Python 3.10", + "label": "Test Python 3.11", "type": "shell", - "command": "tox -e py310", + "command": "tox -e py311", "group": { "kind": "test", "isDefault": false @@ -106,9 +106,9 @@ } }, { - "label": "Test Python 3.11", + "label": "Test Python 3.12", "type": "shell", - "command": "tox -e py311", + "command": "tox -e py312", "group": { "kind": "test", "isDefault": false @@ -119,9 +119,9 @@ } }, { - "label": "Test Python 3.12", + "label": "Test Python 3.13", "type": "shell", - "command": "tox -e py312", + "command": "tox -e py313", "group": { "kind": "test", "isDefault": false @@ -132,9 +132,9 @@ } }, { - "label": "Test Python 3.13", + "label": "Test Python 3.14", "type": "shell", - "command": "tox -e py313", + "command": "tox -e py314", "group": { "kind": "test", "isDefault": false @@ -145,9 +145,9 @@ } }, { - "label": "Test Python 3.14", + "label": "Test Python 3.15", "type": "shell", - "command": "tox -e py314", + "command": "tox -e py315", "group": { "kind": "test", "isDefault": false @@ -177,12 +177,12 @@ }, { "dependsOn": [ - "Test Python 3.9", "Test Python 3.10", "Test Python 3.11", "Test Python 3.12", "Test Python 3.13", - "Test Python 3.14" + "Test Python 3.14", + "Test Python 3.15" ], "label": "Run tests", "group": { diff --git a/pyproject.toml b/pyproject.toml index b871f6b..9575fee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,12 +26,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities", @@ -42,7 +42,7 @@ keywords = [ "cli", "tools", ] -requires-python = ">=3.9" +requires-python = ">=3.10" [project.scripts] pyclean = "pyclean.cli:main" diff --git a/tox.ini b/tox.ini index 95167cc..fef8cbb 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,8 @@ envlist = lint types license - py3{9,10,11,12,13,14} - pypy3{9,10,11} + py3{10,11,12,13,14,15} + pypy3{10,11,12} package clean requires = virtualenv From 27aff52b35de440f944081e549b3d0f54cb0b92d Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Wed, 11 Nov 2026 22:19:23 +0100 Subject: [PATCH 2/2] Adapt linting to current Ruff release The current Ruff release checks two more rules: it looks for a copyright notice at the top of each file, and for functions with many positional arguments. Ruff now recognizes our SPDX headers as copyright notices, and one test, which receives its mocks from decorators as positional arguments, is exempt from the new rule. The checks pass again. --- pyproject.toml | 3 +++ tests/test_main.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9575fee..3c7ce7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,9 @@ quote-style = "single" extend-select = ["ALL"] extend-ignore = ["ANN", "B904", "D", "FBT002", "INP001", "Q000", "UP"] +[tool.ruff.lint.flake8-copyright] +notice-rgx = "SPDX-FileCopyrightText: \\d{4}" + [tool.ruff.lint.flake8-quotes] inline-quotes="single" diff --git a/tests/test_main.py b/tests/test_main.py index 829ce83..d0b7ea6 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -98,7 +98,7 @@ def test_quiet_logging(mock_descend, mock_logconfig): @patch('pyclean.main.suggest_debris_option') @patch('pyclean.runner.CleanupRunner.configure') @patch('pyclean.main.log') -def test_report_failures( # noqa: PLR0913 +def test_report_failures( # noqa: PLR0913, PLR0917 mock_log, mock_configure, mock_suggest,