Open SomberNight opened 2 years ago
What is the state of this? A reply would be nice. :)
Note: for continued support of the keepkey plugin in Electrum, we need a new release of the library on PyPI with these changes. If you've lost the keys to the PyPI package, just release under a new name and state it in the README or similar.
Even if you don't release a new version on PyPI, could you regenerate the pb2 files in the git repo? I can open a PR for it if you want, but please say so here then.
Otherwise if this library is unmaintained, again, we might have to remove keepkey support from Electrum.
CC @markrypt0 @pastaghost (I see they are not in repository's watchers list, so they might miss the issue accidentally)
@SomberNight @MrNaif2018 - thanks for tagging me on this issue; we'll give this some attention right away.
There are several reasons this hasn't been updated. First is that it isn't a seamless upgrade in firmware and because it hasn't been a critical issue, nothing has been changed. Second, the current keepkey pypl account credentials are not available so this is a problem that needs to be fixed.
@markrypt0 As for the latter: I think it's not much of a problem, another pypi package can be created, or even it's possible to install from github I think it shouldn't be a breaking change anyway but an improvement in speed
BUMP. Can you please just create a new pypi package with latest and with recompiled _pb2.py files? Electron Cash for BCH also would like this else we may drop keepkey support as well.
EDIT: And like @SomberNight said, you can create a new package under a different username on pypi. It's fine.
Technically worst case it is even possible to load from a github tag specified in requirements.txt, but indeed nothing stops from just publishing a package under different name
I have a fork that has implemented these changes. Would love some extra eyes and testers.
I have a fork that has implemented these changes. Would love some extra eyes and testers.
I don't have a keepkey device for testing this properly with Electrum ABC or Electron Cash, but I'm getting an error with a basic import
$ pip install https://github.com/zquestz/python-keepkey/archive/9e4af3c0e349eaaa395091b35a7202066fc820af.tar.gz
$ python
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keepkeylib
>>> from keepkeylib import client
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/client.py", line 37, in <module>
from . import mapping
File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/mapping.py", line 1, in <module>
from . import messages_pb2 as proto
File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/messages_pb2.py", line 25, in <module>
import types_pb2 as types__pb2
ModuleNotFoundError: No module named 'types_pb2'
I have a fork that has implemented these changes. Would love some extra eyes and testers. https://github.com/zquestz/python-keepkey
I don't have a keepkey device for testing this properly with Electrum ABC or Electron Cash, but I'm getting an error with a basic import
$ pip install https://github.com/zquestz/python-keepkey/archive/9e4af3c0e349eaaa395091b35a7202066fc820af.tar.gz $ python Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import keepkeylib >>> from keepkeylib import client Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/client.py", line 37, in <module> from . import mapping File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/mapping.py", line 1, in <module> from . import messages_pb2 as proto File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/messages_pb2.py", line 25, in <module> import types_pb2 as types__pb2 ModuleNotFoundError: No module named 'types_pb2'
Will take a look at this shortly. =)
I have a fork that has implemented these changes. Would love some extra eyes and testers. https://github.com/zquestz/python-keepkey
I don't have a keepkey device for testing this properly with Electrum ABC or Electron Cash, but I'm getting an error with a basic import
$ pip install https://github.com/zquestz/python-keepkey/archive/9e4af3c0e349eaaa395091b35a7202066fc820af.tar.gz $ python Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import keepkeylib >>> from keepkeylib import client Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/client.py", line 37, in <module> from . import mapping File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/mapping.py", line 1, in <module> from . import messages_pb2 as proto File "/home/pierre/.local/lib/python3.10/site-packages/keepkeylib/messages_pb2.py", line 25, in <module> import types_pb2 as types__pb2 ModuleNotFoundError: No module named 'types_pb2'
Pushed a fix. Client now imports correctly, had some issues with Mayachain code and the way the imports were generated.
Python 3.12.5 (main, Aug 9 2024, 08:20:41) [GCC 14.2.1 20240805] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keepkeylib
>>> from keepkeylib import client
>>> client
<module 'keepkeylib.client' from '/home/quest/src/python-keepkey/keepkeylib/client.py'>
Pushed a fix. Client now imports correctly, had some issues with Mayachain code and the way the imports were generated.
OK, my very basic unit test is passing now. Good enough for me, until we find an actual tester with access to a device. Thanks @zquestz!
Unfortunately Google made breaking changes in protobuf (see e.g. here), and hence the current
_pb2.py
generated files in latest release/master of keepkeylib cannot be parsed with new versions of protobuf (4.x).AFAICT protoc >=3.19 generates _pb2 files in the new format, while older protoc generates the old format. AFAICT
related: https://github.com/digitalbitbox/bitbox02-firmware/pull/951
I would suggest