Skip to content

Commit

Permalink
fix(targets): Bumped min joblib dependency to >=1.3.0 and replaced …
Browse files Browse the repository at this point in the history
…deprecated `parallel_backend` with `parallel_config` (#2288)

* swtich from deprecated parallel_backend to parallel_config

* joblib requirement to 1.3.0 and above

* missing some wheels
  • Loading branch information
BuzzCutNorman authored Mar 7, 2024
1 parent aa8b5ef commit a72a987
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fs = ">=2.4.16"
importlib-metadata = {version = "<8.0.0", python = "<3.12"}
importlib-resources = {version = ">=5.12.0", python = "<3.9"}
inflection = ">=0.5.1"
joblib = ">=1.0.1"
joblib = ">=1.3.0"
jsonpath-ng = ">=1.5.3"
jsonschema = ">=4.16.0"
packaging = ">=23.1"
Expand Down
4 changes: 2 additions & 2 deletions singer_sdk/target_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import typing as t

import click
from joblib import Parallel, delayed, parallel_backend
from joblib import Parallel, delayed, parallel_config

from singer_sdk.exceptions import RecordsWithoutSchemaException
from singer_sdk.helpers._batch import BaseBatchFileEncoding
Expand Down Expand Up @@ -521,7 +521,7 @@ def _drain_all(self, sink_list: list[Sink], parallelism: int) -> None:
def _drain_sink(sink: Sink) -> None:
self.drain_one(sink)

with parallel_backend("threading", n_jobs=parallelism):
with parallel_config(backend="threading", n_jobs=parallelism):
Parallel()(delayed(_drain_sink)(sink=sink) for sink in sink_list)

def _write_state_message(self, state: dict) -> None:
Expand Down

0 comments on commit a72a987

Please sign in to comment.