使用asyncio.to_thread()执行更新

This commit is contained in:
KimigaiiWuyi 2024-10-05 20:06:15 +08:00
parent aa52033cd8
commit 3eb0243db3
12 changed files with 987 additions and 1805 deletions

View File

@ -1 +0,0 @@
{}

View File

@ -39,7 +39,7 @@ plugins_sample = {
'prefix': [],
'force_prefix': [],
'disable_force_prefix': False,
'allow_empty_prefix': None,
'allow_empty_prefix': False,
'sv': {},
}

View File

@ -25,7 +25,7 @@ async def update_core_at_night():
async def update_all_plugins_at_night():
if config.get_config('AutoUpdatePlugins').data:
logger.info('[Core自动任务] 开始更新 [插件目录]')
update_all_plugins()
await update_all_plugins()
# 自动更新插件列表

View File

@ -1,13 +1,13 @@
from typing import List
from gsuid_core.utils.plugins_update._plugins import update_from_git
from gsuid_core.utils.plugins_update._plugins import update_from_git_in_tread
from gsuid_core.plugins.core_command.core_restart.restart import (
restart_genshinuid,
)
async def update_core() -> List[str]:
return update_from_git()
return await update_from_git_in_tread()
async def restart_core():

View File

@ -1,3 +1,5 @@
import asyncio
from gsuid_core.sv import SV
from gsuid_core.bot import Bot
from gsuid_core.models import Event
@ -6,9 +8,9 @@ from gsuid_core.utils.plugins_config.gs_config import core_plugins_config
from gsuid_core.utils.plugins_update._plugins import (
run_install,
check_retcode,
update_from_git,
update_all_plugins,
set_proxy_all_plugins,
update_from_git_in_tread,
)
sv_core_config = SV('Core管理', pm=0)
@ -21,7 +23,7 @@ async def send_core_update_msg(bot: Bot, ev: Event):
level = 1
else:
level = 0
log_list = update_from_git(level)
log_list = await update_from_git_in_tread(level)
await bot.send(log_list)
@ -54,7 +56,7 @@ async def send_core_update_proxy(bot: Bot, ev: Event):
@sv_core_config.on_fullmatch(('core更新依赖'))
async def send_core_poetry_install(bot: Bot, ev: Event):
logger.info('开始执行[更新] 早柚核心依赖')
retcode = await run_install()
retcode = await asyncio.to_thread(run_install)
im = check_retcode(retcode)
await bot.send(im)
@ -78,6 +80,6 @@ async def send_core_all_update_msg(bot: Bot, ev: Event):
else:
level = 0
log_list = update_from_git(min(level, 1))
log_list.extend(update_all_plugins(level))
log_list = await update_from_git_in_tread(min(level, 1))
log_list.extend(await update_all_plugins(level))
await bot.send(log_list)

View File

@ -75,5 +75,5 @@ async def send_update_msg(bot: Bot, ev: Event):
level = 1
else:
level = 0
_list = update_plugins(ev.text, level)
_list = await update_plugins(ev.text, level)
await bot.send(_list)

View File

@ -71,7 +71,7 @@ async def uninstall_plugin(path: Path):
# 传入一个path对象
async def run_install(path: Optional[Path] = None) -> int:
def run_install(path: Optional[Path] = None) -> int:
tools = check_start_tool()
if tools == 'pip':
logger.warning('你使用的是PIP环境, 无需进行 PDM/Poetry install!')
@ -88,26 +88,23 @@ async def run_install(path: Optional[Path] = None) -> int:
env = os.environ.copy()
env["PYTHONIOENCODING"] = "utf8"
proc = await asyncio.create_subprocess_shell(
proc = subprocess.run(
f'{tools} install',
cwd=path,
stdout=asyncio.subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True,
env=env,
encoding='utf-8',
text=True,
)
# stdout, stderr = await proc.communicate()
output = ''
if proc.stdout:
while True:
data = await proc.stdout.readline()
if not data:
break
line = data.decode()
await proc.wait()
output += line
output = proc.stdout # 获取输出
error = proc.stderr # 获取错误信息
logger.info(output)
if error:
logger.error(error)
retcode = -1 if proc.returncode is None else proc.returncode
if 'No dependencies to install or update' in output:
@ -124,11 +121,11 @@ def check_retcode(retcode: int) -> str:
return f'更新失败, 错误码{retcode}'
def update_all_plugins(level: int = 0) -> List[str]:
async def update_all_plugins(level: int = 0) -> List[str]:
log_list = []
for plugin in PLUGINS_PATH.iterdir():
if _is_plugin(plugin):
log_list.extend(update_from_git(level, plugin))
log_list.extend(await update_from_git_in_tread(level, plugin))
return log_list
@ -382,6 +379,18 @@ def sync_get_plugin_url(repo: Path) -> Optional[str]:
return None
async def update_from_git_in_tread(
level: int = 0,
repo_like: Union[str, Path, None] = None,
log_key: List[str] = [],
log_limit: int = 5,
):
result = await asyncio.to_thread(
update_from_git, level, repo_like, log_key, log_limit
)
return result
def update_from_git(
level: int = 0,
repo_like: Union[str, Path, None] = None,
@ -393,7 +402,7 @@ def update_from_git(
repo = Repo(CORE_PATH)
plugin_name = '早柚核心'
if is_install_dep:
asyncio.create_task(run_install(CORE_PATH))
run_install(CORE_PATH)
elif isinstance(repo_like, Path):
repo = Repo(repo_like)
plugin_name = repo_like.name
@ -419,11 +428,18 @@ def update_from_git(
# 先执行git fetch
logger.info(f'[更新][{plugin_name}] 正在执行 git fetch')
o.fetch()
try:
default_branch_ref = repo.git.symbolic_ref('refs/remotes/origin/HEAD')
default_branch = default_branch_ref.split('/')[-1] # 提取主分支名称
o.fetch()
except GitCommandError as e:
logger.warning(f'[更新] 执行 git fetch 失败...{e}!')
return [
f'更新插件 {plugin_name} 中...',
'执行 git fetch 失败, 请检查控制台...',
]
try:
default_branch = repo.git.branch('--show-current')
commits_diff = list(
repo.iter_commits(f'HEAD..origin/{default_branch}')
@ -477,7 +493,7 @@ def update_from_git(
return log_list
def update_plugins(
async def update_plugins(
plugin_name: str,
level: int = 0,
log_key: List[str] = [],
@ -492,5 +508,8 @@ def update_plugins(
plugin_name = _name
break
log_list = update_from_git(level, plugin_name, log_key, log_limit)
log_list = await update_from_git_in_tread(
level, plugin_name, log_key, log_limit
)
return log_list
return log_list

View File

@ -287,7 +287,7 @@ async def _update_plugins(request: Request, data: Dict):
if repo:
if check_can_update(repo):
try:
update_plugins(data['label'])
await update_plugins(data['label'])
retcode = 0
except: # noqa:E722
retcode = -1

133
pdm.lock generated
View File

@ -4,11 +4,8 @@
[metadata]
groups = ["default"]
strategy = []
lock_version = "4.5.0"
content_hash = "sha256:bad742ff71422ba3ceb1197a90d5c40d9c89fe6c345ac9f1a7132e3d0e1472a3"
[[metadata.targets]]
requires_python = ">=3.8.1,<4.0"
lock_version = "4.4.1"
content_hash = "sha256:30a31a242df88ca0fb90dc8afd79b1294bb76d9ab35be17115802542ba29eba8"
[[package]]
name = "aioboto3"
@ -71,7 +68,6 @@ requires_python = ">=3.8"
summary = "Async http client/server framework (asyncio)"
dependencies = [
"aiosignal>=1.1.2",
"async-timeout<5.0,>=4.0; python_version < \"3.11\"",
"attrs>=17.3.0",
"frozenlist>=1.1.1",
"multidict<7.0,>=4.5",
@ -161,9 +157,6 @@ name = "aioitertools"
version = "0.11.0"
requires_python = ">=3.6"
summary = "itertools and builtins for AsyncIO and mixed iterables"
dependencies = [
"typing-extensions>=4.0; python_version < \"3.10\"",
]
files = [
{file = "aioitertools-0.11.0-py3-none-any.whl", hash = "sha256:04b95e3dab25b449def24d7df809411c10e62aab0cbe31a50ca4e68748c43394"},
{file = "aioitertools-0.11.0.tar.gz", hash = "sha256:42c68b8dd3a69c2bf7f2233bf7df4bb58b557bca5252ac02ed5187bbc67d6831"},
@ -187,9 +180,6 @@ name = "aiosqlite"
version = "0.19.0"
requires_python = ">=3.7"
summary = "asyncio bridge to the standard sqlite3 module"
dependencies = [
"typing-extensions>=4.0; python_version < \"3.8\"",
]
files = [
{file = "aiosqlite-0.19.0-py3-none-any.whl", hash = "sha256:edba222e03453e094a3ce605db1b970c4b3376264e56f32e2a4959f948d66a96"},
{file = "aiosqlite-0.19.0.tar.gz", hash = "sha256:95ee77b91c8d2808bd08a59fbebf66270e9090c3d92ffbf260dc0db0b979577d"},
@ -200,9 +190,6 @@ name = "annotated-types"
version = "0.7.0"
requires_python = ">=3.8"
summary = "Reusable constraint types to use with typing.Annotated"
dependencies = [
"typing-extensions>=4.0.0; python_version < \"3.9\"",
]
files = [
{file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"},
{file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"},
@ -214,10 +201,8 @@ version = "4.2.0"
requires_python = ">=3.8"
summary = "High level compatibility layer for multiple asynchronous event loop implementations"
dependencies = [
"exceptiongroup>=1.0.2; python_version < \"3.11\"",
"idna>=2.8",
"sniffio>=1.1",
"typing-extensions>=4.1; python_version < \"3.11\"",
]
files = [
{file = "anyio-4.2.0-py3-none-any.whl", hash = "sha256:745843b39e829e108e518c489b31dc757de7d2131d53fac32bd8df268227bfee"},
@ -230,7 +215,6 @@ version = "3.10.4"
requires_python = ">=3.6"
summary = "In-process task scheduler with Cron-like capabilities"
dependencies = [
"importlib-metadata>=3.6.0; python_version < \"3.8\"",
"pytz",
"six>=1.4.0",
"tzlocal!=3.*,>=2.0",
@ -245,9 +229,6 @@ name = "async-timeout"
version = "4.0.3"
requires_python = ">=3.7"
summary = "Timeout context manager for asyncio programs"
dependencies = [
"typing-extensions>=3.6.5; python_version < \"3.8\"",
]
files = [
{file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"},
{file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"},
@ -258,31 +239,11 @@ name = "attrs"
version = "23.2.0"
requires_python = ">=3.7"
summary = "Classes Without Boilerplate"
dependencies = [
"importlib-metadata; python_version < \"3.8\"",
]
files = [
{file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"},
{file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"},
]
[[package]]
name = "backports-zoneinfo"
version = "0.2.1"
requires_python = ">=3.6"
summary = "Backport of the standard library zoneinfo module"
dependencies = [
"importlib-resources; python_version < \"3.7\"",
]
files = [
{file = "backports.zoneinfo-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:8961c0f32cd0336fb8e8ead11a1f8cd99ec07145ec2931122faaac1c8f7fd987"},
{file = "backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e81b76cace8eda1fca50e345242ba977f9be6ae3945af8d46326d776b4cf78d1"},
{file = "backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7b0a64cda4145548fed9efc10322770f929b944ce5cee6c0dfe0c87bf4c0c8c9"},
{file = "backports.zoneinfo-0.2.1-cp38-cp38-win32.whl", hash = "sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328"},
{file = "backports.zoneinfo-0.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:4a0f800587060bf8880f954dbef70de6c11bbe59c673c3d818921f042f9954a6"},
{file = "backports.zoneinfo-0.2.1.tar.gz", hash = "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2"},
]
[[package]]
name = "bcrypt"
version = "4.0.1"
@ -348,7 +309,6 @@ summary = "Low-level, data-driven core of boto 3."
dependencies = [
"jmespath<2.0.0,>=0.7.1",
"python-dateutil<3.0.0,>=2.1",
"urllib3<1.27,>=1.25.4; python_version < \"3.10\"",
"urllib3<2.1,>=1.25.4; python_version >= \"3.10\"",
]
files = [
@ -386,7 +346,6 @@ requires_python = ">=3.7"
summary = "Composable command line interface toolkit"
dependencies = [
"colorama; platform_system == \"Windows\"",
"importlib-metadata; python_version < \"3.8\"",
]
files = [
{file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
@ -427,16 +386,6 @@ files = [
{file = "email_validator-2.2.0.tar.gz", hash = "sha256:cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7"},
]
[[package]]
name = "exceptiongroup"
version = "1.2.0"
requires_python = ">=3.7"
summary = "Backport of PEP 654 (exception groups)"
files = [
{file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"},
{file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"},
]
[[package]]
name = "fastapi"
version = "0.109.2"
@ -591,7 +540,6 @@ requires_python = ">=3.7"
summary = "GitPython is a Python library used to interact with Git repositories"
dependencies = [
"gitdb<5,>=4.0.1",
"typing-extensions>=3.7.4.3; python_version < \"3.8\"",
]
files = [
{file = "GitPython-3.1.41-py3-none-any.whl", hash = "sha256:c36b6634d069b3f719610175020a9aed919421c87552185b085e04fbbdb10b7c"},
@ -659,9 +607,6 @@ name = "h11"
version = "0.14.0"
requires_python = ">=3.7"
summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
dependencies = [
"typing-extensions; python_version < \"3.8\"",
]
files = [
{file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
{file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
@ -737,7 +682,6 @@ version = "0.7.2"
requires_python = ">=3.5"
summary = "Python logging made (stupidly) simple"
dependencies = [
"aiocontextvars>=0.2.0; python_version < \"3.7\"",
"colorama>=0.3.4; sys_platform == \"win32\"",
"win32-setctime>=1.0.0; sys_platform == \"win32\"",
]
@ -1119,7 +1063,6 @@ summary = "Data validation using Python type hints"
dependencies = [
"annotated-types>=0.4.0",
"pydantic-core==2.20.1",
"typing-extensions>=4.12.2; python_version >= \"3.13\"",
"typing-extensions>=4.6.1; python_version < \"3.13\"",
]
files = [
@ -1477,7 +1420,6 @@ requires_python = ">=3.7"
summary = "Database Abstraction Library"
dependencies = [
"greenlet!=0.4.17; platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\"",
"importlib-metadata; python_version < \"3.8\"",
"typing-extensions>=4.6.0",
]
files = [
@ -1559,7 +1501,6 @@ requires_python = ">=3.8"
summary = "The little ASGI library that shines."
dependencies = [
"anyio<5,>=3.4.0",
"typing-extensions>=3.10.0; python_version < \"3.10\"",
]
files = [
{file = "starlette-0.36.3-py3-none-any.whl", hash = "sha256:13d429aa93a61dc40bf503e8c801db1f1bca3dc706b10ef2434a36123568f044"},
@ -1602,7 +1543,6 @@ version = "5.2"
requires_python = ">=3.8"
summary = "tzinfo object for the local timezone"
dependencies = [
"backports-zoneinfo; python_version < \"3.9\"",
"tzdata; platform_system == \"Windows\"",
]
files = [
@ -1628,7 +1568,6 @@ summary = "The lightning-fast ASGI server."
dependencies = [
"click>=7.0",
"h11>=0.8",
"typing-extensions>=4.0; python_version < \"3.11\"",
]
files = [
{file = "uvicorn-0.27.0.post1-py3-none-any.whl", hash = "sha256:4b85ba02b8a20429b9b205d015cbeb788a12da527f731811b643fd739ef90d5f"},
@ -1637,70 +1576,13 @@ files = [
[[package]]
name = "websockets"
version = "10.4"
requires_python = ">=3.7"
version = "13.1"
requires_python = ">=3.8"
summary = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)"
files = [
{file = "websockets-10.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d58804e996d7d2307173d56c297cf7bc132c52df27a3efaac5e8d43e36c21c48"},
{file = "websockets-10.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc0b82d728fe21a0d03e65f81980abbbcb13b5387f733a1a870672c5be26edab"},
{file = "websockets-10.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ba089c499e1f4155d2a3c2a05d2878a3428cf321c848f2b5a45ce55f0d7d310c"},
{file = "websockets-10.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33d69ca7612f0ddff3316b0c7b33ca180d464ecac2d115805c044bf0a3b0d032"},
{file = "websockets-10.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62e627f6b6d4aed919a2052efc408da7a545c606268d5ab5bfab4432734b82b4"},
{file = "websockets-10.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38ea7b82bfcae927eeffc55d2ffa31665dc7fec7b8dc654506b8e5a518eb4d50"},
{file = "websockets-10.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e0cb5cc6ece6ffa75baccfd5c02cffe776f3f5c8bf486811f9d3ea3453676ce8"},
{file = "websockets-10.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ae5e95cfb53ab1da62185e23b3130e11d64431179debac6dc3c6acf08760e9b1"},
{file = "websockets-10.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7c584f366f46ba667cfa66020344886cf47088e79c9b9d39c84ce9ea98aaa331"},
{file = "websockets-10.4-cp310-cp310-win32.whl", hash = "sha256:b029fb2032ae4724d8ae8d4f6b363f2cc39e4c7b12454df8df7f0f563ed3e61a"},
{file = "websockets-10.4-cp310-cp310-win_amd64.whl", hash = "sha256:8dc96f64ae43dde92530775e9cb169979f414dcf5cff670455d81a6823b42089"},
{file = "websockets-10.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:47a2964021f2110116cc1125b3e6d87ab5ad16dea161949e7244ec583b905bb4"},
{file = "websockets-10.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e789376b52c295c4946403bd0efecf27ab98f05319df4583d3c48e43c7342c2f"},
{file = "websockets-10.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7d3f0b61c45c3fa9a349cf484962c559a8a1d80dae6977276df8fd1fa5e3cb8c"},
{file = "websockets-10.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f55b5905705725af31ccef50e55391621532cd64fbf0bc6f4bac935f0fccec46"},
{file = "websockets-10.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00c870522cdb69cd625b93f002961ffb0c095394f06ba8c48f17eef7c1541f96"},
{file = "websockets-10.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f38706e0b15d3c20ef6259fd4bc1700cd133b06c3c1bb108ffe3f8947be15fa"},
{file = "websockets-10.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f2c38d588887a609191d30e902df2a32711f708abfd85d318ca9b367258cfd0c"},
{file = "websockets-10.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:fe10ddc59b304cb19a1bdf5bd0a7719cbbc9fbdd57ac80ed436b709fcf889106"},
{file = "websockets-10.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:90fcf8929836d4a0e964d799a58823547df5a5e9afa83081761630553be731f9"},
{file = "websockets-10.4-cp311-cp311-win32.whl", hash = "sha256:b9968694c5f467bf67ef97ae7ad4d56d14be2751000c1207d31bf3bb8860bae8"},
{file = "websockets-10.4-cp311-cp311-win_amd64.whl", hash = "sha256:a7a240d7a74bf8d5cb3bfe6be7f21697a28ec4b1a437607bae08ac7acf5b4882"},
{file = "websockets-10.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5c1289596042fad2cdceb05e1ebf7aadf9995c928e0da2b7a4e99494953b1b94"},
{file = "websockets-10.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0cff816f51fb33c26d6e2b16b5c7d48eaa31dae5488ace6aae468b361f422b63"},
{file = "websockets-10.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:dd9becd5fe29773d140d68d607d66a38f60e31b86df75332703757ee645b6faf"},
{file = "websockets-10.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45ec8e75b7dbc9539cbfafa570742fe4f676eb8b0d3694b67dabe2f2ceed8aa6"},
{file = "websockets-10.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f72e5cd0f18f262f5da20efa9e241699e0cf3a766317a17392550c9ad7b37d8"},
{file = "websockets-10.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:185929b4808b36a79c65b7865783b87b6841e852ef5407a2fb0c03381092fa3b"},
{file = "websockets-10.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:7d27a7e34c313b3a7f91adcd05134315002aaf8540d7b4f90336beafaea6217c"},
{file = "websockets-10.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:884be66c76a444c59f801ac13f40c76f176f1bfa815ef5b8ed44321e74f1600b"},
{file = "websockets-10.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:931c039af54fc195fe6ad536fde4b0de04da9d5916e78e55405436348cfb0e56"},
{file = "websockets-10.4-cp38-cp38-win32.whl", hash = "sha256:db3c336f9eda2532ec0fd8ea49fef7a8df8f6c804cdf4f39e5c5c0d4a4ad9a7a"},
{file = "websockets-10.4-cp38-cp38-win_amd64.whl", hash = "sha256:48c08473563323f9c9debac781ecf66f94ad5a3680a38fe84dee5388cf5acaf6"},
{file = "websockets-10.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:40e826de3085721dabc7cf9bfd41682dadc02286d8cf149b3ad05bff89311e4f"},
{file = "websockets-10.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:56029457f219ade1f2fc12a6504ea61e14ee227a815531f9738e41203a429112"},
{file = "websockets-10.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f5fc088b7a32f244c519a048c170f14cf2251b849ef0e20cbbb0fdf0fdaf556f"},
{file = "websockets-10.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fc8709c00704194213d45e455adc106ff9e87658297f72d544220e32029cd3d"},
{file = "websockets-10.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0154f7691e4fe6c2b2bc275b5701e8b158dae92a1ab229e2b940efe11905dff4"},
{file = "websockets-10.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c6d2264f485f0b53adf22697ac11e261ce84805c232ed5dbe6b1bcb84b00ff0"},
{file = "websockets-10.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9bc42e8402dc5e9905fb8b9649f57efcb2056693b7e88faa8fb029256ba9c68c"},
{file = "websockets-10.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:edc344de4dac1d89300a053ac973299e82d3db56330f3494905643bb68801269"},
{file = "websockets-10.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:84bc2a7d075f32f6ed98652db3a680a17a4edb21ca7f80fe42e38753a58ee02b"},
{file = "websockets-10.4-cp39-cp39-win32.whl", hash = "sha256:c94ae4faf2d09f7c81847c63843f84fe47bf6253c9d60b20f25edfd30fb12588"},
{file = "websockets-10.4-cp39-cp39-win_amd64.whl", hash = "sha256:bbccd847aa0c3a69b5f691a84d2341a4f8a629c6922558f2a70611305f902d74"},
{file = "websockets-10.4-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:82ff5e1cae4e855147fd57a2863376ed7454134c2bf49ec604dfe71e446e2193"},
{file = "websockets-10.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d210abe51b5da0ffdbf7b43eed0cfdff8a55a1ab17abbec4301c9ff077dd0342"},
{file = "websockets-10.4-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:942de28af58f352a6f588bc72490ae0f4ccd6dfc2bd3de5945b882a078e4e179"},
{file = "websockets-10.4-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9b27d6c1c6cd53dc93614967e9ce00ae7f864a2d9f99fe5ed86706e1ecbf485"},
{file = "websockets-10.4-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:3d3cac3e32b2c8414f4f87c1b2ab686fa6284a980ba283617404377cd448f631"},
{file = "websockets-10.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:da39dd03d130162deb63da51f6e66ed73032ae62e74aaccc4236e30edccddbb0"},
{file = "websockets-10.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:389f8dbb5c489e305fb113ca1b6bdcdaa130923f77485db5b189de343a179393"},
{file = "websockets-10.4-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09a1814bb15eff7069e51fed0826df0bc0702652b5cb8f87697d469d79c23576"},
{file = "websockets-10.4-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff64a1d38d156d429404aaa84b27305e957fd10c30e5880d1765c9480bea490f"},
{file = "websockets-10.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:b343f521b047493dc4022dd338fc6db9d9282658862756b4f6fd0e996c1380e1"},
{file = "websockets-10.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:932af322458da7e4e35df32f050389e13d3d96b09d274b22a7aa1808f292fee4"},
{file = "websockets-10.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a4162139374a49eb18ef5b2f4da1dd95c994588f5033d64e0bbfda4b6b6fcf"},
{file = "websockets-10.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c57e4c1349fbe0e446c9fa7b19ed2f8a4417233b6984277cce392819123142d3"},
{file = "websockets-10.4-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b627c266f295de9dea86bd1112ed3d5fafb69a348af30a2422e16590a8ecba13"},
{file = "websockets-10.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:05a7233089f8bd355e8cbe127c2e8ca0b4ea55467861906b80d2ebc7db4d6b72"},
{file = "websockets-10.4.tar.gz", hash = "sha256:eef610b23933c54d5d921c92578ae5f89813438fded840c2e9809d378dc765d3"},
{file = "websockets-13.1-cp311-cp311-win_amd64.whl", hash = "sha256:d04f13a1d75cb2b8382bdc16ae6fa58c97337253826dfe136195b7f89f661557"},
{file = "websockets-13.1-py3-none-any.whl", hash = "sha256:a9a396a6ad26130cdae92ae10c36af09d9bfe6cafe69670fd3b6da9b07b4044f"},
{file = "websockets-13.1.tar.gz", hash = "sha256:a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878"},
]
[[package]]
@ -1781,7 +1663,6 @@ summary = "Yet another URL library"
dependencies = [
"idna>=2.0",
"multidict>=4.0",
"typing-extensions>=3.7.4; python_version < \"3.8\"",
]
files = [
{file = "yarl-1.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a8c1df72eb746f4136fe9a2e72b0c9dc1da1cbd23b5372f94b5820ff8ae30e0e"},

2490
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -29,8 +29,8 @@ fastapi-user-auth = ">=0.7.2"
qrcode = {extras = ["pil"], version = "^7.3.1"}
msgspec = ">= 0.13.1"
uvicorn = ">=0.20.0"
websockets = "^10.4"
loguru = "^0.6.0"
websockets = ">=13.1"
loguru = ">=0.6.0"
urllib3 = "^1.26.15"
mpmath = "^1.3.0"
fastapi = ">=0.109.1"
@ -110,7 +110,7 @@ dependencies = [
"qrcode[pil]<8.0.0,>=7.3.1",
"msgspec>=0.13.1",
"uvicorn>=0.20.0",
"websockets<11.0,>=10.4",
"websockets>=13.1",
"loguru<1.0.0,>=0.6.0",
"urllib3<2.0.0,>=1.26.15",
"mpmath<2.0.0,>=1.3.0",

View File

@ -3,91 +3,68 @@
aioboto3==12.4.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
aiobotocore[boto3]==2.12.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
aiofiles==24.1.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
aiohttp==3.9.5 ; python_full_version >= "3.8.1" and python_version < "4.0"
aioitertools==0.11.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
aiohappyeyeballs==2.4.3 ; python_full_version >= "3.8.1" and python_version < "4.0"
aiohttp==3.10.9 ; python_full_version >= "3.8.1" and python_version < "4.0"
aioitertools==0.12.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
aiosignal==1.3.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
aiosqlite==0.20.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
annotated-types==0.7.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
anyio==4.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
apscheduler==3.10.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
async-timeout==4.0.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
attrs==23.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
attrs==24.2.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
backports-zoneinfo==0.2.1 ; python_full_version >= "3.8.1" and python_version < "3.9"
bcrypt==4.0.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
beautifulsoup4==4.12.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
boto3==1.34.69 ; python_full_version >= "3.8.1" and python_version < "4.0"
botocore==1.34.69 ; python_full_version >= "3.8.1" and python_version < "4.0"
casbin==1.36.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
certifi==2024.7.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
click==8.1.7 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
colorama==0.4.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
dnspython==2.6.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
email-validator==2.2.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
exceptiongroup==1.2.1 ; python_full_version >= "3.8.1" and python_version < "3.11"
fastapi-amis-admin==0.7.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi-cli==0.0.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi-user-auth==0.7.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi==0.111.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi==0.115.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
frozenlist==1.4.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
gitdb==4.0.11 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
gitpython==3.1.43 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
greenlet==3.0.3 ; python_version < "3.13" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_full_version >= "3.8.1"
h11==0.14.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
httpcore==1.0.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
httptools==0.6.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
httpx==0.27.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
idna==3.7 ; python_full_version >= "3.8.1" and python_version < "4.0"
greenlet==3.1.1 ; python_version < "3.13" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_full_version >= "3.8.1"
httpx==0.27.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
idna==3.10 ; python_full_version >= "3.8.1" and python_version < "4.0"
jinja2==3.1.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
jmespath==1.0.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
loguru==0.6.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
lxml==5.2.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
markdown-it-py==3.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
loguru==0.7.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
lxml==5.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
markupsafe==2.1.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
mdurl==0.1.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
motor==3.5.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
motor==3.6.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
mpmath==1.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
msgspec==0.18.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
multidict==6.0.5 ; python_full_version >= "3.8.1" and python_version < "4.0"
orjson==3.10.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
multidict==6.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
passlib==1.7.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pillow==10.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic-core==2.20.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic-settings==2.3.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic==2.8.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pygments==2.18.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pymongo==4.8.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic-settings==2.5.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic==2.9.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pymongo==4.10.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pypng==0.20220715.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
python-dateutil==2.9.0.post0 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-dotenv==1.0.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
python-multipart==0.0.9 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pytz==2024.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pyyaml==6.0.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
python-multipart==0.0.12 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pytz==2024.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
qrcode[pil]==7.4.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
rich==13.7.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
s3transfer==0.10.2 ; python_full_version >= "3.8.1" and python_version < "4.0"
setuptools==70.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
shellingham==1.5.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
setuptools==75.1.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
simpleeval==0.9.13 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
six==1.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
smmap==5.0.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sniffio==1.3.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
soupsieve==2.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
soupsieve==2.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlalchemy-database==0.1.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlalchemy==2.0.31 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlmodel==0.0.19 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
starlette==0.37.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlalchemy==2.0.35 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlmodel==0.0.22 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
starlette==0.38.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
toml==0.10.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
typer==0.12.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
typing-extensions==4.12.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
tzdata==2024.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" and platform_system == "Windows"
tzdata==2024.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" and platform_system == "Windows"
tzlocal==5.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
ujson==5.10.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
urllib3==1.26.19 ; python_full_version >= "3.8.1" and python_version < "4.0"
uvicorn==0.30.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
uvicorn[standard]==0.30.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_full_version >= "3.8.1" and python_full_version < "4.0.0"
watchfiles==0.22.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
websockets==10.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
urllib3==1.26.20 ; python_full_version >= "3.8.1" and python_version < "4.0"
uvicorn==0.31.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
websockets==13.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
win32-setctime==1.1.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" and sys_platform == "win32"
wrapt==1.16.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
yarl==1.9.4 ; python_full_version >= "3.8.1" and python_version < "4.0"
yarl==1.13.1 ; python_full_version >= "3.8.1" and python_version < "4.0"