From 53694b3526150722fa96b5a23125c035365e09d9 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Mon, 29 Dec 2025 18:31:10 +0100 Subject: [PATCH 1/4] Raise minimum Python to 3.10 --- .github/workflows/main.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fb57ef..7f7a5c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 diff --git a/pyproject.toml b/pyproject.toml index 1b3452d..1b52840 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", ] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "attrs>=21.3.0", "click>=8.1.8,!=8.2.0", From ac1014cd4316a3de8f3a06092043eca2c27debee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Dec 2025 17:41:46 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pytask_parallel/backends.py | 5 ++++- src/pytask_parallel/utils.py | 2 +- tests/conftest.py | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pytask_parallel/backends.py b/src/pytask_parallel/backends.py index 06a3f5e..f5aa6ee 100644 --- a/src/pytask_parallel/backends.py +++ b/src/pytask_parallel/backends.py @@ -8,14 +8,17 @@ from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ThreadPoolExecutor from enum import Enum +from typing import TYPE_CHECKING from typing import Any -from typing import Callable from typing import ClassVar import cloudpickle from attrs import define from loky import get_reusable_executor +if TYPE_CHECKING: + from collections.abc import Callable + __all__ = ["ParallelBackend", "ParallelBackendRegistry", "WorkerType", "registry"] diff --git a/src/pytask_parallel/utils.py b/src/pytask_parallel/utils.py index 1db9ab2..7688b01 100644 --- a/src/pytask_parallel/utils.py +++ b/src/pytask_parallel/utils.py @@ -6,7 +6,6 @@ from functools import partial from typing import TYPE_CHECKING from typing import Any -from typing import Callable from pytask import NodeLoadError from pytask import PNode @@ -19,6 +18,7 @@ from pytask_parallel.typing import is_local_path if TYPE_CHECKING: + from collections.abc import Callable from concurrent.futures import Future from pathlib import Path from types import ModuleType diff --git a/tests/conftest.py b/tests/conftest.py index 084397a..5bc9dcf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,13 +2,16 @@ import sys from contextlib import contextmanager -from typing import Callable +from typing import TYPE_CHECKING import pytest from click.testing import CliRunner from nbmake.pytest_items import NotebookItem from pytask import storage +if TYPE_CHECKING: + from collections.abc import Callable + class SysPathsSnapshot: """A snapshot for sys.path.""" From abf57c22167c2f37eab61b0b7708df78e7ef1fec Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Mon, 29 Dec 2025 18:48:50 +0100 Subject: [PATCH 3/4] Document Python support update --- docs/source/changes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/changes.md b/docs/source/changes.md index e2ab1c8..308df57 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -5,6 +5,10 @@ chronological order. Releases follow [semantic versioning](https://semver.org/) releases are available on [PyPI](https://pypi.org/project/pytask-parallel) and [Anaconda.org](https://anaconda.org/conda-forge/pytask-parallel). +## Unreleased + +- {pull}`129` drops support for Python 3.8 and 3.9 and adds support for Python 3.14. + ## 0.5.1 - 2025-03-09 - {pull}`114` drops support for Python 3.8 and adds support for Python 3.13. From ecd5d3d23d1931e00715e6a421d65c8af2b6be79 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Mon, 29 Dec 2025 19:15:30 +0100 Subject: [PATCH 4/4] Handle --trace input on Python 3.14 --- tests/test_execute.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_execute.py b/tests/test_execute.py index 761169a..c06919a 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -266,9 +266,11 @@ def test_task_without_path_that_return(runner, tmp_path, parallel_backend): @pytest.mark.parametrize("parallel_backend", _IMPLEMENTED_BACKENDS) def test_parallel_execution_is_deactivated(runner, tmp_path, flag, parallel_backend): tmp_path.joinpath("task_example.py").write_text("def task_example(): pass") + input_ = "c\n" if flag == "--trace" else None result = runner.invoke( cli, [tmp_path.as_posix(), "-n", "2", "--parallel-backend", parallel_backend, flag], + input=input_, ) assert result.exit_code == ExitCode.OK assert "Started 2 workers" not in result.output