Skip to content

Commit cb8a649

Browse files
Raise minimum Python to 3.10 (#129)
* Raise minimum Python to 3.10 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Document Python support update * Handle --trace input on Python 3.14 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5799777 commit cb8a649

File tree

7 files changed

+17
-5
lines changed

7 files changed

+17
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
fail-fast: false
4242
matrix:
4343
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
44-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
44+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
4545

4646
steps:
4747
- uses: actions/checkout@v6

docs/source/changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ chronological order. Releases follow [semantic versioning](https://semver.org/)
55
releases are available on [PyPI](https://pypi.org/project/pytask-parallel) and
66
[Anaconda.org](https://anaconda.org/conda-forge/pytask-parallel).
77

8+
## Unreleased
9+
10+
- {pull}`129` drops support for Python 3.8 and 3.9 and adds support for Python 3.14.
11+
812
## 0.5.1 - 2025-03-09
913

1014
- {pull}`114` drops support for Python 3.8 and adds support for Python 3.13.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ classifiers = [
88
"Programming Language :: Python :: 3",
99
"Programming Language :: Python :: 3 :: Only",
1010
]
11-
requires-python = ">=3.9"
11+
requires-python = ">=3.10"
1212
dependencies = [
1313
"attrs>=21.3.0",
1414
"click>=8.1.8,!=8.2.0",

src/pytask_parallel/backends.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
from concurrent.futures import ProcessPoolExecutor
99
from concurrent.futures import ThreadPoolExecutor
1010
from enum import Enum
11+
from typing import TYPE_CHECKING
1112
from typing import Any
12-
from typing import Callable
1313
from typing import ClassVar
1414

1515
import cloudpickle
1616
from attrs import define
1717
from loky import get_reusable_executor
1818

19+
if TYPE_CHECKING:
20+
from collections.abc import Callable
21+
1922
__all__ = ["ParallelBackend", "ParallelBackendRegistry", "WorkerType", "registry"]
2023

2124

src/pytask_parallel/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from functools import partial
77
from typing import TYPE_CHECKING
88
from typing import Any
9-
from typing import Callable
109

1110
from pytask import NodeLoadError
1211
from pytask import PNode
@@ -19,6 +18,7 @@
1918
from pytask_parallel.typing import is_local_path
2019

2120
if TYPE_CHECKING:
21+
from collections.abc import Callable
2222
from concurrent.futures import Future
2323
from pathlib import Path
2424
from types import ModuleType

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
import sys
44
from contextlib import contextmanager
5-
from typing import Callable
5+
from typing import TYPE_CHECKING
66

77
import pytest
88
from click.testing import CliRunner
99
from nbmake.pytest_items import NotebookItem
1010
from pytask import storage
1111

12+
if TYPE_CHECKING:
13+
from collections.abc import Callable
14+
1215

1316
class SysPathsSnapshot:
1417
"""A snapshot for sys.path."""

tests/test_execute.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,11 @@ def test_task_without_path_that_return(runner, tmp_path, parallel_backend):
266266
@pytest.mark.parametrize("parallel_backend", _IMPLEMENTED_BACKENDS)
267267
def test_parallel_execution_is_deactivated(runner, tmp_path, flag, parallel_backend):
268268
tmp_path.joinpath("task_example.py").write_text("def task_example(): pass")
269+
input_ = "c\n" if flag == "--trace" else None
269270
result = runner.invoke(
270271
cli,
271272
[tmp_path.as_posix(), "-n", "2", "--parallel-backend", parallel_backend, flag],
273+
input=input_,
272274
)
273275
assert result.exit_code == ExitCode.OK
274276
assert "Started 2 workers" not in result.output

0 commit comments

Comments
 (0)