lightning
lightning copied to clipboard
async keyword for functions in the Python API Client
looking at the python API client I saw that the blocking functions are supposed to have an async keyword in order to return a future. c.f.: https://github.com/ElementsProject/lightning/blob/cf12130627599cb76ed64f26e5c7b81bc9dc99bb/contrib/pylightning/lightning/lightning.py#L89
However I could not find any function that has this. so either delete the comment or add this to those functions
We haven't been too strict about this yet, but we should definitely aim to backfill the ones that aren't there just yet.
Fixed by https://github.com/ElementsProject/lightning/pull/2326 ?
I don't think it is addressed by #2326 since that only deals with plugin side hooks and methods, whereas this issue is about the async
argument to some of the client-side RPC methods which cause a future to be returned instead of blocking until the result is ready.
Am I missing something or should this issue still be open? I dont see any async function arguments
I think no, the pylightning
is deprecated in favor of pyln-client
The comment still exists in pyln-client https://github.com/ElementsProject/lightning/blob/master/contrib/pyln-client/pyln/client/lightning.py#L424