use asyncio.isfuture to check plum_future is unwrapped #183
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
plum_future
passed in may wrap a_asyncio.Future
which is notan instace of
plumpy.Future
. Soasyncio.isfuture
is indispensable here tocontinue to unwrap the future to the final result.
on_dnoe
. The augment is_plum_future
with an underscore as its prefix while in the callbackfunction there is not but use the unlocal
plum_future
.As mentioned in aiidateam/aiida-core#4595 (comment), I change it to
asyncio.isfuture
in aiida_core but forget there also the same issue in plumpy. Although this didn't cause any problem yet, may relate to some subtle problem. Moreover, the typo of_plum_future
seems doesn't matter just because we didn't have a deeply wrapped future. It would be more make sense to adopt the modifies in this pull request.