diff --git a/poetry.lock b/poetry.lock index ee68f0831..34da32890 100644 --- a/poetry.lock +++ b/poetry.lock @@ -104,11 +104,15 @@ unicode_backport = ["unicodedata2"] [[package]] name = "click" -version = "7.1.2" +version = "8.0.4" description = "Composable command line interface toolkit" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "click-default-group" @@ -924,14 +928,6 @@ category = "main" optional = false python-versions = ">=3.6" -[[package]] -name = "types-click" -version = "7.1.8" -description = "Typing stubs for click" -category = "main" -optional = false -python-versions = "*" - [[package]] name = "typing-extensions" version = "4.0.1" @@ -1015,7 +1011,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "5ddd58e2adf63e189b67e69d02d4c7933e002c672fc1eb9d07f8b28bcc30f218" +content-hash = "721210ce2a9fab14d2bf71ea2dc39a7bc6ee228502cf1081b73c5d6c10f28b7d" [metadata.files] astroid = [ @@ -1098,8 +1094,8 @@ charset-normalizer = [ {file = "charset_normalizer-2.0.11-py3-none-any.whl", hash = "sha256:2842d8f5e82a1f6aa437380934d5e1cd4fcf2003b06fed6940769c164a480a45"}, ] click = [ - {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, - {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, + {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, + {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, ] click-default-group = [ {file = "click-default-group-1.2.2.tar.gz", hash = "sha256:d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904"}, @@ -1659,10 +1655,6 @@ typed-ast = [ {file = "typed_ast-1.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:df05aa5b241e2e8045f5f4367a9f6187b09c4cdf8578bb219861c4e27c443db5"}, {file = "typed_ast-1.5.2.tar.gz", hash = "sha256:525a2d4088e70a9f75b08b3f87a51acc9cde640e19cc523c7e41aa355564ae27"}, ] -types-click = [ - {file = "types-click-7.1.8.tar.gz", hash = "sha256:b6604968be6401dc516311ca50708a0a28baa7a0cb840efd7412f0dbbff4e092"}, - {file = "types_click-7.1.8-py3-none-any.whl", hash = "sha256:8cb030a669e2e927461be9827375f83c16b8178c365852c060a34e24871e7e81"}, -] typing-extensions = [ {file = "typing_extensions-4.0.1-py3-none-any.whl", hash = "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"}, {file = "typing_extensions-4.0.1.tar.gz", hash = "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e"}, diff --git a/pyproject.toml b/pyproject.toml index 518a616fc..9d04085f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,6 @@ python-bitcoinlib = "^0.11.0" ## typing typing-extensions = ">=3.7.4" -types-click = "*" ## style isort = "<5" # 5 changes lots of stuff that need to be addressed first: https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/ @@ -51,7 +50,7 @@ demjson3 = "*" graphviz = "*" ## cointool -click = "^7" +click = "^8.0" ed25519 = "^1.4" requests = "^2.19" termcolor = "*" diff --git a/python/requirements-optional.txt b/python/requirements-optional.txt index b406cde0d..77de05af3 100644 --- a/python/requirements-optional.txt +++ b/python/requirements-optional.txt @@ -2,5 +2,4 @@ hidapi >= 0.7.99.post20 web3 >= 4.8 Pillow stellar-sdk>=4.0.0,<6.0.0 -types-click rlp>=1.1.0 ; python_version<'3.7' diff --git a/python/requirements.txt b/python/requirements.txt index 678d3afe9..ec978cb52 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,7 +1,7 @@ ecdsa>=0.9 mnemonic>=0.20 requests>=2.4.0 -click>=7,<9 +click>=7,<8.1 libusb1>=1.6.4 construct>=2.9,!=2.10.55 typing_extensions>=3.10 diff --git a/python/setup.py b/python/setup.py index a364f5de9..69fb8d2e7 100755 --- a/python/setup.py +++ b/python/setup.py @@ -26,7 +26,7 @@ install_requires = [ "ecdsa>=0.9", "mnemonic>=0.20", "requests>=2.4.0", - "click>=7,<9", + "click>=7,<8.1", "libusb1>=1.6.4", "construct>=2.9", "typing_extensions>=3.10", diff --git a/python/src/trezorlib/cli/__init__.py b/python/src/trezorlib/cli/__init__.py index 875cd8097..be6beb1fd 100644 --- a/python/src/trezorlib/cli/__init__.py +++ b/python/src/trezorlib/cli/__init__.py @@ -41,7 +41,7 @@ if TYPE_CHECKING: class ChoiceType(click.Choice): def __init__(self, typemap: Dict[str, Any]) -> None: - super().__init__(typemap.keys()) + super().__init__(list(typemap.keys())) self.typemap = typemap def convert(self, value: str, param: Any, ctx: click.Context) -> Any: