From d86c45edac16e458829b84249fc66f6f412ba089 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 20 Mar 2021 17:17:32 +0100 Subject: [PATCH] dependencies: bump min aiorpcx, and enforce at runtime Note that newer aiorpcx started requiring python 3.8, so we cannot use the latest versions, until we too bump the min python version to 3.8. We should not do that until debian stable ships python 3.8. Also, new aiorpcx introduced some API changes which we will need to adopt, so even if the user locally has recent enough python, we need old aiorpcx atm. related: https://github.com/spesmilo/electrum/issues/7118 --- contrib/requirements/requirements.txt | 2 +- run_electrum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/requirements/requirements.txt b/contrib/requirements/requirements.txt index 8c308dfe2..d6aeb0154 100644 --- a/contrib/requirements/requirements.txt +++ b/contrib/requirements/requirements.txt @@ -1,7 +1,7 @@ qrcode protobuf>=3.12 qdarkstyle<2.9 -aiorpcx>=0.18,<0.19 +aiorpcx>=0.18.7,<0.19 aiohttp>=3.3.0,<4.0.0 aiohttp_socks>=0.3 certifi diff --git a/run_electrum b/run_electrum index 7af9a3c89..034842005 100755 --- a/run_electrum +++ b/run_electrum @@ -63,6 +63,8 @@ def check_imports(): import aiorpcx except ImportError as e: sys.exit(f"Error: {str(e)}. Try 'sudo python3 -m pip install '") + if not ((0, 18, 7) <= aiorpcx._version < (0, 19)): + raise RuntimeError(f'aiorpcX version {aiorpcx._version} does not match required: 0.18.7<=ver<0.19') # the following imports are for pyinstaller from google.protobuf import descriptor from google.protobuf import message