diff --git a/onekey_client/client.py b/onekey_client/client.py index 26a8a8c..4504a95 100644 --- a/onekey_client/client.py +++ b/onekey_client/client.py @@ -1,13 +1,9 @@ import functools import gc import secrets +from importlib import resources from pathlib import Path -try: - from importlib import resources -except ImportError: - import importlib_resources as resources - import httpx from authlib.jose import jwt from authlib.oidc.core import IDToken diff --git a/onekey_client/queries/utils.py b/onekey_client/queries/utils.py index 0226dee..62c1a73 100644 --- a/onekey_client/queries/utils.py +++ b/onekey_client/queries/utils.py @@ -1,12 +1,8 @@ import functools +from importlib import resources from .. import queries -try: - from importlib import resources -except ImportError: - import importlib_resources as resources - @functools.lru_cache def load_query(query_name) -> str: diff --git a/pyproject.toml b/pyproject.toml index b660eea..eb9fdb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,10 +16,9 @@ classifiers = [ "Topic :: Security", ] dependencies = [ - "httpx==0.28.1", - "pydantic==2.12.5", + "httpx>=0.28.1", + "pydantic>=2.12.5", "Authlib>=1.4.1,<2.0.0", - "importlib-resources>=6.0.0,<7", "click>=8.1.3,<9", "junit-xml>=1.9,<2", ] diff --git a/uv.lock b/uv.lock index e11d810..04f22d8 100644 --- a/uv.lock +++ b/uv.lock @@ -306,18 +306,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, ] -[[package]] -name = "importlib-resources" -version = "6.5.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "zipp", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz", hash = "sha256:185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c", size = 44693, upload-time = "2025-01-03T18:51:56.698Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a4/ed/1f1afb2e9e7f38a545d628f864d562a5ae64fe6f7a10e28ffb9b185b4e89/importlib_resources-6.5.2-py3-none-any.whl", hash = "sha256:789cfdc3ed28c78b67a06acb8126751ced69a3d5f79c095a98298cd8a760ccec", size = 37461, upload-time = "2025-01-03T18:51:54.306Z" }, -] - [[package]] name = "junit-xml" version = "1.9" @@ -339,7 +327,6 @@ dependencies = [ { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "click", version = "8.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "httpx" }, - { name = "importlib-resources" }, { name = "junit-xml" }, { name = "pydantic" }, ] @@ -353,10 +340,9 @@ dev = [ requires-dist = [ { name = "authlib", specifier = ">=1.4.1,<2.0.0" }, { name = "click", specifier = ">=8.1.3,<9" }, - { name = "httpx", specifier = "==0.28.1" }, - { name = "importlib-resources", specifier = ">=6.0.0,<7" }, + { name = "httpx", specifier = ">=0.28.1" }, { name = "junit-xml", specifier = ">=1.9,<2" }, - { name = "pydantic", specifier = "==2.12.5" }, + { name = "pydantic", specifier = ">=2.12.5" }, ] [package.metadata.requires-dev] @@ -572,12 +558,3 @@ sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac wheels = [ { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, ] - -[[package]] -name = "zipp" -version = "3.23.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" }, -]