Update save_private_keys.py
Created by: zicmama
ScryptParams required positional argument BUG
Merge request reports
Activity
Created by: vtexier
I don't reproduce the bug.
Even so, the bug is not in the examples, but in the SigningKey class. So it should be fixed in the SigningKey class not in every examples.
The scrypt_params should be an optional key=value param. Because it will stay the same by default for a long time before Duniter change the crypto algorithm or its parameters.
There is a default value for this parameter so the bug is weird : https://github.com/duniter/duniter-python-api/blob/master/duniterpy/key/signing_key.py#L29
Created by: vtexier
@Insoleet : yes its weird, but create an object in a function declaration is not a good practice and even forbidden in some languages. Look at my comment here :
https://github.com/duniter/duniter-python-api/pull/40#issuecomment-363934610
I agree that this is not really clean. The fix you suggest seems good, let's hope that @zicmama accepts to update its pull requests :)
Created by: vtexier
Ok I got it @zicmama is right !
The last release 42.2 (which is on the pip repository) is broken.
A look at the history reveal all : https://github.com/duniter/duniter-python-api/commits/master
@inso added a mandatory parameter which broke the examples with the bug "ScryptParams required positional argument BUG" in the release 42.2.
@floppy31 fixed it latter on the github repo (a dirty fix, but a fix is a fix anyway...), but only on github !
So I will clean the fix and the examples and then ask for @Insoleet how to make a new release on the pip repository.
added Crypto label
added Examples label