lightning icon indicating copy to clipboard operation
lightning copied to clipboard

async keyword for functions in the Python API Client

Open renepickhardt opened this issue 5 years ago • 6 comments

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

renepickhardt avatar Jul 14 '18 19:07 renepickhardt

We haven't been too strict about this yet, but we should definitely aim to backfill the ones that aren't there just yet.

cdecker avatar Jul 15 '18 16:07 cdecker

Fixed by https://github.com/ElementsProject/lightning/pull/2326 ?

darosior avatar Nov 04 '19 12:11 darosior

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.

cdecker avatar Nov 12 '19 20:11 cdecker

Am I missing something or should this issue still be open? I dont see any async function arguments

djpnewton avatar Jul 24 '22 04:07 djpnewton

I think no, the pylightning is deprecated in favor of pyln-client

vincenzopalazzo avatar Jul 24 '22 10:07 vincenzopalazzo

The comment still exists in pyln-client https://github.com/ElementsProject/lightning/blob/master/contrib/pyln-client/pyln/client/lightning.py#L424

djpnewton avatar Jul 24 '22 12:07 djpnewton