FS#78821 - no trezor connect with electrum 4.4.4 / python 3.11

Attached to Project: Arch Linux
Opened by Louis Holbrook (lash) - Sunday, 18 June 2023, 11:20 GMT
Last edited by Toolybird (Toolybird) - Sunday, 18 June 2023, 22:35 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Trezor hardware wallet connectivity has stopped working after python 3.11.

I am using python "trezor" package, the error message is:

Library version for 'trezor' is incompatible. Installed: 0.13.7, Needed: 0.13.0 <= x < 0.14

Since the executable script in /usr/bin/electrum uses /usr/bin/python3 explicitly, I cannot enter a virtualenv to use it.

I've downloaded and unpacked the electrum 4.4.4 source separately and verified that I can run and connect with hardware wallet using a 3.11 virtualenv.

The pip freeze for that env is:

certifi==2023.5.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
construct==2.10.68
construct-classes==0.1.2
cryptography==41.0.1
ecdsa==0.18.0
idna==3.4
libusb1==3.0.0
mnemonic==0.20
pycparser==2.21
PyQt5==5.15.9
PyQt5-Qt5==5.15.2
PyQt5-sip==12.12.1
requests==2.31.0
simple-rlp==0.1.3
six==1.16.0
trezor==0.13.3
typing_extensions==4.6.3
urllib3==2.0.3
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 18 June 2023, 22:35 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Louis Holbrook (lash) - Sunday, 18 June 2023, 11:41 GMT
Possibly consider shebang #!/usr/bin/env python3 - that would make it work with virtualenv when needed
Comment by Toolybird (Toolybird) - Sunday, 18 June 2023, 22:35 GMT
> stopped working after python 3.11

You probably mean 3.11.3-2. i.e. 3.11.3-1 was likely fine. Please see  FS#78413  and read up on PEP 668 to see what changed.

> I am using python "trezor" package

AUR pkgs are not supported here.

> shebang #!/usr/bin/env python3

There is nothing in the Arch Packaging Guidelines mandating this.

> Installed: 0.13.7, Needed: 0.13.0 <= x < 0.14

Makes no sense. I'm guessing something is wrong with your python environment. Anyway, I just built all this inside a fresh VM and could not repro i.e. trezorctl runs fine (but I don't have any hardware devices to test for real).

Loading...