tadd pycryptodomex to requirements - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d493dd19539bea0d2240d8eaad75f8b99e257d53 DIR parent 133e5ec8c3e3ac9602b434986e8aa400d6863e4b HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 28 Nov 2018 11:01:20 +0100 add pycryptodomex to requirements Diffstat: M contrib/requirements/requirements.… | 1 + M electrum/lnonion.py | 8 +------- M electrum/lntransport.py | 9 +-------- M setup.py | 1 - 4 files changed, 3 insertions(+), 16 deletions(-) --- DIR diff --git a/contrib/requirements/requirements.txt b/contrib/requirements/requirements.txt t@@ -10,3 +10,4 @@ aiohttp>=3.3.0 aiohttp_socks certifi bitstring +pycryptodomex>=3.7 DIR diff --git a/electrum/lnonion.py b/electrum/lnonion.py t@@ -23,17 +23,11 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import sys import hashlib from typing import Sequence, List, Tuple, NamedTuple, TYPE_CHECKING from enum import IntEnum, IntFlag +from Cryptodome.Cipher import ChaCha20 -try: - from Cryptodome.Cipher import ChaCha20 -except Exception as e: - print(e) - print("Error: pycryptodomex >= 3.7 not available.") - sys.exit(1) from . import ecc from .crypto import sha256, hmac_oneshot DIR diff --git a/electrum/lntransport.py b/electrum/lntransport.py t@@ -5,16 +5,9 @@ # Derived from https://gist.github.com/AdamISZ/046d05c156aaeb56cc897f85eecb3eb8 -import sys import hashlib from asyncio import StreamReader, StreamWriter - -try: - from Cryptodome.Cipher import ChaCha20_Poly1305 -except Exception as e: - print(e) - print("Error: pycryptodomex >= 3.7 not available.") - sys.exit(1) +from Cryptodome.Cipher import ChaCha20_Poly1305 from .crypto import sha256, hmac_oneshot from .lnutil import (get_ecdh, privkey_to_pubkey, LightningPeerConnectionClosed, DIR diff --git a/setup.py b/setup.py t@@ -52,7 +52,6 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']: extras_require = { 'hardware': requirements_hw, - 'fast': ['pycryptodomex'], 'gui': ['pyqt5'], } extras_require['full'] = [pkg for sublist in list(extras_require.values()) for pkg in sublist]