Skip to content

Commit

Permalink
Export plumpy.futures.Future
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Jan 17, 2025
1 parent e98c0ba commit 2304d5f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plumpy/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import contextlib
from typing import Any, Awaitable, Callable, Generator, Optional

__all__ = ['CancellableAction', 'capture_exceptions', 'create_task', 'create_task']
__all__ = ['CancellableAction', 'Future', 'capture_exceptions', 'create_task', 'create_task']


class InvalidFutureError(Exception):
Expand Down
1 change: 1 addition & 0 deletions src/plumpy/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,7 @@ async def step(self) -> None:
self._stepping = True
next_state = None
try:
# XXX: debug log when need to step to next state
next_state = await self._run_task(self._state.execute)
except process_states.Interruption as exception:
# If the interruption was caused by a call to a Process method then there should
Expand Down
21 changes: 17 additions & 4 deletions src/plumpy/rmq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# -*- coding: utf-8 -*-
# mypy: disable-error-code=name-defined
from .communications import *
from .futures import *
from .process_control import *
from .communications import Communicator, DeliveryFailed, RemoteException, TaskRejected, wrap_communicator
from .futures import unwrap_kiwi_future, wrap_to_concurrent_future
from .process_control import RemoteProcessController, RemoteProcessThreadController

__all__ = communications.__all__ + futures.__all__ + process_control.__all__
__all__ = [
# communications
'Communicator',
'DeliveryFailed',
'RemoteException',
# process_control
'RemoteProcessController',
'RemoteProcessThreadController',
'TaskRejected',
# futures
'unwrap_kiwi_future',
'wrap_communicator',
'wrap_to_concurrent_future',
]

0 comments on commit 2304d5f

Please sign in to comment.