Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docs/source/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/pytask_parallel/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand Down
2 changes: 1 addition & 1 deletion src/pytask_parallel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 2 additions & 0 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down