1
0
Commit Graph

147 Commits

Author SHA1 Message Date
SomberNight
269a240fb9 build: partial rerun freeze_packages
update electrum-aionostr, aiorpcx, and aiohttp (and friends)
2025-04-01 16:59:22 +00:00
SomberNight
245853ff4f plugins: ledger: bump max supported ledger_bitcoin version
ledger-bitcoin 0.4 was just released (seemingly without breaking changes)
the changelog claims they want to uphold semver
2025-03-19 17:29:40 +00:00
ThomasV
0266832650 bump min version of electrum_aionostr and its dependencies 2025-03-19 16:21:09 +01:00
SomberNight
154adf0081 plugins: ledger: rm support for hw.1
This removes support for Ledger HW.1 and "Nano" (non-S) devices.
These were manufactured/sold around 2015-2016, and are long unsupported by the upstream vendor.

We previously added a deprecation warning to the GUI [0] released in 4.3.3 (2023-01-02), to warn owners of these devices.
This PR now fully removes support.

As a consequence, the unmaintained btchip-python dependency can now be removed, which solves [1].

[0]: 9b82eb6d06
[1]: https://github.com/spesmilo/electrum/issues/9370#issuecomment-2593675364
2025-03-18 16:18:49 +00:00
SomberNight
822ab5d73c requirements: follow-up prev: rm protobuf upper bound
now that the keepkey pb2's are regenerated using the "new" format,
we don't need an old python3-protobuf to parse them

ref https://github.com/spesmilo/electrum/issues/7922
2025-03-17 17:53:51 +00:00
SomberNight
c8143957a6 plugins: keepkey: rm dependence on external keepkeylib
we will instead bundle our own fork, as a git submodule,
https://github.com/spesmilo/electrum-keepkeylib

related https://github.com/spesmilo/electrum/issues/7922
and https://github.com/keepkey/python-keepkey/issues/146
(i.e. upstream keepkeylib is unmaintained)
2025-03-17 17:53:48 +00:00
SomberNight
40842fad39 requirements: bump electrum-ecc and electrum-aionostr
note: these sdists are now reproducibly built.
Ideally the person updating the pinned hash should be different from the one who uploaded the dep to PyPI and reproduce and verify the hash. This prevents hiding a backdoor in just the sdist uploaded to PyPI.

but people can try to reproduce the PyPI sdists at any time and ring alarm bells if they can't
2025-02-04 17:00:21 +00:00
f321x
171aa5ee5a bump aiorpcx version 2025-01-20 12:11:55 +01:00
ThomasV
7fdf1e0669 add nostr, and nostr_relays in config 2024-11-12 08:52:42 +01:00
SomberNight
225ed079a9 hw plugins: ledger: bump pinned lib to 0.3.0, raise max_lib to <0.4
closes https://github.com/spesmilo/electrum/issues/9035
2024-10-11 15:13:34 +00:00
ThomasV
3721f04ac8 replace electrum/ecc with electrum_ecc package 2024-10-10 15:46:00 +00:00
SomberNight
1ee6361c7e qt gui: qt6 migration follow-ups 2024-09-18 15:48:50 +00:00
SomberNight
cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
SomberNight
cf2ed509b4 dependencies: remove bitstring
- `bitstring` started depending on `bitarray` in version 4.1 [0]
  - that would mean one additional dependency for us (from yet another maintainer), which is not even pure python
- we only use bitstring for bolt11-parsing
- hence this PR rewrites the bolt11-parsing and removes `bitstring` as dependency
- note: I benchmarked lndecode using [1], and the new code performs better,
  taking around 80% time needed for old code (when using bitstring 3.1.9, pure python).
  Though the variance is quite large in both cases.

[0]: 95ee533ee4/release_notes.txt (L108)
[1]: d7597d96d0
2024-04-24 14:14:31 +00:00
Jamie C. Driver
17508086aa jade: update Jade api to 1.0.29
Updates cbor dependency to cbor2, required for modern linux/python
versions.
2024-04-15 12:10:06 +01:00
SomberNight
5f95d919df requirements: bump pinned (and max) aiorpcx versions to 0.23.1
related https://github.com/spesmilo/electrum/issues/8954
2024-04-08 16:44:59 +00:00
SomberNight
d7b0260534 requirements: bump min aiohttp-socks to 0.8.4
This version has the bugfix for https://github.com/romis2012/aiohttp-socks/issues/27

see 80e330d365
2024-02-21 16:17:45 +00:00
ThomasV
7ca89f56ee partial-writes using jsonpatch
- partial writes are append only.

 - StoredDict objects will append partial writes to the wallet
   file when items are added, replaced, removed.

 - Lists in the wallet file that have not been registered
   as StoredObject are converted to StoredList, which
   overloads append() and remove(). Those methods too will
   append partial writes to the wallet file.

 - Unlike the old jsonpatch branch, this branch does not support
   file encryption. Encrypted files always fully rewritten, even
   if the change before encryption is a partial write.
2023-09-24 12:24:09 +02:00
SomberNight
4e6e6f76ca invoices: also run amount-validator on setter
- @amount_msat.validator prevents the creation of invoices with e.g. too large amounts
- however the qml gui is mutating invoices by directly setting the `amount_msat` field,
  and it looks like attrs validators only run during init.
  We can use `on_setattr` (introduced in attrs==20.1.0).
- a wallet db upgrade is added to rm existing insane invoices
- btw the qml gui was already doing its own input validation on the textedit
  (see qeconfig.btcAmountRegex). however that only limits the input to not have more
  chars than what is needed to represent 21M BTC (e.g. you can still enter 99M BTC,
  which the invoice logic does not tolerate later on - but is normally caught).

fixes https://github.com/spesmilo/electrum/issues/8582
2023-08-22 18:10:21 +00:00
SomberNight
2557474449 (trivial) fix typo in requirements-hw.txt
follow-up 9ea5193329
2023-08-10 18:06:59 +00:00
SomberNight
9ea5193329 requirements-hw: pin ledger-bitcoin to "<0.2.2"
ledger-bitcoin==0.2.2 added new deps we don't want to bundle. otherwise it should be ok to use.
see https://github.com/LedgerHQ/app-bitcoin-new/issues/192
2023-08-10 15:40:46 +00:00
ghost43
2f769d4015 Merge pull request #8459 from benma/bitbox02-6.2.0
bitbox02: update to 6.2.0 to fix a bug on macOS 13.3, and ability to display amount in sats on the device
2023-05-30 23:35:52 +00:00
SomberNight
1b9cb47623 dependencies: rm upper limit for hidapi
Was added in 752b37a03b,
due to upstream issue https://github.com/trezor/cython-hidapi/issues/142,
which should now be fixed in 0.14.0.
2023-05-30 22:51:06 +00:00
Marko Bencun
7164f9fd6e bitbox02: update to 6.2.0
6.2.0 was released to put a minimum requirement on hidapi 0.14.0,
which includes the fix for this issue:

https://github.com/libusb/hidapi/issues/531

That bug caused hidapi on macOS 13.3 to report 0 as the interface
number for all hid devices, which led to the bitbox02 multi edition being listed
twice instead of once - once for the main HW wallet interface and once erroneously
For the U2F interface (which should not be listed).
2023-05-30 23:55:52 +02:00
SomberNight
3020499199 hww: ledger: bump required ledger-bitcoin and adapt to API change 2023-05-05 15:02:34 +00:00
SomberNight
4f9469b789 re-generate protobuf _pb2.py files and bump min required protobuf
upper bound "<4" still needed due to keepkey...

related https://github.com/spesmilo/electrum/issues/7922
2023-01-28 00:39:36 +00:00
SomberNight
9f3a39e9c9 requirements-hw: add comments to tie deps to hwd plugins 2022-11-10 16:03:34 +00:00
SomberNight
9b82eb6d06 ledger: re-add support for HW.1, and add a deprecation warning 2022-11-09 20:42:55 +00:00
Salvatore Ingala
8a3fed9bc9 Remove btchip; use ranged version for ledger_bitcoin 2022-11-08 17:44:07 +01:00
Salvatore Ingala
2d64dc13c9 Modify Ledger plugin to support the new bitcoin app v2.1.0 2022-11-08 17:44:05 +01:00
SomberNight
590abec339 build requirements: colorama grew a new build-time dependency :/
or more like four:
```
$ pipdeptree
hatchling==1.11.1
  - editables [required: >=0.3, installed: 0.3]
  - packaging [required: >=21.3, installed: 21.3]
    - pyparsing [required: >=2.0.2,!=3.0.5, installed: 3.0.9]
  - pathspec [required: >=0.10.1, installed: 0.10.1]
  - pluggy [required: >=1.0.0, installed: 1.0.0]
  - tomli [required: >=1.2.2, installed: 2.0.1]
```

Let's monitor how the situation evolves, and whether other packages start requiring hatchling,
but for now I am not going to add four new packages into the trusted base set...
Pinning colorama to an older version for now.

related:
https://github.com/tartley/colorama/pull/338
https://github.com/tartley/colorama/issues/349
2022-11-05 14:41:39 +00:00
SomberNight
ee8a20f7b6 CI: rename requirements-travis.txt 2022-11-04 00:48:21 +00:00
SomberNight
a99c8cca1e requirements-build-android: update deps for buildozer
virtualenv does not seem to be needed given python3-venv

upstream ref: https://github.com/kivy/buildozer/pull/1515
2022-10-14 17:59:14 +00:00
SomberNight
bba1bce833 requirements-build-android: update deps for python-for-android
`six` no longer required:
1f62452375

`pep517` version bound was relaxed:
25f3a534d8
2022-10-14 16:51:11 +00:00
SomberNight
5f83538f05 requirements: pin protobuf "<4" also in "req..-hw.txt"
related:
52b73880f9
https://github.com/spesmilo/electrum/issues/7922
2022-10-14 16:18:55 +00:00
SomberNight
1789778673 android build: p4a to build pyqt5 using "hostpython" instead of sys py
The current system python in the docker baseimage is py3.9, while the
targetpython and hostpython built by p4a are py3.8, and this was causing
linker issues in the pyqt5 build.
It is also cleaner IMHO to have p4a handle what is needed for a recipe
instead of assuming it is available in the system. (and I think this is
how other existing recipes work)

fixes https://github.com/spesmilo/electrum/issues/8016
2022-10-14 15:52:33 +00:00
SomberNight
752b37a03b dependencies: bundle older hidapi in binaries
closes https://github.com/spesmilo/electrum/issues/7738
2022-08-04 21:47:50 +02:00
SomberNight
52b73880f9 requirements: pin protobuf "<4"
protobuf 4.x introduced breaking changes compared to 3.20.
To adapt, we would have to regenerate paymentrequest_pb2.py, using protoc>=3.19.0, however ubuntu does not have new enough protoc.
Also, unsure if newly generated paymentrequest_pb2.py would be supported by older versions of protobuf.
Best to just wait for things to settle.

```
electrum/__init__.py:20: in <module>
    from .wallet import Wallet
electrum/wallet.py:70: in <module>
    from . import transaction, bitcoin, coinchooser, paymentrequest, ecc, bip32
electrum/paymentrequest.py:37: in <module>
    from . import paymentrequest_pb2 as pb2
electrum/paymentrequest_pb2.py:36: in <module>
    _descriptor.FieldDescriptor(
.tox/py3/lib/python3.9/site-packages/google/protobuf/descriptor.py:560: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot not be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E   More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```

ceaae1b6a3/CHANGES.txt (L47)
2022-05-27 18:38:26 +02:00
Jamie C. Driver
15f108aaa5 Add support for the Blockstream Jade hww 2022-05-20 16:03:46 +01:00
SomberNight
3bae7dfd90 mac build: git clone pyinstaller to allow using custom commits
This allows more freedom than using releases from PyPI.
(atm there is no released version that fixes https://github.com/pyinstaller/pyinstaller/pull/6701 )
Also, we now build the pyinstaller bootloader, just like in the windows build:
one fewer binary blob to trust.
2022-04-06 21:01:11 +02:00
SomberNight
98d32f41d5 build: (reproducibility) always uses "pip install" with "--no-build-isolation"
fixes https://github.com/spesmilo/electrum/issues/7737
fixes https://github.com/spesmilo/electrum/issues/7736
related 8559d1eb72
2022-03-26 02:45:47 +01:00
SomberNight
b5951adc29 win build: update pyinstaller (from around 4.2 to around 4.10)
see https://github.com/spesmilo/electrum/pull/7721#issuecomment-1072669548

-----

pyinstaller 4.2 failed (during its runtime) to create exes (worked with cpython 3.9.10, but not with cpython 3.9.11):
```
80572 INFO: Processing module hooks...
80573 INFO: Loading module hook 'hook-certifi.py' from 'C:\\python3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
80618 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\python3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82879 INFO: Loading module hook 'hook-dns.rdata.py' from 'C:\\python3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84147 INFO: Loading module hook 'hook-mnemonic.py' from 'C:\\python3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84207 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\python3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84212 INFO: Loading module hook 'hook-usb1.py' from 'C:\\python3\\lib\\site-packages\\usb1\\__pyinstaller'...
84215 INFO: --- libusb1 pyinstaller hook ---
84226 INFO: Added libusb binaries: [('C:\\python3\\lib\\site-packages\\usb1\\libusb-1.0.dll', 'usb1')]
84228 INFO: Loading module hook 'hook-difflib.py' from 'C:\\python3\\lib\\site-packages\\PyInstaller\\hooks'...
84237 INFO: Excluding import of doctest from module difflib
84237 INFO: Loading module hook 'hook-distutils.py' from 'C:\\python3\\lib\\site-packages\\PyInstaller\\hooks'...
Unable to find "C:\python3\Include\pyconfig.h" when adding binary and data files.This would mean your Python installation doesn't
come with proper library files. This usually happens by missing development
package, or unsuitable build parameters of Python installation.
* On Debian/Ubuntu, you would need to install Python development packages
  * apt-get install python3-dev
  * apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with
`--enable-shared` (or, `--enable-framework` on Darwin)

🗯 ERROR: build-electrum-git failed
```

Looks like this might be fixed in pyinstaller 4.3 (we are using 4.2):
https://github.com/pyinstaller/pyinstaller/pull/5218

-----

While trying to update pyinstaller to have that fix, several issues found with versions 4.3-4.10,
now reported upstream and already fixed:
https://github.com/pyinstaller/pyinstaller/issues/6338
https://github.com/pyinstaller/pyinstaller/issues/6339
https://github.com/pyinstaller/pyinstaller/issues/6686

So the pyinstaller commit pinned here is from the stable "v4" branch, some commits after the 4.10 tag,
which has fixes for the above issues.
2022-03-20 17:28:11 +01:00
SomberNight
1c297d6049 android build: add Qt/QML build-time dependencies
related 78b51b3f43 (r826140909)
2022-03-14 21:36:27 +01:00
ghost43
8acda5f48d Merge pull request #7693 from benma/bb02
bitbox02: bump dependency to v6.0.0, support sending to taproot
2022-03-02 13:29:24 +00:00
Marko Bencun
01b4b35f9f bitbox02: bump dependency to v6.0.0, support sending to taproot 2022-03-02 14:14:24 +01:00
SomberNight
c9c094cfab requirements: bump min aiorpcx to 0.22.0
aiorpcx 0.20 changed the behaviour/API of TaskGroups.
When used as a context manager, TaskGroups no longer propagate
exceptions raised by their tasks. Instead, the calling code has
to explicitly check the results of tasks and decide whether to re-raise
any exceptions.
This is a significant change, and so this commit introduces "OldTaskGroup",
which should behave as the TaskGroup class of old aiorpcx. All existing
usages of TaskGroup are replaced with OldTaskGroup.

closes https://github.com/spesmilo/electrum/issues/7446
2022-02-15 18:22:44 +01:00
SomberNight
a3e1d2e25e follow-up prev
there must be a better way of doing this...
we should somehow automate figuring out the build-time dependencies of requirements.txt
2022-01-22 17:49:20 +01:00
SomberNight
8559d1eb72 build: android reprod: "pip install" needs "--no-build-isolation"
maybe fixes https://github.com/spesmilo/electrum/issues/7640

Looks like by default pip is ignoring the locally available setuptools and wheel,
and downloading the latest ones from the internet at build time...

https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/?highlight=no-build-isolation#disabling-build-isolation
https://stackoverflow.com/a/62889268

> When making build requirements available, pip does so in an isolated environment. That is, pip does not install those requirements into the user’s site-packages, but rather installs them in a temporary directory which it adds to the user’s sys.path for the duration of the build. This ensures that build requirements are handled independently of the user’s runtime environment. For example, a project that needs a recent version of setuptools to build can still be installed, even if the user has an older version installed (and without silently replacing that version).
>
> In certain cases, projects (or redistributors) may have workflows that explicitly manage the build environment. For such workflows, build isolation can be problematic. If this is the case, pip provides a --no-build-isolation flag to disable build isolation. Users supplying this flag are responsible for ensuring the build environment is managed appropriately (including ensuring that all required build dependencies are installed).

If only it were that easy!
If we add the "--no-build-isolation" flag, it becomes our responsibility to install *all* build time deps,
hence we now have "requirements-build-makepackages.txt".
2022-01-22 14:49:35 +01:00
SomberNight
1ad30e86b6 build: relax qdarkstyle version bound
Historically, there have often been (visual) issues with new versions of qdarkstyle.
The upper bound restriction was mainly there for this reason: to ~force manually testing new versions.
There is no known issue with newer versions atm.

Remove the upper bound, as there have not been issues with newer versions recently,
and this makes it clear to e.g. packagers that it's fine to use newer versions.

Add a lower bound for a version that has been tested in the past and is known to work ok.

related https://github.com/spesmilo/electrum/issues/7361
2022-01-20 15:09:12 +01:00
SomberNight
d9b55ae5c8 build: relax dnspython version bound
The <2.1 pin had been put there as dnspython 2.1 added "poetry" as a build time dep,
which pulled in a significant number of transitive dependencies, and it was also
causing issues with our appimage build.

dnspython 2.2.0 was released since, which no longer needs full poetry, only "poetry-core":
da279dec7e

related https://github.com/spesmilo/electrum/issues/7361
2022-01-20 15:09:08 +01:00