From 615f1603f0c571a5fd702a6da84896caad81427a Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sat, 27 May 2023 11:37:50 +0200 Subject: [PATCH] Switch default backend to ProcessPoolExecutor even when loky is installed. --- CHANGES.md | 4 +++- src/pytask_parallel/backends.py | 6 +----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b0a5fef..5aa58d3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,10 +5,12 @@ 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). -## 0.3.1 - 2023-xx-xx +## 0.3.1 - 2023-05-27 - {pull}`56` refactors the `ProcessPoolExecutor`. - {pull}`57` does some housekeeping. +- {pull}`59` sets the default backend to `ProcessPoolExecutor` even when loky is + installed. ## 0.3.0 - 2023-01-23 diff --git a/src/pytask_parallel/backends.py b/src/pytask_parallel/backends.py index 3a4d9de..8633a3e 100644 --- a/src/pytask_parallel/backends.py +++ b/src/pytask_parallel/backends.py @@ -46,8 +46,6 @@ class ParallelBackendChoices(enum.Enum): PROCESSES = "processes" THREADS = "threads" - PARALLEL_BACKENDS_DEFAULT = ParallelBackendChoices.PROCESSES - PARALLEL_BACKENDS = { ParallelBackendChoices.PROCESSES: CloudpickleProcessPoolExecutor, ParallelBackendChoices.THREADS: ThreadPoolExecutor, @@ -72,6 +70,4 @@ class ParallelBackendChoices(enum.Enum): # type: ignore[no-redef] ), } - PARALLEL_BACKENDS_DEFAULT = ( - ParallelBackendChoices.LOKY # type: ignore[attr-defined] - ) +PARALLEL_BACKENDS_DEFAULT = ParallelBackendChoices.PROCESSES