Skip to content
Open
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
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ updates:
directory: "/"
schedule:
interval: "weekly"

groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
4 changes: 2 additions & 2 deletions docs/source/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ pytask-parallel is available on [PyPI](https://pypi.org/project/pytask-parallel)
[Anaconda.org](https://anaconda.org/conda-forge/pytask-parallel). Install it with

```console
$ pip install pytask-parallel
$ uv add pytask-parallel

# or

$ conda install -c conda-forge pytask-parallel
$ pixi add pytask-parallel
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ typing:

# Run linting and formatting
lint:
uvx --with pre-commit-uv pre-commit run -a
uvx prek run -a

# Build documentation
docs:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test = [
]
typing = [
"pytask-parallel",
"ty",
"ty>=0.0.8",
{include-group = "coiled"},
{include-group = "dask"},
]
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 @@ -54,7 +54,7 @@ def parse_future_result(

exc_info = _parse_future_exception(future_exception)
return WrapperResult(
carry_over_products=None, # type: ignore[arg-type]
carry_over_products=None,
warning_reports=[],
exc_info=exc_info,
stdout="",
Expand Down
16 changes: 12 additions & 4 deletions src/pytask_parallel/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,22 @@ def wrap_task_in_thread(task: PTask, *, remote: bool, **kwargs: Any) -> WrapperR
try:
out = task.function(**kwargs)
except Exception: # noqa: BLE001
exc_info = sys.exc_info()
exc_info_raw = sys.exc_info()
exc_info = (
cast(
"tuple[type[BaseException], BaseException, TracebackType | str | None]",
exc_info_raw,
)
if exc_info_raw[0] is not None
else None
)
else:
_handle_function_products(task, out, remote=remote)
exc_info = None
return WrapperResult(
carry_over_products=None, # type: ignore[arg-type]
carry_over_products=None,
warning_reports=[],
exc_info=exc_info, # type: ignore[arg-type]
exc_info=exc_info,
stdout="",
stderr="",
)
Expand Down Expand Up @@ -161,7 +169,7 @@ def wrap_task_in_process( # noqa: PLR0913
captured_stderr_buffer.close()

return WrapperResult(
carry_over_products=products, # type: ignore[arg-type]
carry_over_products=products,
warning_reports=warning_reports,
exc_info=processed_exc_info,
stdout=captured_stdout,
Expand Down