Skip to content

The only downloader you need. 下载器的集大成者。

refactor(core): 构造器注入重构,消除模块单例和隐式依赖

XiaoYouChR15d0c5ca4f41
diff --git a/.gitignore b/.gitignore
index b5021f50..4e579a16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,4 @@ browser_extension/firefox/
.playwright-mcp
*.jks
*.keystore
-/config/
\ No newline at end of file
+/config/docs/research/
diff --git a/Ghost-Downloader-3.py b/Ghost-Downloader-3.py
index b6692d22..ee57df72 100644
--- a/Ghost-Downloader-3.py
+++ b/Ghost-Downloader-3.py
@@ -66,11 +66,9 @@ def setupEnvironment():
def startApp(application, isSilent=False):
from PySide6.QtGui import QIcon
from app.config.cfg import cfg
- from app.services.browser_service import browserService
from app.services.clipboard_listener import ClipboardListener
- from app.services.task_service import taskService
from app.signal_bus import signalBus
- from app.startup import loadEngine, loadPacks, startEngine, bindNotifications, checkUpdateAtStartup, stopEngine
+ from app.startup import loadEngine, createServices, loadPacks, startEngine, bindNotifications, checkUpdateAtStartup, stopEngine
from app.view.windows.main_window import MainWindow
def exceptionHook(exceptionType, value, tb):
@@ -86,10 +84,19 @@ def startApp(application, isSilent=False):
from app.view.shell.dock import setDockIconVisible
setDockIconVisible(cfg.shouldShowDockIcon.value, activate=False)
- loadEngine(application)
+ coroutineRunner, categoryService, speedMeter = loadEngine(application)
MainWindow.refreshThemeColor()
+ featureService, taskService, browserService, aria2RpcServer, runtimeStatusService = createServices(
+ coroutineRunner, categoryService, speedMeter,
+ )
+ loadPacks(featureService, coroutineRunner, speedMeter, taskService, categoryService, runtimeStatusService)
+
+ from app.services.plan import Plan
+ plan = Plan(allCompleted=lambda: taskService.runningCount() == 0)
+ taskService.tasksAllCompleted.connect(plan.trigger)
+
shouldRunOobe = not cfg.hasCompletedOobe.value and not isSilent
if shouldRunOobe:
@@ -97,13 +104,12 @@ def startApp(application, isSilent=False):
from PySide6.QtCore import QEventLoop
from app.view.windows.oobe_window import OobeWindow
- loadPacks()
- startEngine()
+ startEngine(taskService, speedMeter, featureService, coroutineRunner)
if cfg.isBrowserExtensionEnabled.value:
browserService.start() # 提前启动,OOBE 期间可完成扩展配对
- oobe = OobeWindow()
+ oobe = OobeWindow(browserService, coroutineRunner, featureService, taskService)
browserService.pairRequested.connect(oobe.onPairRequested)
oobe.show()
@@ -117,11 +123,11 @@ def startApp(application, isSilent=False):
# Python GC 会在任意工作线程 delete,主线程定时器表悬空 → 闪退
oobe.deleteLater()
- window = MainWindow()
+ window = MainWindow(taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner, runtimeStatusService, plan)
window.setupPacks()
window.show()
else:
- window = MainWindow()
+ window = MainWindow(taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner, runtimeStatusService, plan)
if not isSilent:
from qfluentwidgets import SplashScreen
@@ -130,9 +136,8 @@ def startApp(application, isSilent=False):
window.show()
application.processEvents()
- loadPacks()
window.setupPacks()
- startEngine()
+ startEngine(taskService, speedMeter, featureService, coroutineRunner)
if not isSilent:
splash.finish()
@@ -153,7 +158,7 @@ def startApp(application, isSilent=False):
def show() -> MainWindow:
nonlocal window
if window is None:
- window = MainWindow()
+ window = MainWindow(taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner, runtimeStatusService, plan)
window.setupPacks()
window.destroyed.connect(onWindowDestroyed)
window.show()
@@ -164,7 +169,7 @@ def startApp(application, isSilent=False):
def onBrowserDraft(tasks):
nonlocal window
if window is None:
- window = MainWindow()
+ window = MainWindow(taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner, runtimeStatusService, plan)
window.setupPacks()
window.destroyed.connect(onWindowDestroyed)
window.addTasks(tasks)
@@ -172,7 +177,6 @@ def startApp(application, isSilent=False):
signalBus.activationRequested.connect(show)
signalBus.openFileRequested.connect(lambda uris: show().addUrls(uris))
signalBus.exceptionCaught.connect(lambda msg: show().alertException(msg))
- signalBus.updateAvailable.connect(lambda release: show()._onUpdateAvailable(release))
browserService.taskDraftRequested.connect(onBrowserDraft)
browserService.pairRequested.connect(lambda req: show().confirmPair(req))
@@ -187,14 +191,13 @@ def startApp(application, isSilent=False):
browserService.start()
cfg.isBrowserExtensionEnabled.valueChanged.connect(browserService.setEnabled)
- from app.services.aria2_rpc import aria2RpcServer
aria2RpcServer.taskDraftRequested.connect(onBrowserDraft)
if cfg.isAria2RpcEnabled.value:
aria2RpcServer.start()
cfg.isAria2RpcEnabled.valueChanged.connect(aria2RpcServer.setEnabled)
cfg.aria2RpcPort.valueChanged.connect(aria2RpcServer.setPort)
- clipboardListener = ClipboardListener(parent=application)
+ clipboardListener = ClipboardListener(featureService.matchPassive, parent=application)
cfg.isClipboardListenerEnabled.valueChanged.connect(clipboardListener.setEnabled)
clipboardListener.setEnabled(cfg.isClipboardListenerEnabled.value)
clipboardListener.urlsDetected.connect(lambda urls: show().addUrls(urls))
@@ -202,32 +205,28 @@ def startApp(application, isSilent=False):
if sys.platform == "darwin":
from app.view.shell.mac_status_item import MacStatusItem
from app.view.shell.dock import setupDock
- from app.services.speed_meter import speedMeter
- statusItem = MacStatusItem()
+ statusItem = MacStatusItem(taskService)
statusItem.show()
speedMeter.speedChanged.connect(statusItem.setSpeed)
application.statusItem = statusItem
- setupDock()
+ setupDock(speedMeter, taskService)
else:
from app.view.shell.tray import SystemTrayIcon
- tray = SystemTrayIcon(QIcon(":/image/logo.png"), parent=application)
+ tray = SystemTrayIcon(taskService, speedMeter, QIcon(":/image/logo.png"), parent=application)
tray.show()
from app.platform.desktop_notification import init, notifyTaskCompleted, notifyDiskSpaceInsufficient
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(init())
- bindNotifications(notifyTaskCompleted, notifyDiskSpaceInsufficient)
+ coroutineRunner.submit(init(coroutineRunner.submit))
+ bindNotifications(taskService, notifyTaskCompleted, notifyDiskSpaceInsufficient)
- from app.services.plan import plan
- taskService.tasksAllCompleted.connect(plan.trigger)
taskService.tasksAllCompleted.connect(emptyWorkingSetIfIdle)
if isSilent:
emptyWorkingSetIfIdle()
- checkUpdateAtStartup()
+ checkUpdateAtStartup(coroutineRunner, onUpdateAvailable=lambda release: show()._onUpdateAvailable(release))
- application.aboutToQuit.connect(stopEngine)
+ application.aboutToQuit.connect(lambda: stopEngine(taskService, browserService, aria2RpcServer, featureService, coroutineRunner))
if __name__ == "__main__":
diff --git a/android/main.py b/android/main.py
index af0608a5..ad87585c 100644
--- a/android/main.py
+++ b/android/main.py
@@ -49,10 +49,8 @@ def startApp(application):
notifyBrowserPaired, notifyBrowserTaskAdded, notifyDiskSpaceInsufficient,
notifyTaskCompleted,
)
- from app.services.browser_service import browserService
- from app.services.speed_meter import speedMeter
from app.signal_bus import signalBus
- from app.startup import loadEngine, loadPacks, startEngine, bindNotifications, checkUpdateAtStartup, stopEngine
+ from app.startup import loadEngine, createServices, loadPacks, startEngine, bindNotifications, checkUpdateAtStartup, stopEngine
from app.view.mobile.device import setupTouchScrolling
from app.view.mobile.window import MobileMainWindow
@@ -63,26 +61,27 @@ def startApp(application):
sys.excepthook = exceptionHook
- loadEngine(application)
- loadPacks()
+ coroutineRunner, categoryService, speedMeter = loadEngine(application)
+ featureService, taskService, browserService, aria2RpcServer, runtimeStatusService = createServices(
+ coroutineRunner, categoryService, speedMeter,
+ )
+ loadPacks(featureService, coroutineRunner, speedMeter, taskService, categoryService, runtimeStatusService)
- mainWindow = MobileMainWindow()
+ mainWindow = MobileMainWindow(taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner)
mainWindow.show()
setupTouchScrolling(mainWindow)
- from app.services.task_service import taskService
taskService.taskStarted.connect(lambda _: keepAlive.holdFor(REASON_DOWNLOAD))
taskService.tasksAllCompleted.connect(lambda: keepAlive.release(REASON_DOWNLOAD))
speedMeter.speedChanged.connect(keepAlive.setSpeed)
- startEngine()
+ startEngine(taskService, speedMeter, featureService, coroutineRunner)
signalBus.exceptionCaught.connect(mainWindow.alertException)
- signalBus.updateAvailable.connect(mainWindow._onUpdateAvailable)
requestIgnoreBatteryOptimizations()
- bindNotifications(notifyTaskCompleted, notifyDiskSpaceInsufficient)
+ bindNotifications(taskService, notifyTaskCompleted, notifyDiskSpaceInsufficient)
def onBrowserTaskDraftRequested(tasks):
for task in tasks:
@@ -96,7 +95,6 @@ def startApp(application):
browserService.taskDraftRequested.connect(onBrowserTaskDraftRequested)
browserService.pairRequested.connect(onBrowserPairRequested)
- from app.services.aria2_rpc import aria2RpcServer
aria2RpcServer.taskDraftRequested.connect(onBrowserTaskDraftRequested)
if cfg.isAria2RpcEnabled.value:
aria2RpcServer.start()
@@ -115,9 +113,9 @@ def startApp(application):
keepAlive.holdFor(REASON_BROWSER)
browserService.start()
- checkUpdateAtStartup()
+ checkUpdateAtStartup(coroutineRunner, onUpdateAvailable=mainWindow._onUpdateAvailable)
- application.aboutToQuit.connect(stopEngine)
+ application.aboutToQuit.connect(lambda: stopEngine(taskService, browserService, aria2RpcServer, featureService, coroutineRunner))
if __name__ == "__main__":
diff --git a/android/preview.py b/android/preview.py
index f626edc8..e55f5438 100644
--- a/android/preview.py
+++ b/android/preview.py
@@ -27,16 +27,21 @@ if __name__ == "__main__":
from app.view.mobile import setupAndroid
setupAndroid()
- loadEngine(app)
- loadPacks()
+ from app.startup import createEngine
+
+ coroutineRunner, categoryService, speedMeter = loadEngine(app)
+ featureService = loadPacks()
+ taskService, browserService, aria2RpcServer, runtimeStatusService = createEngine(
+ coroutineRunner, categoryService, speedMeter, featureService,
+ )
from app.view.mobile.window import MobileMainWindow
from app.view.mobile.device import setupTouchScrolling
- window = MobileMainWindow()
+ window = MobileMainWindow(taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner)
window.resize(400, 800)
window.show()
setupTouchScrolling(window)
- startEngine()
- app.aboutToQuit.connect(stopEngine)
+ startEngine(taskService, speedMeter, featureService, coroutineRunner, categoryService, runtimeStatusService)
+ app.aboutToQuit.connect(lambda: stopEngine(taskService, browserService, aria2RpcServer, featureService, coroutineRunner))
sys.exit(app.exec())
diff --git a/app/models/pack.py b/app/models/pack.py
index 783bb5d0..c0d930da 100644
--- a/app/models/pack.py
+++ b/app/models/pack.py
@@ -10,6 +10,12 @@ from app.config.cfg import cfg, ConfigItem
if TYPE_CHECKING:
from app.models.task import Task, TaskOptions
+ from app.services.category_service import CategoryService
+ from app.services.coroutine_runner import CoroutineRunner
+ from app.services.feature_service import FeatureService
+ from app.services.speed_meter import SpeedMeter
+ from app.services.task_service import TaskService
+ from app.services.runtime_status import RuntimeStatusService
from PySide6.QtWidgets import QWidget
from qfluentwidgets import FluentIcon
from app.view.components.setting_card_group import CollapsibleSettingCardGroup
@@ -120,21 +126,39 @@ class PackPage:
title: str = ""
+@dataclass(frozen=True)
+class PackServices:
+ coroutineRunner: CoroutineRunner
+ speedMeter: SpeedMeter
+ taskService: TaskService
+ featureService: FeatureService
+ categoryService: CategoryService
+ runtimeStatusService: RuntimeStatusService
+
+
class FeaturePack:
packId: str = ""
config: PackConfig | None = None
proxySchemes: set[str] | None = None
+ def __init__(self, services: PackServices):
+ self._services = services
+ if self.config is not None:
+ self.config._services = services
+ for runtime in self.runtimes():
+ runtime._services = services
+
def parsers(self) -> list[TaskParser]:
return []
def taskCard(self, task: Task, parent=None):
- from app.view.cards.task_cards import UniversalTaskCard
- return UniversalTaskCard(task, parent)
+ from app.view.cards.task_cards import TaskCard
+ return TaskCard(task, self._services.taskService, self._services.featureService,
+ self._services.categoryService, parent)
def draftCard(self, task: Task, parent=None):
- from app.view.cards.draft_cards import UniversalDraftCard
- return UniversalDraftCard(task, parent)
+ from app.view.cards.draft_cards import DraftCard
+ return DraftCard(task, self._services.categoryService, parent)
def optionCards(self, task: Task, parent=None) -> list[QWidget]:
return []
@@ -151,10 +175,10 @@ class FeaturePack:
def pages(self) -> list[type[PackPage]]:
return []
- def start(self):
+ async def activate(self):
pass
- def stop(self):
+ async def deactivate(self):
pass
def tr(self, text: str) -> str:
diff --git a/app/models/task.py b/app/models/task.py
index c8cfaa1d..3f43451c 100644
--- a/app/models/task.py
+++ b/app/models/task.py
@@ -128,7 +128,7 @@ class TaskStep:
def task(self) -> Task:
return self._task
- def setStatus(self, status: TaskStatus, sync: bool = True):
+ def setStatus(self, status: TaskStatus):
self.status = status
if status == TaskStatus.COMPLETED:
self.progress = 100
@@ -140,7 +140,7 @@ class TaskStep:
elif status == TaskStatus.FAILED:
self.speed = 0
- if sync and hasattr(self, "_task"):
+ if hasattr(self, "_task"):
self._task.updateStatus()
def setError(self, error: StepError) -> None:
@@ -150,19 +150,19 @@ class TaskStep:
if hasattr(self, "_task"):
self._task.updateStatus()
- def reset(self, sync: bool = True):
+ def reset(self):
self.status = TaskStatus.WAITING
self.progress = 0
self.receivedBytes = 0
self.speed = 0
self.error = None
- if sync and hasattr(self, "_task"):
+ if hasattr(self, "_task"):
self._task.updateStatus()
def setOptions(self, options: dict) -> None:
pass
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
raise NotImplementedError
@property
@@ -354,8 +354,18 @@ class Task:
if step.status == TaskStatus.COMPLETED:
continue
if status == TaskStatus.RUNNING and step.status == TaskStatus.FAILED:
- step.reset(sync=False)
- step.setStatus(status, sync=False)
+ step.status = TaskStatus.WAITING
+ step.progress = 0
+ step.receivedBytes = 0
+ step.speed = 0
+ step.error = None
+ step.status = status
+ step.speed = 0
+ if status == TaskStatus.COMPLETED:
+ step.progress = 100
+ step.error = None
+ elif status in {TaskStatus.WAITING, TaskStatus.PAUSED}:
+ step.error = None
return self.updateStatus()
def reset(self) -> TaskStatus:
@@ -364,7 +374,11 @@ class Task:
self.status = TaskStatus.WAITING
return self.status
for step in self.steps:
- step.reset(sync=False)
+ step.status = TaskStatus.WAITING
+ step.progress = 0
+ step.receivedBytes = 0
+ step.speed = 0
+ step.error = None
return self.updateStatus()
def addStep(self, step: TaskStep):
@@ -386,8 +400,7 @@ class Task:
self.updateStatus()
def pendingSteps(self) -> Iterable[TaskStep]:
- self.steps.sort(key=lambda step: step.stepIndex)
- for step in self.steps:
+ for step in sorted(self.steps, key=lambda step: step.stepIndex):
if self.status != TaskStatus.RUNNING:
break
if not self._isStepSelected(step):
@@ -423,12 +436,12 @@ class Task:
step._bindTask(self)
self.updateStatus()
- async def run(self):
+ async def run(self, reportSpeed, waitForSpeedLimit):
currentStep = None
try:
for step in self.pendingSteps():
currentStep = step
- await step.run()
+ await step.run(reportSpeed, waitForSpeedLimit)
except asyncio.CancelledError:
logger.info("{} stopped", self.name)
raise
diff --git a/app/platform/desktop_notification.py b/app/platform/desktop_notification.py
index 15ea7456..f48533a5 100644
--- a/app/platform/desktop_notification.py
+++ b/app/platform/desktop_notification.py
@@ -14,9 +14,12 @@ if TYPE_CHECKING:
from desktop_notifier import DesktopNotifier
notifier: DesktopNotifier | None = None
+_submit = None
-async def init() -> None:
+async def init(submit) -> None:
+ global _submit
+ _submit = submit
from desktop_notifier import DesktopNotifier as DN, Icon
iconPath = Path(QStandardPaths.writableLocation(
@@ -35,8 +38,7 @@ def notifyDiskSpaceInsufficient(free: int, needed: int) -> None:
if notifier is None:
return
from app.format import toReadableSize
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(notifier.send(
+ _submit(notifier.send(
title=QCoreApplication.translate("Notifications", "磁盘空间不足"),
message=QCoreApplication.translate("Notifications", "剩余 {0},需要 {1},任务未自动开始").format(
toReadableSize(free), toReadableSize(needed)),
@@ -65,9 +67,8 @@ def notifyTaskCompleted(task: Task) -> None:
logger.debug("提取文件图标失败: {}", e)
from desktop_notifier import Icon, Button
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(notifier.send(
+ _submit(notifier.send(
title=QCoreApplication.translate("Notifications", "下载完成"),
message=task.name,
buttons=[
diff --git a/app/services/aria2_rpc.py b/app/services/aria2_rpc.py
index 1b2b2a25..b73ef5af 100644
--- a/app/services/aria2_rpc.py
+++ b/app/services/aria2_rpc.py
@@ -23,8 +23,11 @@ JSONRPC_METHOD_NOT_FOUND = -32601
class Aria2RpcServer(QObject):
taskDraftRequested = Signal(list)
- def __init__(self, parent: QObject | None = None) -> None:
+ def __init__(self, coroutineRunner, parse, addTask, parent: QObject | None = None) -> None:
super().__init__(parent)
+ self._coroutineRunner = coroutineRunner
+ self._parse = parse
+ self._addTask = addTask
self._server = QTcpServer(self)
self._buffers: dict[int, bytes] = {}
@@ -177,8 +180,6 @@ class Aria2RpcServer(QObject):
self._respond(socket, rpcId, gid)
from app.models.task import TaskOptions
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
outputFolder = Path(directory) if directory else Path(cfg.downloadFolder.value)
clientProfile = "" if cfg.aria2RpcEmulateFingerprint.value else "raw"
@@ -188,16 +189,14 @@ class Aria2RpcServer(QObject):
outputFolder=outputFolder,
clientProfile=clientProfile,
)
- coroutineRunner.submit(
- featureService.parse(taskOptions),
+ self._coroutineRunner.submit(
+ self._parse(taskOptions),
done=self._onTaskParsed,
failed=self._onTaskParseFailed,
filename=filename,
)
def _onTaskParsed(self, task: Task, filename: str = "") -> None:
- from app.services.task_service import taskService
-
if filename:
task.setName(filename)
@@ -205,7 +204,7 @@ class Aria2RpcServer(QObject):
self.taskDraftRequested.emit([task])
return
- taskService.add(task)
+ self._addTask(task)
def _onTaskParseFailed(self, error: str) -> None:
logger.warning("Aria2 RPC task parse failed: {}", error)
@@ -230,4 +229,3 @@ class Aria2RpcServer(QObject):
socket.disconnectFromHost()
-aria2RpcServer = Aria2RpcServer()
diff --git a/app/services/browser_service.py b/app/services/browser_service.py
index c84c2a60..7557d74a 100644
--- a/app/services/browser_service.py
+++ b/app/services/browser_service.py
@@ -19,7 +19,6 @@ from loguru import logger
from app.config.cfg import cfg
from app.config.constants import LATEST_EXTENSION_VERSION, VERSION
from app.config.paths import APP_DATA_DIR
-from app.services.task_service import taskService
if TYPE_CHECKING:
from PySide6.QtWebSockets import QWebSocket
@@ -118,8 +117,11 @@ class BrowserService(QObject):
connectionChanged = Signal()
protocolMismatched = Signal()
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, taskService, parse, parent=None):
super().__init__(parent)
+ self._coroutineRunner = coroutineRunner
+ self._taskService = taskService
+ self._parse = parse
self._server = QWebSocketServer(
"Ghost Downloader Browser Socket Server",
QWebSocketServer.SslMode.NonSecureMode,
@@ -335,7 +337,7 @@ class BrowserService(QObject):
def _broadcastSnapshots(self) -> None:
if not self._sessions:
return
- tasks = sorted(taskService.tasks, key=lambda t: t.createdAt, reverse=True)
+ tasks = sorted(self._taskService.tasks, key=lambda t: t.createdAt, reverse=True)
snapshot = json.dumps({
"type": MessageType.TASK_SNAPSHOT,
"tasks": [self._toTaskSummary(t) for t in tasks],
@@ -439,8 +441,7 @@ class BrowserService(QObject):
< QVersionNumber.fromString(LATEST_EXTENSION_VERSION)
and not self._isUpdatingExtension):
self._isUpdatingExtension = True
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
extractBrowserExtension(),
done=self._onExtensionExtracted,
failed=self._onExtensionExtractFailed,
@@ -458,8 +459,6 @@ class BrowserService(QObject):
logger.warning("Browser extension extract failed: {}", error)
def _onCreateTask(self, session: BrowserClientSession, data: dict) -> None:
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
requestId = toStr(data, "requestId")
payload = data.get("payload")
@@ -483,8 +482,8 @@ class BrowserService(QObject):
self._sendCreateTaskResult(session, requestId, CreateTaskStatus.REJECTED, message=repr(e))
return
- coroutineRunner.submit(
- featureService.parse(options),
+ self._coroutineRunner.submit(
+ self._parse(options),
done=self._onTaskParsed,
failed=self._onTaskParseFailed,
session=session, requestId=requestId, title=title, draft=draft,
@@ -505,7 +504,7 @@ class BrowserService(QObject):
self.taskDraftRequested.emit([task])
return
- taskService.add(task)
+ self._taskService.add(task)
self._sendCreateTaskResult(session, requestId, CreateTaskStatus.CREATED, taskId=task.taskId)
self._broadcastSnapshots()
@@ -530,7 +529,7 @@ class BrowserService(QObject):
self._sendResult(session, MessageType.TASK_ACTION_RESULT, requestId, ok=False, message="不支持的操作")
return
- task = taskService.taskById(taskId)
+ task = self._taskService.taskById(taskId)
if task is None:
self._sendResult(session, MessageType.TASK_ACTION_RESULT, requestId, ok=False, message="任务不存在")
return
@@ -542,19 +541,19 @@ class BrowserService(QObject):
self._sendResult(session, MessageType.TASK_ACTION_RESULT, requestId,
ok=False, message="当前任务不支持暂停")
return
- taskService.pause(task)
+ self._taskService.pause(task)
elif task.status == TaskStatus.COMPLETED:
self._sendResult(session, MessageType.TASK_ACTION_RESULT, requestId,
ok=False, message="任务已完成")
return
else:
- taskService.start(task)
+ self._taskService.start(task)
elif action == TaskAction.CANCEL:
- taskService.delete(task, shouldDeleteFiles=True)
+ self._taskService.delete(task, shouldDeleteFiles=True)
elif action == TaskAction.REDOWNLOAD:
- taskService.redownload(task)
+ self._taskService.redownload(task)
elif action == TaskAction.OPEN_FILE:
path = Path(task.outputPath)
@@ -580,4 +579,3 @@ class BrowserService(QObject):
self._sendResult(session, MessageType.TASK_ACTION_RESULT, requestId, ok=False, message=repr(e))
-browserService = BrowserService()
diff --git a/app/services/category_service.py b/app/services/category_service.py
index 848e44ee..f1c342d3 100644
--- a/app/services/category_service.py
+++ b/app/services/category_service.py
@@ -212,5 +212,3 @@ class CategoryService(QObject):
self._categories = reordered
self._save()
-
-categoryService = CategoryService()
diff --git a/app/services/clipboard_listener.py b/app/services/clipboard_listener.py
index 07490d66..23ff248d 100644
--- a/app/services/clipboard_listener.py
+++ b/app/services/clipboard_listener.py
@@ -4,14 +4,12 @@ from PySide6.QtCore import QObject, Signal
from PySide6.QtWidgets import QApplication
from loguru import logger
-from app.services.feature_service import featureService
-
-
class ClipboardListener(QObject):
urlsDetected = Signal(list)
- def __init__(self, parent=None):
+ def __init__(self, matchPassive, parent=None):
super().__init__(parent)
+ self._matchPassive = matchPassive
self._clipboard = None
self._enabled = False
self._lastUrls: tuple[str, ...] = ()
@@ -55,6 +53,6 @@ class ClipboardListener(QObject):
continue
if not parsed.scheme or parsed.geturl() != url:
continue
- if featureService.matchPassive(url):
+ if self._matchPassive(url):
urls.append(url)
return urls
diff --git a/app/services/coroutine_runner.py b/app/services/coroutine_runner.py
index a7309fe8..f03afcac 100644
--- a/app/services/coroutine_runner.py
+++ b/app/services/coroutine_runner.py
@@ -111,5 +111,3 @@ class CoroutineRunner(QThread):
self._pending.clear()
self._running.clear()
-
-coroutineRunner = CoroutineRunner()
diff --git a/app/services/feature_service.py b/app/services/feature_service.py
index a721f617..102266de 100644
--- a/app/services/feature_service.py
+++ b/app/services/feature_service.py
@@ -28,13 +28,16 @@ class FeatureService(QObject):
def packs(self) -> list[FeaturePack]:
return self._packs
- def load(self) -> None:
- for pack in loadPacks(executableDir / "features"):
+ def load(self, services=None) -> None:
+ for pack in loadPacks(executableDir / "features", services):
self._register(pack)
- def start(self) -> None:
- for pack in self._packs:
- pack.start()
+ def activate(self, coroutineRunner) -> None:
+ async def activateAll():
+ for pack in self._packs:
+ await pack.activate()
+
+ coroutineRunner.submit(activateAll())
def _register(self, pack: FeaturePack) -> None:
self._packs.append(pack)
@@ -63,9 +66,6 @@ class FeatureService(QObject):
for parser in self._parsers:
if parser.match(options):
task = await parser.parse(options)
- if not task.category:
- from app.services.category_service import categoryService
- task.category = categoryService.categoryOf(task)
return task
raise ValueError(f"No parser matched: {options.url}")
@@ -116,6 +116,19 @@ class FeatureService(QObject):
types.extend(pack.fileTypes())
return types
+ def isFileAssociationEnabled(self) -> bool:
+ return any(
+ pack.config.associateFileTypes.value
+ for pack in self._packs
+ if pack.config and hasattr(pack.config, "associateFileTypes")
+ )
+
+ def setFileAssociation(self, isEnabled: bool) -> None:
+ from app.config.cfg import cfg
+ for pack in self._packs:
+ if pack.config and hasattr(pack.config, "associateFileTypes"):
+ cfg.set(pack.config.associateFileTypes, isEnabled)
+
def _registerFileAssociations(self) -> None:
types = []
for pack in self._packs:
@@ -124,9 +137,14 @@ class FeatureService(QObject):
types.extend(pack.fileTypes())
file_association.register(types)
- def stop(self) -> None:
- for pack in self._packs:
- pack.stop()
+ def deactivate(self, coroutineRunner) -> None:
+ from PySide6.QtCore import QEventLoop
+
+ async def deactivateAll():
+ for pack in self._packs:
+ await pack.deactivate()
+ loop = QEventLoop()
+ coroutineRunner.submit(deactivateAll(), done=lambda _: loop.quit())
+ loop.exec()
-featureService = FeatureService()
diff --git a/app/services/pack_loader.py b/app/services/pack_loader.py
index 5dadcac5..1b3d72cf 100644
--- a/app/services/pack_loader.py
+++ b/app/services/pack_loader.py
@@ -16,6 +16,7 @@ if TYPE_CHECKING:
@dataclass(frozen=True)
class PackManifest:
name: str
+ className: str
entryPath: Path
folder: Path
dependencies: tuple[str, ...]
@@ -50,6 +51,11 @@ class PackManifest:
logger.warning("入口文件不存在: {}", packDir / entry)
return None
+ className = packSection.get("class")
+ if not isinstance(className, str) or not className.strip():
+ logger.warning("manifest 缺少 class 字段: {}", manifestPath)
+ return None
+
deps = packSection.get("dependencies", [])
if not isinstance(deps, list) or any(
not isinstance(d, str) or not d for d in deps
@@ -59,13 +65,14 @@ class PackManifest:
return cls(
name=packDir.name,
+ className=className,
entryPath=entryPath,
folder=packDir,
dependencies=tuple(deps),
)
-def loadPacks(featuresDir: Path) -> list[FeaturePack]:
+def loadPacks(featuresDir: Path, services=None) -> list[FeaturePack]:
if not featuresDir.exists():
logger.warning("features 目录不存在: {}", featuresDir)
return []
@@ -76,7 +83,7 @@ def loadPacks(featuresDir: Path) -> list[FeaturePack]:
if (m := PackManifest.fromDir(p)) is not None
]
ordered = orderedByDependency(manifests)
- return [pack for m in ordered if (pack := loadManifest(m)) is not None]
+ return [pack for m in ordered if (pack := loadManifest(m, services)) is not None]
def orderedByDependency(manifests: list[PackManifest]) -> list[PackManifest]:
@@ -115,9 +122,7 @@ def orderedByDependency(manifests: list[PackManifest]) -> list[PackManifest]:
return [m for m in ordered if m.name not in skipped]
-def loadManifest(manifest: PackManifest) -> FeaturePack | None:
- from app.models.pack import FeaturePack
-
+def loadManifest(manifest: PackManifest, services=None) -> FeaturePack | None:
moduleName = manifest.name
try:
spec = importlib.util.spec_from_file_location(
@@ -137,20 +142,14 @@ def loadManifest(manifest: PackManifest) -> FeaturePack | None:
sys.modules.pop(moduleName, None)
raise
- for attrName in dir(module):
- attr = getattr(module, attrName)
- if (
- isinstance(attr, type)
- and issubclass(attr, FeaturePack)
- and attr is not FeaturePack
- and attr.__module__ == moduleName
- ):
- pack = attr()
- logger.success("加载 FeaturePack: {}", moduleName)
- return pack
-
- logger.warning("未找到 FeaturePack 子类: {}", moduleName)
- return None
+ PackClass = getattr(module, manifest.className, None)
+ if PackClass is None:
+ logger.warning("未找到类 {}: {}", manifest.className, moduleName)
+ return None
+
+ pack = PackClass(services)
+ logger.success("加载 FeaturePack: {}", moduleName)
+ return pack
except Exception as e:
sys.modules.pop(moduleName, None)
diff --git a/app/services/plan.py b/app/services/plan.py
index 09439a34..95a1e09c 100644
--- a/app/services/plan.py
+++ b/app/services/plan.py
@@ -10,7 +10,8 @@ class PlanAction(IntEnum):
class Plan:
- def __init__(self):
+ def __init__(self, allCompleted):
+ self._allCompleted = allCompleted
self.action: PlanAction | None = None
self.filePath: str = ""
self._onCleared = None
@@ -31,9 +32,7 @@ class Plan:
def trigger(self) -> None:
if self.action is None:
return
- from app.models.task import TaskStatus
- from app.services.task_service import taskService
- if any(t.status != TaskStatus.COMPLETED for t in taskService.tasks):
+ if not self._allCompleted():
return
from app.platform.desktop import openFile, restart, shutdown, sleep
@@ -50,6 +49,3 @@ class Plan:
sleep()
else:
shutdown()
-
-
-plan = Plan()
diff --git a/app/services/runtime_status.py b/app/services/runtime_status.py
index b3b80265..ec6df9cf 100644
--- a/app/services/runtime_status.py
+++ b/app/services/runtime_status.py
@@ -23,8 +23,9 @@ class RuntimeStatus:
class RuntimeStatusService(QObject):
statusChanged = Signal(object)
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, parent=None):
super().__init__(parent)
+ self._coroutineRunner = coroutineRunner
self._statuses: dict[str, RuntimeStatus] = {}
self._workIds: dict[str, str] = {}
@@ -34,42 +35,44 @@ class RuntimeStatusService(QObject):
return status
return RuntimeStatus(runtime.runtimeId, runtime.name, path=runtime.path())
- def refresh(self, runtime: BinaryRuntime, force: bool = False) -> None:
- from app.services.coroutine_runner import coroutineRunner
-
+ def refreshStatus(self, runtime: BinaryRuntime) -> None:
runtimeId = runtime.runtimeId
- path = runtime.path()
current = self._statuses.get(runtimeId)
+ if current is not None and not current.isBusy:
+ path = runtime.path()
+ if current.path == path:
+ return
+ self._probe(runtime)
- if current is not None and current.path != path:
- force = True
-
+ def invalidate(self, runtime: BinaryRuntime) -> None:
+ runtimeId = runtime.runtimeId
workId = self._workIds.get(runtimeId)
if workId:
- if not force:
- return
- coroutineRunner.cancel(workId)
+ self._coroutineRunner.cancel(workId)
self._workIds.pop(runtimeId, None)
+ self._probe(runtime)
- if current is not None and not force and not current.isBusy:
- return
+ def _probe(self, runtime: BinaryRuntime) -> None:
+ runtimeId = runtime.runtimeId
+ path = runtime.path()
+ name = runtime.name
- status = RuntimeStatus(runtimeId, runtime.name, path=path, isBusy=True)
+ status = RuntimeStatus(runtimeId, name, path=path, isBusy=True)
self._statuses[runtimeId] = status
self.statusChanged.emit(status)
try:
- self._workIds[runtimeId] = coroutineRunner.submit(
+ self._workIds[runtimeId] = self._coroutineRunner.submit(
runtime.probeVersion(),
done=self._onProbeFinished,
failed=self._onProbeFailed,
runtimeId=runtimeId,
- name=runtime.name,
+ name=name,
path=path,
)
except Exception as e:
logger.opt(exception=e).error("runtime probe submit failed: {}", runtimeId)
- self._onProbeFailed(repr(e), runtimeId, runtime.name, path)
+ self._onProbeFailed(repr(e), runtimeId, name, path)
def _onProbeFinished(self, version: str, runtimeId: str, name: str, path: str) -> None:
self._workIds.pop(runtimeId, None)
@@ -83,5 +86,3 @@ class RuntimeStatusService(QObject):
self._statuses[runtimeId] = status
self.statusChanged.emit(status)
-
-runtimeStatusService = RuntimeStatusService()
diff --git a/app/services/speed_meter.py b/app/services/speed_meter.py
index 814db7b7..36dd88a7 100644
--- a/app/services/speed_meter.py
+++ b/app/services/speed_meter.py
@@ -37,5 +37,3 @@ class SpeedMeter(QObject):
self.speedChanged.emit(self._bytes)
self._bytes = 0
-
-speedMeter = SpeedMeter()
diff --git a/app/services/task_draft.py b/app/services/task_draft.py
index 73d9b184..90f18a3c 100644
--- a/app/services/task_draft.py
+++ b/app/services/task_draft.py
@@ -28,8 +28,10 @@ class TaskDraft(QObject):
itemsCleared = Signal()
taskConfirmed = Signal(object)
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, featureService, parent=None):
super().__init__(parent)
+ self._coroutineRunner = coroutineRunner
+ self._featureService = featureService
self._items: list[DraftItem] = []
self._baseOptions: dict[str, Any] = {}
@@ -59,8 +61,6 @@ class TaskDraft(QObject):
def setUrls(self, urls: list[str]) -> None:
from app.models.task import TaskOptions
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
previous = self._items
previousUrls = [item.url for item in previous]
@@ -73,14 +73,14 @@ class TaskDraft(QObject):
continue
for item in previous[oldStart:oldEnd]:
if item.parseId:
- coroutineRunner.cancel(item.parseId)
+ self._coroutineRunner.cancel(item.parseId)
item.parseId = ""
for url in urls[newStart:newEnd]:
item = DraftItem(url=url)
try:
options = TaskOptions.fromOptions({**self._baseOptions, "url": url})
- parseId = coroutineRunner.submit(
- featureService.parse(options),
+ parseId = self._coroutineRunner.submit(
+ self._featureService.parse(options),
done=self._onParsed,
failed=self._onParseFailed,
item=item,
@@ -98,8 +98,6 @@ class TaskDraft(QObject):
self.itemsChanged.emit()
def addParsedTasks(self, tasks: list[Task]) -> list[str]:
- from app.services.coroutine_runner import coroutineRunner
-
if not tasks:
return []
@@ -113,7 +111,7 @@ class TaskDraft(QObject):
if item.task is not None:
continue
if item.parseId:
- coroutineRunner.cancel(item.parseId)
+ self._coroutineRunner.cancel(item.parseId)
item.parseId = ""
else:
newUrls.append(url)
@@ -130,8 +128,6 @@ class TaskDraft(QObject):
return newUrls
def confirm(self) -> None:
- from app.services.coroutine_runner import coroutineRunner
-
for item in self._items:
if item.task is not None:
item.task.setOptions(self._buildOptions(item))
@@ -141,7 +137,7 @@ class TaskDraft(QObject):
for item in self._items:
if item.parseId and item.confirmedOptions is None:
- coroutineRunner.cancel(item.parseId)
+ self._coroutineRunner.cancel(item.parseId)
item.parseId = ""
self._items.clear()
@@ -149,10 +145,9 @@ class TaskDraft(QObject):
self.itemsCleared.emit()
def clear(self) -> None:
- from app.services.coroutine_runner import coroutineRunner
for item in self._items:
if item.parseId:
- coroutineRunner.cancel(item.parseId)
+ self._coroutineRunner.cancel(item.parseId)
item.parseId = ""
self._items.clear()
self.itemsCleared.emit()
diff --git a/app/services/task_service.py b/app/services/task_service.py
index 48963f96..2e189ad3 100644
--- a/app/services/task_service.py
+++ b/app/services/task_service.py
@@ -127,8 +127,11 @@ class TaskService(QObject):
fileDisappeared = Signal(object)
diskSpaceInsufficient = Signal(int, int)
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, categoryService, speedMeter, parent=None):
super().__init__(parent)
+ self._coroutineRunner = coroutineRunner
+ self._categoryService = categoryService
+ self._speedMeter = speedMeter
self._store = TaskStore()
self._queue = TaskQueue()
self._fileWatcher = QFileSystemWatcher(self)
@@ -171,11 +174,10 @@ class TaskService(QObject):
if task.taskId in self._store.tasks:
return
if cfg.isCategoryEnabled.value:
- from app.services.category_service import categoryService
if task.category is None:
- task.category = categoryService.categoryOf(task)
+ task.category = self._categoryService.categoryOf(task)
if task.category and task.outputFolder == Path(cfg.downloadFolder.value):
- folder = categoryService.folderOf(task.category)
+ folder = self._categoryService.folderOf(task.category)
if folder:
task.outputFolder = Path(folder)
task.deduplicateFilename()
@@ -305,11 +307,10 @@ class TaskService(QObject):
def _dispatch(self, task: Task) -> None:
from app.models.task import TaskStatus
- from app.services.coroutine_runner import coroutineRunner
task.setStatus(TaskStatus.RUNNING)
- workId = coroutineRunner.submit(
- task.run(),
+ workId = self._coroutineRunner.submit(
+ task.run(self._speedMeter.addSpeed, self._speedMeter.waitForSpeedLimit),
done=lambda _: self._onRunDone(task),
failed=lambda error: self._onRunFailed(task, error),
)
@@ -317,12 +318,10 @@ class TaskService(QObject):
self.taskStarted.emit(task)
def _cancelRun(self, task: Task, finished: Callable = None) -> None:
- from app.services.coroutine_runner import coroutineRunner
-
workId = self._queue.workIdOf(task.taskId)
self._queue.cancel(task.taskId)
if workId is not None:
- coroutineRunner.cancel(workId, finished=finished)
+ self._coroutineRunner.cancel(workId, finished=finished)
elif finished is not None:
finished()
@@ -383,5 +382,3 @@ class TaskService(QObject):
if task is not None:
self.fileDisappeared.emit(task)
-
-taskService = TaskService()
diff --git a/app/signal_bus.py b/app/signal_bus.py
index 16fad985..32cffc54 100644
--- a/app/signal_bus.py
+++ b/app/signal_bus.py
@@ -5,7 +5,6 @@ class SignalBus(QObject):
activationRequested = Signal()
openFileRequested = Signal(list)
exceptionCaught = Signal(str)
- updateAvailable = Signal(object)
signalBus = SignalBus()
diff --git a/app/startup.py b/app/startup.py
index 5610a841..f0935f23 100644
--- a/app/startup.py
+++ b/app/startup.py
@@ -2,10 +2,12 @@
from __future__ import annotations
-def loadEngine(application) -> None:
+def loadEngine(application):
from PySide6.QtCore import QTranslator
from app.config.cfg import cfg
- from app.services.coroutine_runner import coroutineRunner
+ from app.services.category_service import CategoryService
+ from app.services.coroutine_runner import CoroutineRunner
+ from app.services.speed_meter import SpeedMeter
import app.assets.resources # noqa: F401
@@ -14,59 +16,75 @@ def loadEngine(application) -> None:
translator.load(locale, "gd3", ".", ":/i18n")
application.installTranslator(translator)
+ coroutineRunner = CoroutineRunner(parent=application)
+ categoryService = CategoryService()
+ speedMeter = SpeedMeter(parent=application)
+
coroutineRunner.start()
+ return coroutineRunner, categoryService, speedMeter
-def loadPacks() -> None:
- from app.models.pack import PackConfig
- from app.services.feature_service import featureService
- featureService.load()
- PackConfig.load()
+def createServices(coroutineRunner, categoryService, speedMeter):
+ from app.services.aria2_rpc import Aria2RpcServer
+ from app.services.browser_service import BrowserService
+ from app.services.feature_service import FeatureService
+ from app.services.runtime_status import RuntimeStatusService
+ from app.services.task_service import TaskService
+
+ featureService = FeatureService()
+ taskService = TaskService(coroutineRunner, categoryService, speedMeter)
+ browserService = BrowserService(coroutineRunner, taskService, parse=featureService.parse)
+ aria2RpcServer = Aria2RpcServer(coroutineRunner, parse=featureService.parse, addTask=taskService.add)
+ runtimeStatusService = RuntimeStatusService(coroutineRunner)
+
+ return featureService, taskService, browserService, aria2RpcServer, runtimeStatusService
-def startEngine() -> None:
- from app.services.feature_service import featureService
- from app.services.speed_meter import speedMeter
- from app.services.task_service import taskService
+def loadPacks(featureService, coroutineRunner, speedMeter, taskService, categoryService, runtimeStatusService):
+ from app.models.pack import PackConfig, PackServices
+ services = PackServices(
+ coroutineRunner=coroutineRunner,
+ speedMeter=speedMeter,
+ taskService=taskService,
+ featureService=featureService,
+ categoryService=categoryService,
+ runtimeStatusService=runtimeStatusService,
+ )
+ featureService.load(services)
+ PackConfig.load()
+
+
+def startEngine(taskService, speedMeter, featureService, coroutineRunner):
taskService.taskStarted.connect(lambda _: speedMeter.start())
taskService.tasksAllCompleted.connect(speedMeter.stop)
taskService.resumeSaved()
- featureService.start()
+ featureService.activate(coroutineRunner)
-def bindNotifications(notifyCompleted, notifyDiskSpace) -> None:
- from app.services.task_service import taskService
+def bindNotifications(taskService, notifyCompleted, notifyDiskSpace):
taskService.taskCompleted.connect(notifyCompleted)
taskService.diskSpaceInsufficient.connect(notifyDiskSpace)
-def checkUpdateAtStartup() -> None:
+def checkUpdateAtStartup(coroutineRunner, onUpdateAvailable):
from app.config.cfg import cfg
if not cfg.shouldCheckUpdateAtStartup.value:
return
- from app.services.coroutine_runner import coroutineRunner
- from app.signal_bus import signalBus
from app.update import fetchRelease, isOutdated
def _onFetched(release):
if isOutdated(release):
- signalBus.updateAvailable.emit(release)
+ onUpdateAvailable(release)
coroutineRunner.submit(fetchRelease(), done=_onFetched)
-def stopEngine() -> None:
- from app.services.aria2_rpc import aria2RpcServer
- from app.services.browser_service import browserService
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
- from app.services.task_service import taskService
-
+def stopEngine(taskService, browserService, aria2RpcServer, featureService, coroutineRunner):
taskService.stop()
taskService.flush()
browserService.stop()
aria2RpcServer.stop()
- featureService.stop()
+ featureService.deactivate(coroutineRunner)
coroutineRunner.stop()
diff --git a/app/update.py b/app/update.py
index 96f71e47..1d77b6e5 100644
--- a/app/update.py
+++ b/app/update.py
@@ -151,14 +151,14 @@ def assetScore(name: str) -> int:
return score
-def showReleaseDialog(release: Release, parent: QWidget) -> None:
+def showReleaseDialog(release: Release, parent: QWidget, coroutineRunner, featureService, taskService) -> None:
from app.view.dialogs.release_info import ReleaseInfoDialog
dialog = ReleaseInfoDialog(release, parent)
- dialog.accepted.connect(lambda: addAssetTask(dialog.selectedAsset(), parent))
+ dialog.accepted.connect(lambda: addAssetTask(dialog.selectedAsset(), parent, coroutineRunner, featureService, taskService))
dialog.open()
-def addBestAssetTask(release: Release, parent: QWidget) -> None:
+def addBestAssetTask(release: Release, parent: QWidget, coroutineRunner, featureService, taskService) -> None:
from qfluentwidgets import InfoBar, InfoBarPosition
asset = bestAsset(release)
if asset is None:
@@ -167,17 +167,14 @@ def addBestAssetTask(release: Release, parent: QWidget) -> None:
parent.tr("请在版本详情中手动选择"),
duration=3000, position=InfoBarPosition.BOTTOM_RIGHT, parent=parent,
)
- showReleaseDialog(release, parent)
+ showReleaseDialog(release, parent, coroutineRunner, featureService, taskService)
return
- addAssetTask(asset, parent)
+ addAssetTask(asset, parent, coroutineRunner, featureService, taskService)
-def addAssetTask(asset: ReleaseAsset, parent: QWidget) -> None:
+def addAssetTask(asset: ReleaseAsset, parent: QWidget, coroutineRunner, featureService, taskService) -> None:
from qfluentwidgets import InfoBar, InfoBarPosition
from app.models.task import TaskOptions
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
- from app.services.task_service import taskService
coroutineRunner.submit(
featureService.parse(TaskOptions(url=asset.downloadUrl)),
done=taskService.add,
diff --git a/app/view/cards/draft_cards.py b/app/view/cards/draft_cards.py
index 73e1f9e2..49e6e5e9 100644
--- a/app/view/cards/draft_cards.py
+++ b/app/view/cards/draft_cards.py
@@ -7,7 +7,7 @@ from PySide6.QtGui import QColor, QPainter
from PySide6.QtWidgets import QFileIconProvider, QHBoxLayout, QWidget
from qfluentwidgets import (
Action, BodyLabel, FluentIcon, ImageLabel, LineEdit, RoundMenu,
- TransparentToolButton, ToolTipFilter, isDarkTheme,
+ ToolTipFilter, TransparentToolButton, isDarkTheme,
)
from app.config.cfg import cfg
@@ -22,9 +22,10 @@ class DraftCard(QWidget):
categoryPicked = Signal(str)
editRequested = Signal()
- def __init__(self, task: Task, parent=None):
+ def __init__(self, task: Task, categoryService, parent=None):
super().__init__(parent)
self._task = task
+ self._categoryService = categoryService
self.iconLabel = ImageLabel(self)
self.iconLabel.setImage(QFileIconProvider().icon(QFileInfo(task.name)).pixmap(16, 16))
@@ -94,8 +95,7 @@ class DraftCard(QWidget):
if not cfg.isCategoryEnabled.value:
self.categoryButton.hide()
return
- from app.services.category_service import categoryService
- category = categoryService.categoryById(self._task.category)
+ category = self._categoryService.categoryById(self._task.category)
if category:
self.categoryButton.setIcon(category.toIcon())
self.categoryButton.setToolTip(category.name)
@@ -105,13 +105,12 @@ class DraftCard(QWidget):
self.categoryButton.show()
def _showCategoryMenu(self) -> None:
- from app.services.category_service import categoryService
menu = RoundMenu(parent=self)
uncategorized = Action(FluentIcon.TAG, self.tr("未分类"), self)
uncategorized.triggered.connect(lambda: self._onCategoryPicked(""))
menu.addAction(uncategorized)
menu.addSeparator()
- for category in categoryService.categories():
+ for category in self._categoryService.categories():
cid = category.categoryId
icon = category.toIcon()
action = Action(icon, category.name, self)
@@ -133,5 +132,38 @@ class DraftCard(QWidget):
painter.fillRect(0, 0, self.width(), 1, QColor(0, 0, 0, 96 if isDarkTheme() else 24))
-class UniversalDraftCard(DraftCard):
- pass
+class MultiFileDraftCard(DraftCard):
+
+ def _initWidget(self) -> None:
+ super()._initWidget()
+ self._selectFilesButton = None
+ if self._task.files and len(self._task.files) > 1:
+ self._selectFilesButton = TransparentToolButton(FluentIcon.LIBRARY, self)
+ self._selectFilesButton.setFixedSize(28, 28)
+ self._selectFilesButton.setToolTip(self.tr("选择文件"))
+ self._selectFilesButton.installEventFilter(ToolTipFilter(self._selectFilesButton))
+ self._refreshSummary()
+
+ def _initLayout(self) -> None:
+ super()._initLayout()
+ if self._selectFilesButton is not None:
+ self.layout().addWidget(self._selectFilesButton)
+
+ def _bind(self) -> None:
+ super()._bind()
+ if self._selectFilesButton is not None:
+ self._selectFilesButton.clicked.connect(self._onSelectFilesClicked)
+
+ def _onSelectFilesClicked(self) -> None:
+ raise NotImplementedError
+
+ def _refreshSummary(self) -> None:
+ if not self._task.files or len(self._task.files) <= 1:
+ self.sizeLabel.setText(toReadableSize(self._task.fileSize))
+ return
+ selected = sum(1 for f in self._task.files if f.selected)
+ self.sizeLabel.setText(
+ self.tr("{0}/{1} 个文件 · {2}").format(
+ selected, len(self._task.files), toReadableSize(self._task.fileSize)
+ )
+ )
diff --git a/app/view/cards/task_cards.py b/app/view/cards/task_cards.py
index 089531b3..bc8dd03f 100644
--- a/app/view/cards/task_cards.py
+++ b/app/view/cards/task_cards.py
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
from PySide6.QtCore import QPoint, Signal, Qt
from PySide6.QtGui import QColor, QPainter, QPen
-from PySide6.QtWidgets import QHBoxLayout, QVBoxLayout, QApplication
+from PySide6.QtWidgets import QHBoxLayout, QVBoxLayout, QApplication, QWidget
from qfluentwidgets import (
Action, CardWidget, CheckBox, FluentIcon, ImageLabel,
IndeterminateProgressBar, PrimaryToolButton, ProgressBar,
@@ -17,7 +17,6 @@ from app.config.cfg import cfg
from app.format import toReadableSize, toReadableTime
from app.models.task import TaskStatus, SpecialFileSize
from app.platform.desktop import openFile, revealInFolder
-from app.services.task_service import taskService
from app.view.components.labels import IconBodyLabel, IconStrongBodyLabel
if TYPE_CHECKING:
@@ -29,139 +28,27 @@ class TaskCard(CardWidget):
selectionChanged = Signal(bool, bool)
dragRequested = Signal(str)
- def __init__(self, task: Task, parent=None):
+ def __init__(self, task: Task, taskService, featureService, categoryService, parent=None):
super().__init__(parent)
self._task = task
+ self._taskService = taskService
+ self._featureService = featureService
+ self._categoryService = categoryService
self._isSelectionMode = False
self._isFileMissing = False
self._isDragPending = False
self._hasDragged = False
self._dragStartPos = QPoint()
+ self._lastStatus: TaskStatus | None = None
+ self._hashDigest: str = ""
+
+ self.setFixedHeight(self.ROW_HEIGHT)
self.checkBox = CheckBox(self)
self.checkBox.setFixedSize(23, 23)
self.checkBox.setVisible(False)
self.checkBox.clicked.connect(lambda checked: self.selectionChanged.emit(checked, False))
- @property
- def task(self) -> Task:
- return self._task
-
- def refresh(self, force: bool = False) -> None:
- pass
-
- def setSelectionMode(self, enter: bool) -> None:
- self._isSelectionMode = enter
- self.checkBox.setVisible(enter)
- if not enter:
- self.checkBox.setChecked(False)
- self.update()
-
- def isChecked(self) -> bool:
- return self.checkBox.isChecked()
-
- def setChecked(self, checked: bool) -> None:
- if checked != self.isChecked():
- self.checkBox.setChecked(checked)
- self.update()
-
- def buildContextMenu(self) -> RoundMenu:
- menu = RoundMenu(parent=self)
-
- copyUrl = Action(FluentIcon.COPY, self.tr("复制下载链接"), self)
- copyUrl.triggered.connect(lambda: QApplication.clipboard().setText(self._task.url))
- menu.addAction(copyUrl)
-
- if self._task.canEdit and self._task.status != TaskStatus.COMPLETED:
- edit = Action(FluentIcon.EDIT, self.tr("编辑任务参数..."), self)
- edit.triggered.connect(self._onEditClicked)
- menu.addAction(edit)
-
- redownload = Action(FluentIcon.UPDATE, self.tr("重新下载"), self)
- redownload.triggered.connect(lambda: taskService.redownload(self._task))
- menu.addAction(redownload)
-
- if cfg.isCategoryEnabled.value:
- from app.services.category_service import categoryService
- moveMenu = RoundMenu(self.tr("移动到分类"), self)
- moveMenu.setIcon(FluentIcon.TAG)
- uncategorized = Action(FluentIcon.MORE, self.tr("未分类"), self)
- uncategorized.triggered.connect(lambda: taskService.setCategory(self._task, ""))
- moveMenu.addAction(uncategorized)
- moveMenu.addSeparator()
- for category in categoryService.categories():
- cid = category.categoryId
- action = Action(category.toIcon(), category.name, self)
- action.triggered.connect(lambda checked=False, c=cid: taskService.setCategory(self._task, c))
- moveMenu.addAction(action)
- menu.addMenu(moveMenu)
-
- return menu
-
- def _onEditClicked(self) -> None:
- from app.services.feature_service import featureService
- from app.view.dialogs.edit_task import LiveEditDialog
- LiveEditDialog(self._task, featureService.editCards(self._task, self.window()), self.window()).exec()
- self.refresh()
-
- def _canDrag(self) -> bool:
- return (self._task.status == TaskStatus.COMPLETED
- and self._task.hasOutputFile
- and Path(self._task.outputPath).exists())
-
- def mousePressEvent(self, e) -> None:
- super().mousePressEvent(e)
- self._hasDragged = False
- if e.button() == Qt.MouseButton.LeftButton and self._canDrag():
- self._isDragPending = True
- self._dragStartPos = e.position().toPoint()
-
- def mouseMoveEvent(self, e) -> None:
- if self._isDragPending:
- if (e.position().toPoint() - self._dragStartPos).manhattanLength() >= QApplication.startDragDistance():
- self._isDragPending = False
- self._hasDragged = True
- self.dragRequested.emit(self._task.taskId)
- return
- super().mouseMoveEvent(e)
-
- def mouseReleaseEvent(self, e) -> None:
- self._isDragPending = False
- super().mouseReleaseEvent(e)
- if e.button() == Qt.MouseButton.LeftButton and not self._hasDragged:
- extend = bool(e.modifiers() & Qt.KeyboardModifier.ShiftModifier)
- checked = True if extend or not self._isSelectionMode else not self.isChecked()
- self.selectionChanged.emit(checked, extend)
-
- def mouseDoubleClickEvent(self, e) -> None:
- super().mouseDoubleClickEvent(e)
- if e.button() == Qt.MouseButton.LeftButton:
- openFile(self._task.outputPath)
-
- def contextMenuEvent(self, e) -> None:
- menu = self.buildContextMenu()
- menu.exec(e.globalPos())
- e.accept()
-
- def paintEvent(self, e) -> None:
- if self._isSelectionMode and self.isChecked():
- painter = QPainter(self)
- painter.setRenderHints(QPainter.RenderHint.Antialiasing)
- r = self.borderRadius
- painter.setPen(QPen(themeColor(), 2))
- painter.setBrush(QColor(255, 255, 255, 15) if isDarkTheme() else QColor(0, 0, 0, 8))
- painter.drawRoundedRect(self.rect().adjusted(2, 2, -2, -2), r, r)
- super().paintEvent(e)
-
-
-class UniversalTaskCard(TaskCard):
-
- def __init__(self, task: Task, parent=None):
- super().__init__(task, parent)
- self.setFixedHeight(self.ROW_HEIGHT)
- self._lastStatus: TaskStatus | None = None
- self._hashDigest: str = ""
-
self.iconLabel = ImageLabel(self)
self.nameLabel = IconStrongBodyLabel(task.name, self)
self.speedLabel = IconBodyLabel("", FluentIcon.SPEED_HIGH, self)
@@ -182,6 +69,10 @@ class UniversalTaskCard(TaskCard):
self._refreshIcon()
self._refreshCategoryIcon()
+ @property
+ def task(self) -> Task:
+ return self._task
+
def _buildProgressBar(self) -> QWidget:
if self._task.fileSize in {SpecialFileSize.UNKNOWN, SpecialFileSize.NOT_SUPPORTED}:
return IndeterminateProgressBar(self)
@@ -189,6 +80,9 @@ class UniversalTaskCard(TaskCard):
bar.setCustomBackgroundColor(QColor(0, 0, 0, 0), QColor(0, 0, 0, 0))
return bar
+ def _infoWidgets(self) -> list[QWidget]:
+ return []
+
def _initWidget(self) -> None:
from PySide6.QtWidgets import QSizePolicy
self.iconLabel.setFixedSize(48, 48)
@@ -204,6 +98,8 @@ class UniversalTaskCard(TaskCard):
def _initLayout(self) -> None:
infoLayout = QHBoxLayout()
infoLayout.addWidget(self.speedLabel)
+ for widget in self._infoWidgets():
+ infoLayout.addWidget(widget)
infoLayout.addWidget(self.etaLabel)
infoLayout.addWidget(self.sizeLabel)
infoLayout.addWidget(self.statusLabel)
@@ -232,9 +128,8 @@ class UniversalTaskCard(TaskCard):
self.openFolderButton.clicked.connect(lambda: revealInFolder(self._task.outputPath))
self.deleteButton.clicked.connect(self._onDeleteClicked)
- from app.services.category_service import categoryService
cfg.isCategoryEnabled.valueChanged.connect(self._refreshCategoryIcon)
- categoryService.categoriesChanged.connect(self._refreshCategoryIcon)
+ self._categoryService.categoriesChanged.connect(self._refreshCategoryIcon)
def refresh(self, force: bool = False) -> None:
if not force and self._lastStatus == self._task.status and self._task.status != TaskStatus.RUNNING:
@@ -253,12 +148,11 @@ class UniversalTaskCard(TaskCard):
if task.status == TaskStatus.RUNNING:
self.progressBar.setError(False)
- if self.statusLabel.isVisible():
- self.statusLabel.hide()
- self.progressBar.show()
- self.speedLabel.show()
- self.etaLabel.show()
- self.sizeLabel.show()
+ self.statusLabel.hide()
+ self.progressBar.show()
+ self.speedLabel.show()
+ self.etaLabel.show()
+ self.sizeLabel.show()
self.speedLabel.setText(f"{toReadableSize(speed)}/s")
if task.fileSize > 0 and speed > 0:
self.etaLabel.setText(toReadableTime(int((task.fileSize - receivedBytes) / speed)))
@@ -325,8 +219,7 @@ class UniversalTaskCard(TaskCard):
if not cfg.isCategoryEnabled.value or not self._task.category:
self.nameLabel.setIcon(None)
return
- from app.services.category_service import categoryService
- category = categoryService.categoryById(self._task.category)
+ category = self._categoryService.categoryById(self._task.category)
if category is None:
self.nameLabel.setIcon(None)
return
@@ -350,9 +243,9 @@ class UniversalTaskCard(TaskCard):
def _onToggleClicked(self) -> None:
if self._task.status == TaskStatus.RUNNING:
- taskService.pause(self._task)
+ self._taskService.pause(self._task)
else:
- taskService.start(self._task)
+ self._taskService.start(self._task)
self.refresh()
def _onDeleteClicked(self) -> None:
@@ -363,7 +256,7 @@ class UniversalTaskCard(TaskCard):
dialog.textLayout.addWidget(deleteFiles)
if dialog.exec():
cfg.set(cfg.shouldDeleteFilesOnRemove, deleteFiles.isChecked())
- taskService.delete(self._task, deleteFiles.isChecked())
+ self._taskService.delete(self._task, deleteFiles.isChecked())
def _onVerifyHashClicked(self) -> None:
if not Path(self._task.outputPath).is_file():
@@ -379,14 +272,139 @@ class UniversalTaskCard(TaskCard):
self._hashDigest = f"{algorithm}: {digest}"
self._showStatus(self._hashDigest)
+ def _onEditClicked(self) -> None:
+ from app.view.dialogs.edit_task import LiveEditDialog
+ LiveEditDialog(self._task, self._featureService.editCards(self._task, self.window()), self.window()).exec()
+ self.refresh()
+
+ def setSelectionMode(self, enter: bool) -> None:
+ self._isSelectionMode = enter
+ self.checkBox.setVisible(enter)
+ if not enter:
+ self.checkBox.setChecked(False)
+ self.update()
+
+ def isChecked(self) -> bool:
+ return self.checkBox.isChecked()
+
+ def setChecked(self, checked: bool) -> None:
+ if checked != self.isChecked():
+ self.checkBox.setChecked(checked)
+ self.update()
+
def buildContextMenu(self) -> RoundMenu:
- menu = super().buildContextMenu()
+ menu = RoundMenu(parent=self)
+
+ copyUrl = Action(FluentIcon.COPY, self.tr("复制下载链接"), self)
+ copyUrl.triggered.connect(lambda: QApplication.clipboard().setText(self._task.url))
+ menu.addAction(copyUrl)
+
if self._hashDigest:
copyHash = Action(FluentIcon.FINGERPRINT, self.tr("复制校验值"), self)
copyHash.triggered.connect(lambda: QApplication.clipboard().setText(self._hashDigest))
- menu.insertAction(menu.actions()[1], copyHash)
+ menu.addAction(copyHash)
+
+ if self._task.canEdit and self._task.status != TaskStatus.COMPLETED:
+ edit = Action(FluentIcon.EDIT, self.tr("编辑任务参数..."), self)
+ edit.triggered.connect(self._onEditClicked)
+ menu.addAction(edit)
+
+ redownload = Action(FluentIcon.UPDATE, self.tr("重新下载"), self)
+ redownload.triggered.connect(lambda: self._taskService.redownload(self._task))
+ menu.addAction(redownload)
+
+ if cfg.isCategoryEnabled.value:
+ moveMenu = RoundMenu(self.tr("移动到分类"), self)
+ moveMenu.setIcon(FluentIcon.TAG)
+ uncategorized = Action(FluentIcon.MORE, self.tr("未分类"), self)
+ uncategorized.triggered.connect(lambda: self._taskService.setCategory(self._task, ""))
+ moveMenu.addAction(uncategorized)
+ moveMenu.addSeparator()
+ for category in self._categoryService.categories():
+ cid = category.categoryId
+ action = Action(category.toIcon(), category.name, self)
+ action.triggered.connect(lambda checked=False, c=cid: self._taskService.setCategory(self._task, c))
+ moveMenu.addAction(action)
+ menu.addMenu(moveMenu)
+
return menu
+ def _canDrag(self) -> bool:
+ return (self._task.status == TaskStatus.COMPLETED
+ and self._task.hasOutputFile
+ and Path(self._task.outputPath).exists())
+
+ def mousePressEvent(self, e) -> None:
+ super().mousePressEvent(e)
+ self._hasDragged = False
+ if e.button() == Qt.MouseButton.LeftButton and self._canDrag():
+ self._isDragPending = True
+ self._dragStartPos = e.position().toPoint()
+
+ def mouseMoveEvent(self, e) -> None:
+ if self._isDragPending:
+ if (e.position().toPoint() - self._dragStartPos).manhattanLength() >= QApplication.startDragDistance():
+ self._isDragPending = False
+ self._hasDragged = True
+ self.dragRequested.emit(self._task.taskId)
+ return
+ super().mouseMoveEvent(e)
+
+ def mouseReleaseEvent(self, e) -> None:
+ self._isDragPending = False
+ super().mouseReleaseEvent(e)
+ if e.button() == Qt.MouseButton.LeftButton and not self._hasDragged:
+ extend = bool(e.modifiers() & Qt.KeyboardModifier.ShiftModifier)
+ checked = True if extend or not self._isSelectionMode else not self.isChecked()
+ self.selectionChanged.emit(checked, extend)
+
+ def mouseDoubleClickEvent(self, e) -> None:
+ super().mouseDoubleClickEvent(e)
+ if e.button() == Qt.MouseButton.LeftButton:
+ openFile(self._task.outputPath)
+
+ def contextMenuEvent(self, e) -> None:
+ menu = self.buildContextMenu()
+ menu.exec(e.globalPos())
+ e.accept()
+
+ def paintEvent(self, e) -> None:
+ if self._isSelectionMode and self.isChecked():
+ painter = QPainter(self)
+ painter.setRenderHints(QPainter.RenderHint.Antialiasing)
+ r = self.borderRadius
+ painter.setPen(QPen(themeColor(), 2))
+ painter.setBrush(QColor(255, 255, 255, 15) if isDarkTheme() else QColor(0, 0, 0, 8))
+ painter.drawRoundedRect(self.rect().adjusted(2, 2, -2, -2), r, r)
+ super().paintEvent(e)
+
def resizeEvent(self, e) -> None:
self.progressBar.setGeometry(4, self.height() - 4, self.width() - 8, 4)
super().resizeEvent(e)
+
+
+class MultiFileTaskCard(TaskCard):
+
+ def __init__(self, task: Task, parent=None):
+ super().__init__(task, parent)
+ self.selectFilesButton = None
+ if task.files and len(task.files) > 1:
+ self.selectFilesButton = ToolButton(FluentIcon.LIBRARY, self)
+ self.hBoxLayout.insertWidget(
+ self.hBoxLayout.indexOf(self.verifyHashButton),
+ self.selectFilesButton,
+ )
+ self.selectFilesButton.clicked.connect(self._onSelectFilesClicked)
+
+ def _onSelectFilesClicked(self) -> None:
+ raise NotImplementedError
+
+ def refresh(self, force: bool = False) -> None:
+ super().refresh(force=force)
+ if (self._task.files and self.selectFilesButton is not None
+ and not self._isFileMissing
+ and self._task.status in {TaskStatus.WAITING, TaskStatus.COMPLETED}):
+ selected = sum(1 for f in self._task.files if f.selected)
+ self.statusLabel.setText(
+ self.tr("{0}/{1} 个文件").format(selected, len(self._task.files))
+ )
diff --git a/app/view/components/category_settings.py b/app/view/components/category_settings.py
index da2c643d..46acfc9a 100644
--- a/app/view/components/category_settings.py
+++ b/app/view/components/category_settings.py
@@ -7,7 +7,7 @@ from qfluentwidgets import (
from app.view.components.setting_card_group import CollapsibleSettingCard
-from app.services.category_service import Category, categoryService
+from app.services.category_service import Category
class CategoryRowWidget(QWidget):
@@ -62,13 +62,14 @@ class CategoryRowWidget(QWidget):
class CategoryRulesCard(CollapsibleSettingCard):
- def __init__(self, parent=None):
+ def __init__(self, categoryService, parent=None):
super().__init__(
FluentIcon.TAG,
self.tr("下载分类规则"),
self.tr("根据扩展名自动归类,可为分类指定下载文件夹"),
parent,
)
+ self._categoryService = categoryService
self._rowWidgets: list[CategoryRowWidget] = []
self.buttonContainer = QWidget(self.view)
self.buttonLayout = QHBoxLayout(self.buttonContainer)
@@ -90,7 +91,7 @@ class CategoryRulesCard(CollapsibleSettingCard):
def _bind(self) -> None:
self.addButton.clicked.connect(self._onAddClicked)
self.resetButton.clicked.connect(self._onResetClicked)
- categoryService.categoriesChanged.connect(self._reload)
+ self._categoryService.categoriesChanged.connect(self._reload)
def _reload(self) -> None:
for row in self._rowWidgets:
@@ -99,7 +100,7 @@ class CategoryRulesCard(CollapsibleSettingCard):
self._rowWidgets.clear()
self.viewLayout.removeWidget(self.buttonContainer)
- for category in categoryService.categories():
+ for category in self._categoryService.categories():
row = CategoryRowWidget(category, self.view)
row.editRequested.connect(self._onEditClicked)
row.removeRequested.connect(self._onRemoveClicked)
@@ -113,19 +114,19 @@ class CategoryRulesCard(CollapsibleSettingCard):
from app.view.dialogs.category_edit import CategoryEditDialog
dialog = CategoryEditDialog(self.window())
if dialog.exec():
- categoryService.addCategory(dialog.category())
+ self._categoryService.addCategory(dialog.category())
def _onEditClicked(self, categoryId: str) -> None:
- category = categoryService.categoryById(categoryId)
+ category = self._categoryService.categoryById(categoryId)
if category is None:
return
from app.view.dialogs.category_edit import CategoryEditDialog
dialog = CategoryEditDialog(self.window(), category=category)
if dialog.exec():
- categoryService.updateCategory(dialog.category())
+ self._categoryService.updateCategory(dialog.category())
def _onRemoveClicked(self, categoryId: str) -> None:
- categoryService.removeCategory(categoryId)
+ self._categoryService.removeCategory(categoryId)
def _onResetClicked(self) -> None:
- categoryService.reset()
+ self._categoryService.reset()
diff --git a/app/view/components/setting_cards.py b/app/view/components/setting_cards.py
index 4b8ee69f..1f34256d 100644
--- a/app/view/components/setting_cards.py
+++ b/app/view/components/setting_cards.py
@@ -135,10 +135,11 @@ class LineEditSettingCard(SettingCard):
class ProxySettingCard(CollapsibleSettingCard):
- def __init__(self, configItem: ConfigItem, parent=None):
+ def __init__(self, configItem: ConfigItem, featureService=None, parent=None):
super().__init__(FluentIcon.GLOBE, self.tr("代理"),
self.tr("设置下载时希望使用的代理"), parent=parent)
self._configItem = configItem
+ self._featureService = featureService
self.choiceLabel = BodyLabel(self)
self.radioWidget = QWidget(self.view)
@@ -284,9 +285,8 @@ class ProxySettingCard(CollapsibleSettingCard):
if scheme == "socks5h":
scheme = "socks5"
if scheme:
- from app.services.feature_service import featureService
incompatible = [
- p.packId.upper() for p in featureService.packs
+ p.packId.upper() for p in self._featureService.packs
if p.proxySchemes is not None and scheme not in p.proxySchemes
]
if incompatible:
@@ -669,10 +669,13 @@ class SelectFileCard(SettingCard):
class RuntimeCard(SettingCard):
- def __init__(self, runtime, parent=None):
+ def __init__(self, runtimeStatusService, coroutineRunner, taskService,
+ runtime, parent=None):
from app.models.pack import BinaryRuntime
- from app.services.runtime_status import runtimeStatusService
+ self._runtimeStatusService = runtimeStatusService
+ self._coroutineRunner = coroutineRunner
+ self._taskService = taskService
self._runtime: BinaryRuntime = runtime
super().__init__(FluentIcon.INFO, runtime.name, self.tr("正在检测运行时..."), parent)
@@ -682,7 +685,7 @@ class RuntimeCard(SettingCard):
self._initWidget()
self._initLayout()
self._bind()
- self.updateStatus(runtimeStatusService.status(runtime))
+ self.updateStatus(self._runtimeStatusService.status(runtime))
def _initWidget(self) -> None:
if not self._runtime.canInstall:
@@ -697,16 +700,12 @@ class RuntimeCard(SettingCard):
self.hBoxLayout.addSpacing(16)
def _bind(self) -> None:
- from app.services.runtime_status import runtimeStatusService
-
- runtimeStatusService.statusChanged.connect(self._onRuntimeStatusChanged)
+ self._runtimeStatusService.statusChanged.connect(self._onRuntimeStatusChanged)
self.installButton.clicked.connect(self._onInstallClicked)
self.refreshButton.clicked.connect(self._onRefreshClicked)
- def refreshStatus(self, force: bool = False) -> None:
- from app.services.runtime_status import runtimeStatusService
-
- runtimeStatusService.refresh(self._runtime, force=force)
+ def refreshStatus(self) -> None:
+ self._runtimeStatusService.refreshStatus(self._runtime)
def updateStatus(self, status) -> None:
self.refreshButton.setEnabled(not status.isBusy)
@@ -722,7 +721,7 @@ class RuntimeCard(SettingCard):
self.setContent(self.tr("未检测到可用的 {0}").format(status.name))
def _onRefreshClicked(self, *_args) -> None:
- self.refreshStatus(force=True)
+ self._runtimeStatusService.invalidate(self._runtime)
def _onInstallFolderChanged(self, *_args) -> None:
self.refreshStatus()
@@ -732,16 +731,14 @@ class RuntimeCard(SettingCard):
self.updateStatus(status)
def _onInstallClicked(self) -> None:
- from app.services.coroutine_runner import coroutineRunner
-
self.installButton.setEnabled(False)
cardRef = weakref.ref(self)
+ _taskService = self._taskService
def onCreated(task) -> None:
from shiboken6 import isValid
- from app.services.task_service import taskService
- taskService.add(task)
+ _taskService.add(task)
card = cardRef()
if card is not None and isValid(card):
card.installButton.setEnabled(True)
@@ -760,7 +757,7 @@ class RuntimeCard(SettingCard):
if card is not None and isValid(card):
card._onInstallTaskFailed(error)
- coroutineRunner.submit(self._runtime.installTask(), done=onCreated, failed=onFailed)
+ self._coroutineRunner.submit(self._runtime.installTask(), done=onCreated, failed=onFailed)
def _onInstallTaskFailed(self, error: str) -> None:
self.installButton.setEnabled(True)
diff --git a/app/view/dialogs/edit_task.py b/app/view/dialogs/edit_task.py
index 843a33d2..8abd538a 100644
--- a/app/view/dialogs/edit_task.py
+++ b/app/view/dialogs/edit_task.py
@@ -47,28 +47,28 @@ class DraftEditDialog(EditTaskDialog):
class LiveEditDialog(EditTaskDialog):
- def __init__(self, task: Task, cards: list[QWidget], parent=None):
+ def __init__(self, task: Task, cards: list[QWidget], coroutineRunner, featureService, taskService, parent=None):
super().__init__(task, cards, parent)
+ self._coroutineRunner = coroutineRunner
+ self._featureService = featureService
+ self._taskService = taskService
self._pendingParseId: str = ""
def accept(self):
from app.models.task import TaskOptions
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
options = self.cardGroup.options()
newUrl = options.pop("url", "").strip()
if not newUrl or newUrl == self._task.url:
- from app.services.task_service import taskService
- taskService.edit(self._task, options)
+ self._taskService.edit(self._task, options)
super().accept()
return
self._setInteractive(False)
taskOptions = TaskOptions.fromOptions({**options, "url": newUrl})
- self._pendingParseId = coroutineRunner.submit(
- featureService.parse(taskOptions),
+ self._pendingParseId = self._coroutineRunner.submit(
+ self._featureService.parse(taskOptions),
done=self._onReparsed,
failed=self._onReparseFailed,
options=options,
@@ -82,9 +82,7 @@ class LiveEditDialog(EditTaskDialog):
def _cancelPendingParse(self, *_args) -> None:
if not self._pendingParseId:
return
- from app.services.coroutine_runner import coroutineRunner
-
- coroutineRunner.cancel(self._pendingParseId)
+ self._coroutineRunner.cancel(self._pendingParseId)
self._pendingParseId = ""
def _setInteractive(self, enabled: bool) -> None:
@@ -92,12 +90,10 @@ class LiveEditDialog(EditTaskDialog):
self.yesButton.setEnabled(enabled)
def _onReparsed(self, newTask: Task, options: dict) -> None:
- from app.services.task_service import taskService
-
self._pendingParseId = ""
if self._task.canReuseProgress(newTask):
- taskService.edit(self._task, options, newTask)
+ self._taskService.edit(self._task, options, newTask)
super().accept()
return
@@ -114,7 +110,7 @@ class LiveEditDialog(EditTaskDialog):
self._setInteractive(True)
return
- taskService.edit(self._task, options, newTask)
+ self._taskService.edit(self._task, options, newTask)
super().accept()
def _onReparseFailed(self, error: str, **_) -> None:
diff --git a/app/view/dialogs/file_select.py b/app/view/dialogs/file_select.py
index 21eb6f68..f8eea7c9 100644
--- a/app/view/dialogs/file_select.py
+++ b/app/view/dialogs/file_select.py
@@ -13,7 +13,6 @@ from qfluentwidgets import (
)
from app.format import toReadableSize
-from app.services.category_service import categoryService
from app.view.components.tree_view import AutoSizingTreeView
if TYPE_CHECKING:
@@ -22,9 +21,10 @@ if TYPE_CHECKING:
class FileSelectDialog(MessageBoxBase):
- def __init__(self, task: Task, parent=None):
+ def __init__(self, task: Task, categoryService, parent=None):
super().__init__(parent)
self._task = task
+ self._categoryService = categoryService
self._fileItems: dict[int, QStandardItem] = {}
self.titleLabel = SubtitleLabel(self.tr("选择下载文件"), self)
@@ -128,12 +128,12 @@ class FileSelectDialog(MessageBoxBase):
def _buildTypeMenu(self) -> None:
counts: dict[str, int] = {}
for file in self._task.files or []:
- categoryId = categoryService.matchByName(file.relativePath)
+ categoryId = self._categoryService.matchByName(file.relativePath)
if categoryId:
counts[categoryId] = counts.get(categoryId, 0) + 1
for categoryId, count in counts.items():
- category = categoryService.categoryById(categoryId)
+ category = self._categoryService.categoryById(categoryId)
if category is None:
continue
action = Action(
@@ -146,7 +146,7 @@ class FileSelectDialog(MessageBoxBase):
uncategorized = sum(
1 for f in self._task.files or []
- if not categoryService.matchByName(f.relativePath)
+ if not self._categoryService.matchByName(f.relativePath)
)
if uncategorized > 0:
action = Action(
@@ -225,7 +225,7 @@ class FileSelectDialog(MessageBoxBase):
def _selectCategory(self, categoryId: str) -> None:
self._setSelectedIndexes({
f.index for f in self._task.files or []
- if categoryService.matchByName(f.relativePath) == categoryId
+ if self._categoryService.matchByName(f.relativePath) == categoryId
})
self.treeView.viewport().update()
diff --git a/app/view/dialogs/task_draft.py b/app/view/dialogs/task_draft.py
index 9931b432..57bb2d73 100644
--- a/app/view/dialogs/task_draft.py
+++ b/app/view/dialogs/task_draft.py
@@ -14,7 +14,6 @@ from qfluentwidgets import (
)
from app.platform.android import IS_ANDROID
-from app.services.feature_service import featureService
from app.view.components.card_groups import DraftCardGroup, OptionCardGroup
from app.view.components.editors import AutoSizingEdit
from app.view.components.option_cards import OutputFolderCard, SubworkerCountCard
@@ -62,10 +61,12 @@ class StandaloneWrapper(FramelessDialog):
class TaskDraftDialog(MessageBoxBase):
- def __init__(self, draft: TaskDraft, parent=None):
+ def __init__(self, draft: TaskDraft, featureService, categoryService, parent=None):
self._isDragEnabled = not IS_ANDROID
super().__init__(parent)
self._draft = draft
+ self._featureService = featureService
+ self._categoryService = categoryService
self._parseTimer = QTimer(self, singleShot=True)
self._standaloneWrapper = StandaloneWrapper(self)
self.destroyed.connect(self._standaloneWrapper.deleteLater)
@@ -97,7 +98,7 @@ class TaskDraftDialog(MessageBoxBase):
self.urlEdit.setPlaceholderText(self.tr("添加多个下载链接时,请确保每行只有一个下载链接"))
self.urlEdit.setWordWrapMode(QTextOption.WrapMode.NoWrap)
self.progressBar.hide()
- self._fileTypes = featureService.fileTypes()
+ self._fileTypes = self._featureService.fileTypes()
self.importButton.setVisible(bool(self._fileTypes))
self.optionGroup.addCard(OutputFolderCard(self.optionGroup))
@@ -243,7 +244,7 @@ class TaskDraftDialog(MessageBoxBase):
self._draft.setUrls(self._urls())
def _onParseSucceeded(self, url: str, task: Task) -> None:
- card = featureService.draftCard(task, self.draftGroup)
+ card = self._featureService.draftCard(task, self.draftGroup)
card.categoryPicked.connect(lambda cid: self._draft.setUrlCategory(url, cid))
card.editRequested.connect(lambda u=url: self._onEditRequested(u))
self.draftGroup.addCard(url, card)
@@ -256,7 +257,7 @@ class TaskDraftDialog(MessageBoxBase):
task = self._draft.taskByUrl(url)
if task is None:
return
- dialog = DraftEditDialog(task, featureService.optionCards(task, self.window()), self.window())
+ dialog = DraftEditDialog(task, self._featureService.optionCards(task, self.window()), self.window())
dialog.exec()
def _onParseFailed(self, url: str, error: str) -> None:
diff --git a/app/view/mobile/setting_page.py b/app/view/mobile/setting_page.py
index d079d22f..2823cbde 100644
--- a/app/view/mobile/setting_page.py
+++ b/app/view/mobile/setting_page.py
@@ -10,8 +10,8 @@ QWIDGETSIZE_MAX = (1 << 24) - 1
class MobileSettingPage(SettingPage):
- def __init__(self, parent=None):
- super().__init__(parent)
+ def __init__(self, featureService, browserService, coroutineRunner, categoryService, parent=None):
+ super().__init__(featureService, browserService, coroutineRunner, categoryService, parent=parent)
self._setScrollContentOpaque()
def showEvent(self, event):
diff --git a/app/view/mobile/task_page.py b/app/view/mobile/task_page.py
index ce7538e7..850c2d8a 100644
--- a/app/view/mobile/task_page.py
+++ b/app/view/mobile/task_page.py
@@ -13,9 +13,9 @@ from app.view.pages.task_page import TaskPage
class MobileTaskPage(TaskPage):
selectionModeChanged = Signal(bool)
- def __init__(self, parent=None):
+ def __init__(self, taskService, featureService, categoryService, speedMeter, coroutineRunner, parent=None):
self._mobileCardTypes: dict[type, type] = {}
- super().__init__(parent)
+ super().__init__(taskService, featureService, categoryService, speedMeter, coroutineRunner, parent=parent)
def setSelectionMode(self, enter: bool) -> None:
super().setSelectionMode(enter)
diff --git a/app/view/mobile/window.py b/app/view/mobile/window.py
index 4d70d3c7..379a5567 100644
--- a/app/view/mobile/window.py
+++ b/app/view/mobile/window.py
@@ -12,7 +12,6 @@ from app.config.cfg import cfg
from app.platform.android import clearShare, isStorageGranted, requestStoragePermission, sharedText, toTaskUrls
from app.platform.android_notification import isNotificationEnabled, requestNotificationPermission
from app.services.task_draft import TaskDraft
-from app.services.task_service import taskService
from app.view.dialogs.task_draft import TaskDraftDialog
from app.view.mobile.device import setupAccentColor
from app.view.mobile.navigation import BottomNavigationBar
@@ -24,8 +23,14 @@ TASK_PAGE_INDEX = 0
class MobileMainWindow(QWidget):
- def __init__(self):
+ def __init__(self, taskService, featureService, browserService, categoryService, speedMeter, coroutineRunner):
super().__init__(parent=None)
+ self._taskService = taskService
+ self._featureService = featureService
+ self._browserService = browserService
+ self._categoryService = categoryService
+ self._speedMeter = speedMeter
+ self._coroutineRunner = coroutineRunner
setupAccentColor()
self.stackedWidget = QStackedWidget(self)
@@ -36,15 +41,15 @@ class MobileMainWindow(QWidget):
text=self.tr("未开启通知权限,下载完成后将无法提醒"),
parent=self,
)
- self.taskPage = MobileTaskPage(self)
- self.settingPage = MobileSettingPage(self)
+ self.taskPage = MobileTaskPage(taskService, featureService, categoryService, speedMeter, coroutineRunner, parent=self)
+ self.settingPage = MobileSettingPage(featureService, browserService, coroutineRunner, categoryService, parent=self)
self.searchEdit = SearchLineEdit(self)
self.addButton = PrimaryToolButton(FluentIcon.ADD, self)
self.vBoxLayout = QVBoxLayout(self)
- self._draft = TaskDraft(parent=self)
- self._draftDialog = TaskDraftDialog(self._draft, parent=self)
- self._shareDraft = TaskDraft(parent=self)
+ self._draft = TaskDraft(coroutineRunner, featureService, parent=self)
+ self._draftDialog = TaskDraftDialog(self._draft, featureService, categoryService, parent=self)
+ self._shareDraft = TaskDraft(coroutineRunner, featureService, parent=self)
self._initWidget()
self._initLayout()
@@ -88,8 +93,8 @@ class MobileMainWindow(QWidget):
self.searchEdit.textChanged.connect(self._onSearchTextChanged)
self.taskPage.selectionModeChanged.connect(lambda *_: self._updateAddButtonVisibility())
self.addButton.clicked.connect(self._showAddTaskDialog)
- self._draft.taskConfirmed.connect(taskService.add)
- self._shareDraft.taskConfirmed.connect(taskService.add)
+ self._draft.taskConfirmed.connect(self._taskService.add)
+ self._shareDraft.taskConfirmed.connect(self._taskService.add)
QApplication.instance().applicationStateChanged.connect(self._onApplicationStateChanged)
cfg.themeChanged.connect(self._setTheme)
QApplication.instance().styleHints().colorSchemeChanged.connect(self._onSystemColorSchemeChanged)
diff --git a/app/view/pages/setting_page.py b/app/view/pages/setting_page.py
index 1054fd29..efb41dcb 100644
--- a/app/view/pages/setting_page.py
+++ b/app/view/pages/setting_page.py
@@ -32,8 +32,12 @@ from app.view.components.editors import FolderPicker
class SettingPage(ScrollArea):
- def __init__(self, parent=None):
+ def __init__(self, featureService, browserService, coroutineRunner, categoryService, parent=None):
super().__init__(parent)
+ self._featureService = featureService
+ self._browserService = browserService
+ self._coroutineRunner = coroutineRunner
+ self._categoryService = categoryService
self.container = QWidget()
self.vBoxLayout = QVBoxLayout(self.container)
self.vBoxLayout.addStretch(1)
@@ -106,13 +110,13 @@ class SettingPage(ScrollArea):
self.tr("文件无法下载时,可尝试关闭该选项"),
cfg.shouldVerifySsl),
self.downloadFolderCard,
- ProxySettingCard(cfg.proxyServer),
+ ProxySettingCard(cfg.proxyServer, featureService=self._featureService),
self.clientProfileCard,
DefaultHeadersSettingCard(FluentIcon.DICTIONARY, self.tr("默认请求头"),
self.tr("设置默认 HTTP 请求头")),
])
- self.categoryRulesCard = CategoryRulesCard()
+ self.categoryRulesCard = CategoryRulesCard(self._categoryService)
self.categoryGroup.addSettingCards([
SwitchSettingCard(FluentIcon.TAG, self.tr("启用下载分类"),
self.tr("根据扩展名将下载任务归类,便于筛选与分发到指定文件夹"),
@@ -342,17 +346,14 @@ class SettingPage(ScrollArea):
self.addSettingGroup(self.aria2RpcGroup)
self.addSettingGroup(self.personalGroup)
self.addSettingGroup(self.softwareGroup)
- from app.services.feature_service import featureService
- for group in featureService.settingGroups(self.container):
+ for group in self._featureService.settingGroups(self.container):
self.addSettingGroup(group)
self.addSettingGroup(self.aboutGroup)
def _bind(self) -> None:
- from app.services.browser_service import browserService
-
cfg.appRestartSig.connect(self._showRestartTooltip)
cfg.browserExtensionPairToken.valueChanged.connect(self._refreshPairTokenCard)
- browserService.connectionChanged.connect(self._refreshBrowserStatus)
+ self._browserService.connectionChanged.connect(self._refreshBrowserStatus)
if sys.platform == "darwin":
cfg.shouldShowDockIcon.valueChanged.connect(self.showDockSpeedCard.setEnabled)
@@ -383,12 +384,10 @@ class SettingPage(ScrollArea):
InfoBar.success(self.tr("已配置"), self.tr("重启软件后生效"), duration=1500, parent=self)
def _refreshPairTokenCard(self) -> None:
- from app.services.browser_service import browserService
- self.browserPairTokenCard.setContent(browserService.token)
+ self.browserPairTokenCard.setContent(self._browserService.token)
def _onCopyTokenClicked(self) -> None:
- from app.services.browser_service import browserService
- token = browserService.token
+ token = self._browserService.token
if not token:
return
QApplication.clipboard().setText(token)
@@ -396,17 +395,15 @@ class SettingPage(ScrollArea):
duration=2000, position=InfoBarPosition.BOTTOM_RIGHT, parent=self.window())
def _onRegenerateTokenClicked(self) -> None:
- from app.services.browser_service import browserService
- token = browserService.regenerateToken()
+ token = self._browserService.regenerateToken()
QApplication.clipboard().setText(token)
InfoBar.success(self.tr("已重新生成配对令牌"), self.tr("新令牌已复制到剪贴板"),
duration=2000, position=InfoBarPosition.BOTTOM_RIGHT, parent=self.window())
def _onChromiumInstallClicked(self) -> None:
from app.services.browser_service import extractBrowserExtension, EXTENSION_UNPACK_DIR
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
extractBrowserExtension(),
done=self._onExtensionExtractDone,
failed=self._onExtensionExtractFailed,
@@ -421,9 +418,8 @@ class SettingPage(ScrollArea):
duration=3000, position=InfoBarPosition.BOTTOM_RIGHT, parent=self.window())
def _refreshBrowserStatus(self) -> None:
- from app.services.browser_service import browserService
- installType, version = browserService.connectionSummary
- port = browserService.boundPort
+ installType, version = self._browserService.connectionSummary
+ port = self._browserService.boundPort
if not installType:
text = self.tr("未连接")
elif installType == "development":
@@ -471,12 +467,11 @@ class SettingPage(ScrollArea):
QApplication.instance().quit()
def _onAboutCardClicked(self) -> None:
- from app.services.coroutine_runner import coroutineRunner
from app.update import fetchRelease
InfoBar.info(self.tr("检查更新"), self.tr("正在检查更新..."),
duration=1500, position=InfoBarPosition.BOTTOM_RIGHT, parent=self.window())
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
fetchRelease(),
done=self._onUpdateChecked, failed=self._onUpdateCheckFailed,
owner=self,
diff --git a/app/view/pages/task_page.py b/app/view/pages/task_page.py
index 473cfb77..ec6fa2fe 100644
--- a/app/view/pages/task_page.py
+++ b/app/view/pages/task_page.py
@@ -20,9 +20,6 @@ from app.view.components.scroll_area import ScrollArea
from app.config.cfg import cfg
from app.format import toReadableSize
from app.models.task import TaskStatus
-from app.services.feature_service import featureService
-from app.services.speed_meter import speedMeter
-from app.services.task_service import taskService
from app.view.cards.task_cards import TaskCard
from app.view.components.labels import IconBodyLabel
@@ -126,8 +123,14 @@ class TaskPage(QWidget):
BOTTOM_PADDING = 12
VIEWPORT_BUFFER = 5
- def __init__(self, parent=None):
+ def __init__(self, taskService, featureService, categoryService, speedMeter, coroutineRunner, plan=None, parent=None):
super().__init__(parent)
+ self._taskService = taskService
+ self._featureService = featureService
+ self._categoryService = categoryService
+ self._speedMeter = speedMeter
+ self._coroutineRunner = coroutineRunner
+ self._plan = plan
self._filterMode = FilterMode.ALL
self._categoryFilter = ""
self._sortField = SortField.CREATED_AT
@@ -140,11 +143,16 @@ class TaskPage(QWidget):
self._displayOrder: list[str] = []
self._selectedIds: set[str] = set()
self._bandSnapshot: set[str] = set()
+ self._runningIds: set[str] = set()
self._refreshListTimer = QTimer(self, singleShot=True)
self._refreshListTimer.setInterval(0)
self._refreshListTimer.timeout.connect(self._refreshList)
+ self._cardRefreshTimer = QTimer(self)
+ self._cardRefreshTimer.setInterval(1000)
+ self._cardRefreshTimer.timeout.connect(self._refreshRunningCards)
+
self.scrollArea = ScrollArea(self)
self.scrollWidget = QWidget(self)
self.emptyStatusWidget = EmptyStatusWidget(FluentIcon.EMOJI_TAB_SYMBOLS, self.tr("暂无下载任务"), self)
@@ -259,13 +267,15 @@ class TaskPage(QWidget):
layout.addWidget(self.scrollArea)
def _bind(self) -> None:
- taskService.taskAdded.connect(self._onTaskAdded)
- taskService.taskRemoved.connect(self._onTaskRemoved)
- for signal in (taskService.taskStarted, taskService.taskPaused,
- taskService.taskCompleted, taskService.taskFailed):
- signal.connect(self._refreshVisibleCards)
- taskService.fileDisappeared.connect(self._onFileDisappeared)
- speedMeter.speedChanged.connect(self._onSpeedChanged)
+ self._taskService.taskAdded.connect(self._onTaskAdded)
+ self._taskService.taskRemoved.connect(self._onTaskRemoved)
+ self._taskService.taskStarted.connect(self._onTaskStarted)
+ self._taskService.taskPaused.connect(self._onTaskStopped)
+ self._taskService.taskCompleted.connect(self._onTaskStopped)
+ self._taskService.taskFailed.connect(self._onTaskStopped)
+ self._taskService.tasksAllCompleted.connect(self._onAllCompleted)
+ self._taskService.fileDisappeared.connect(self._onFileDisappeared)
+ self._speedMeter.speedChanged.connect(self._onSpeedChanged)
self.scrollArea.verticalScrollBar().valueChanged.connect(self._refreshViewport)
self.startAllButton.clicked.connect(self.startAll)
@@ -292,8 +302,7 @@ class TaskPage(QWidget):
self.commandView.cancelAction.triggered.connect(lambda: self.setSelectionMode(False))
cfg.isCategoryEnabled.valueChanged.connect(self._onCategoryEnabledChanged)
- from app.services.category_service import categoryService
- categoryService.categoriesChanged.connect(self._rebuildCategoryFilterMenu)
+ self._categoryService.categoriesChanged.connect(self._rebuildCategoryFilterMenu)
self._bandSelector = BandSelector(
self.scrollArea, self.scrollWidget,
@@ -332,10 +341,10 @@ class TaskPage(QWidget):
self._refreshList()
def startAll(self) -> None:
- taskService.startAll()
+ self._taskService.startAll()
def pauseAll(self) -> None:
- taskService.pauseAll()
+ self._taskService.pauseAll()
def selectAll(self) -> None:
self._selectedIds.update(self._displayOrder)
@@ -350,7 +359,7 @@ class TaskPage(QWidget):
def selectMissing(self) -> None:
self._selectedIds.clear()
for taskId in self._displayOrder:
- task = taskService.taskById(taskId)
+ task = self._taskService.taskById(taskId)
if task and task.hasOutputFile and not Path(task.outputPath).exists():
self._selectedIds.add(taskId)
for taskId, card in self._liveCards.items():
@@ -414,13 +423,14 @@ class TaskPage(QWidget):
def _onSpeedChanged(self, speed: int) -> None:
self.speedBadge.setText(f"{toReadableSize(speed)}/s")
- self._refreshVisibleCards()
def _onRateLimitToggled(self) -> None:
cfg.set(cfg.isSpeedLimitEnabled, self.rateLimitButton.isChecked())
def _onPlanButtonClicked(self) -> None:
- from app.services.plan import plan
+ plan = self._plan
+ if plan is None:
+ return
if self.planButton.isChecked():
from app.view.dialogs.plan_task import PlanTaskDialog
dialog = PlanTaskDialog(self.window())
@@ -437,7 +447,6 @@ class TaskPage(QWidget):
self.categoryFilterButton.setVisible(bool(value))
def _rebuildCategoryFilterMenu(self) -> None:
- from app.services.category_service import categoryService
self.categoryFilterMenu.clear()
for action in self.categoryFilterGroup.actions():
self.categoryFilterGroup.removeAction(action)
@@ -450,7 +459,7 @@ class TaskPage(QWidget):
self.categoryFilterMenu.addSeparator()
validIds: set[str] = {""}
- for category in categoryService.categories():
+ for category in self._categoryService.categories():
cid = category.categoryId
validIds.add(cid)
action = Action(category.toIcon(), category.name, self, checkable=True)
@@ -470,9 +479,9 @@ class TaskPage(QWidget):
def _onRedownloadSelected(self) -> None:
for taskId in self._displayOrder:
if taskId in self._selectedIds:
- task = taskService.taskById(taskId)
+ task = self._taskService.taskById(taskId)
if task:
- taskService.redownload(task)
+ self._taskService.redownload(task)
self.setSelectionMode(False)
def _onDeleteSelected(self) -> None:
@@ -486,17 +495,16 @@ class TaskPage(QWidget):
self._onDeleteConfirmed(deleteFiles.isChecked())
def _onMoveCategorySelected(self) -> None:
- from app.services.category_service import categoryService
targets = [
task for taskId in self._displayOrder
- if taskId in self._selectedIds and (task := taskService.taskById(taskId))
+ if taskId in self._selectedIds and (task := self._taskService.taskById(taskId))
]
if not targets:
return
def moveTo(categoryId):
for task in targets:
- taskService.setCategory(task, categoryId)
+ self._taskService.setCategory(task, categoryId)
self.setSelectionMode(False)
self._refreshList()
@@ -505,7 +513,7 @@ class TaskPage(QWidget):
uncategorized.triggered.connect(lambda: moveTo(""))
popup.addAction(uncategorized)
popup.addSeparator()
- for category in categoryService.categories():
+ for category in self._categoryService.categories():
cid = category.categoryId
action = Action(category.toIcon(), category.name, self)
action.triggered.connect(lambda checked=False, c=cid: moveTo(c))
@@ -514,15 +522,15 @@ class TaskPage(QWidget):
def _onDeleteConfirmed(self, shouldDeleteFiles: bool) -> None:
for taskId in list(self._selectedIds & set(self._displayOrder)):
- task = taskService.taskById(taskId)
+ task = self._taskService.taskById(taskId)
if task:
- taskService.delete(task, shouldDeleteFiles)
+ self._taskService.delete(task, shouldDeleteFiles)
self.setSelectionMode(False)
# ── list management ──
def _refreshList(self) -> None:
- tasks = taskService.tasks
+ tasks = self._taskService.tasks
if self._filterMode != FilterMode.ALL:
statuses = FILTER_TO_STATUSES.get(self._filterMode)
@@ -551,6 +559,11 @@ class TaskPage(QWidget):
tasks.sort(key=lambda t: t.createdAt, reverse=not self._sortAscending)
self._displayOrder = [t.taskId for t in tasks]
+ self._runningIds = {t.taskId for t in self._taskService.tasks if t.status == TaskStatus.RUNNING}
+ if self._runningIds and not self._cardRefreshTimer.isActive():
+ self._cardRefreshTimer.start()
+ elif not self._runningIds and self._cardRefreshTimer.isActive():
+ self._cardRefreshTimer.stop()
stride = TaskCard.ROW_HEIGHT + self.ROW_SPACING
count = len(self._displayOrder)
self.scrollWidget.setFixedHeight(
@@ -562,7 +575,7 @@ class TaskPage(QWidget):
if self._displayOrder:
self.emptyStatusWidget.hide()
else:
- if not taskService.tasks:
+ if not self._taskService.tasks:
text = self.tr("暂无下载任务")
elif self._searchText and (self._filterMode != FilterMode.ALL or self._categoryFilter):
text = self.tr("没有匹配筛选条件的任务")
@@ -615,7 +628,7 @@ class TaskPage(QWidget):
taskId = self._displayOrder[idx]
card = self._liveCards.get(taskId)
if card is None:
- task = taskService.taskById(taskId)
+ task = self._taskService.taskById(taskId)
if task is None:
continue
card = self._createCard(task)
@@ -636,9 +649,31 @@ class TaskPage(QWidget):
card.setGeometry(self.SIDE_PADDING, idx * stride, max(0, width - 2 * self.SIDE_PADDING), TaskCard.ROW_HEIGHT)
card.show()
- def _refreshVisibleCards(self) -> None:
- for card in self._liveCards.values():
+ def _refreshRunningCards(self) -> None:
+ for taskId in self._runningIds:
+ card = self._liveCards.get(taskId)
+ if card is not None:
+ card.refresh()
+
+ def _onTaskStarted(self, task: Task) -> None:
+ self._runningIds.add(task.taskId)
+ card = self._liveCards.get(task.taskId)
+ if card is not None:
card.refresh()
+ if not self._cardRefreshTimer.isActive():
+ self._cardRefreshTimer.start()
+
+ def _onTaskStopped(self, task: Task) -> None:
+ self._runningIds.discard(task.taskId)
+ card = self._liveCards.get(task.taskId)
+ if card is not None:
+ card.refresh()
+ if not self._runningIds:
+ self._cardRefreshTimer.stop()
+
+ def _onAllCompleted(self) -> None:
+ self._runningIds.clear()
+ self._cardRefreshTimer.stop()
# ── band selection ──
@@ -665,13 +700,13 @@ class TaskPage(QWidget):
paths = [
Path(task.outputPath)
for tid in self._selectedIds
- if (task := taskService.taskById(tid))
+ if (task := self._taskService.taskById(tid))
and task.status == TaskStatus.COMPLETED
and task.hasOutputFile
and Path(task.outputPath).exists()
]
else:
- task = taskService.taskById(taskId)
+ task = self._taskService.taskById(taskId)
paths = [Path(task.outputPath)] if task else []
if paths:
startFileDrag(paths, self)
@@ -701,7 +736,7 @@ class TaskPage(QWidget):
self._refreshViewport()
def _createCard(self, task: Task) -> TaskCard | None:
- return featureService.taskCard(task, self.scrollWidget)
+ return self._featureService.taskCard(task, self.scrollWidget)
def _onTaskAdded(self, task: Task) -> None:
self._refreshListTimer.start()
@@ -711,8 +746,11 @@ class TaskPage(QWidget):
if card is not None:
self._unmountCard(card)
self._selectedIds.discard(taskId)
+ self._runningIds.discard(taskId)
if self._selectionAnchor == taskId:
self._selectionAnchor = None
+ if not self._runningIds:
+ self._cardRefreshTimer.stop()
self._refreshListTimer.start()
def _onFileDisappeared(self, task: Task) -> None:
diff --git a/app/view/shell/dock.py b/app/view/shell/dock.py
index fb1743e1..504296e7 100644
--- a/app/view/shell/dock.py
+++ b/app/view/shell/dock.py
@@ -9,7 +9,6 @@ from Foundation import NSData
from app.config.cfg import cfg
from app.format import toDockSpeed
-from app.services.speed_meter import speedMeter
def setDockIconVisible(visible: bool, activate: bool) -> None:
@@ -21,9 +20,7 @@ def setDockIconVisible(visible: bool, activate: bool) -> None:
app.activateIgnoringOtherApps_(True)
-def setupDock() -> None:
- from app.services.task_service import taskService
-
+def setupDock(speedMeter, taskService) -> None:
baseIcon = None
container = None
imageView = None
diff --git a/app/view/shell/mac_status_item.py b/app/view/shell/mac_status_item.py
index a20891cc..94190fd6 100644
--- a/app/view/shell/mac_status_item.py
+++ b/app/view/shell/mac_status_item.py
@@ -32,12 +32,10 @@ class MenuTarget(NSObject):
signalBus.activationRequested.emit()
def startAll_(self, sender):
- from app.services.task_service import taskService
- taskService.startAll()
+ self.owner._taskService.startAll()
def pauseAll_(self, sender):
- from app.services.task_service import taskService
- taskService.pauseAll()
+ self.owner._taskService.pauseAll()
def quitApp_(self, sender):
QApplication.instance().quit()
@@ -46,7 +44,8 @@ class MenuTarget(NSObject):
class MacStatusItem:
ICON_SIZE = 16
- def __init__(self):
+ def __init__(self, taskService):
+ self._taskService = taskService
self._statusItem = NSStatusBar.systemStatusBar().statusItemWithLength_(
NSVariableStatusItemLength
)
@@ -93,9 +92,8 @@ class MacStatusItem:
def _refreshMenuItems(self) -> None:
from app.models.task import TaskStatus
- from app.services.task_service import taskService
- tasks = taskService.tasks
+ tasks = self._taskService.tasks
self._startAllItem.setEnabled_(
any(t.status in {TaskStatus.PAUSED, TaskStatus.FAILED, TaskStatus.WAITING} for t in tasks)
)
diff --git a/app/view/shell/tray.py b/app/view/shell/tray.py
index 5ac3db2a..2128b3ff 100644
--- a/app/view/shell/tray.py
+++ b/app/view/shell/tray.py
@@ -10,8 +10,6 @@ from qfluentwidgets import (
)
from app.format import toReadableSize
-from app.services.speed_meter import speedMeter
-from app.services.task_service import taskService
from app.signal_bus import signalBus
@@ -171,17 +169,19 @@ else:
class SystemTrayIcon(QSystemTrayIcon):
NAME = "Ghost Downloader"
- def __init__(self, icon: QIcon, parent=None):
+ def __init__(self, taskService, speedMeter, icon: QIcon, parent=None):
super().__init__(icon, parent)
+ self._taskService = taskService
+ self._speedMeter = speedMeter
self.setToolTip(self.NAME)
self._menu = TrayMenu()
self._menu.addAction(Action(GhostIcon.GHOST, self.tr("仪表盘"), self._menu,
triggered=lambda: signalBus.activationRequested.emit()))
self._menu.addAction(Action(FluentIcon.PLAY, self.tr("全部开始"), self._menu,
- triggered=taskService.startAll))
+ triggered=self._taskService.startAll))
self._menu.addAction(Action(FluentIcon.PAUSE, self.tr("全部暂停"), self._menu,
- triggered=taskService.pauseAll))
+ triggered=self._taskService.pauseAll))
self._menu.addSeparator()
self._menu.addAction(Action(FluentIcon.CLOSE, self.tr("退出程序"), self._menu,
triggered=QApplication.instance().quit))
@@ -190,7 +190,7 @@ class SystemTrayIcon(QSystemTrayIcon):
self.activated.connect(self._onActivated)
self.messageClicked.connect(signalBus.activationRequested)
- speedMeter.speedChanged.connect(self._onSpeedChanged)
+ self._speedMeter.speedChanged.connect(self._onSpeedChanged)
def _onActivated(self, reason: QSystemTrayIcon.ActivationReason) -> None:
if reason == QSystemTrayIcon.ActivationReason.Trigger:
diff --git a/app/view/windows/main_window.py b/app/view/windows/main_window.py
index b5912fe9..1c345e64 100644
--- a/app/view/windows/main_window.py
+++ b/app/view/windows/main_window.py
@@ -15,7 +15,6 @@ from qfluentwidgets import (
from app.config.cfg import CloseMode, cfg
from app.config.constants import AUTHOR_URL, FEEDBACK_URL
from app.services.task_draft import TaskDraft
-from app.services.task_service import taskService
from app.signal_bus import signalBus
from app.view.pages.setting_page import SettingPage
from app.view.pages.task_page import TaskPage
@@ -23,22 +22,48 @@ from app.view.pages.task_page import TaskPage
if TYPE_CHECKING:
from qfluentwidgets import FluentIconBase
from app.models.task import Task
+ from app.services.browser_service import BrowserService
+ from app.services.category_service import CategoryService
+ from app.services.coroutine_runner import CoroutineRunner
+ from app.services.speed_meter import SpeedMeter
+ from app.services.feature_service import FeatureService
+ from app.services.runtime_status import RuntimeStatusService
+ from app.services.task_service import TaskService
from app.view.dialogs.task_draft import TaskDraftDialog
class MainWindow(MSFluentWindow):
- def __init__(self, parent=None):
+ def __init__(
+ self,
+ taskService: TaskService,
+ featureService: FeatureService,
+ browserService: BrowserService,
+ categoryService: CategoryService,
+ speedMeter: SpeedMeter,
+ coroutineRunner: CoroutineRunner,
+ runtimeStatusService: RuntimeStatusService,
+ plan,
+ parent=None,
+ ):
self._isGeometryRestored = False
self._isBackgroundEffectDirty = False
self.searchEdit = None
super().__init__(parent)
+ self._taskService = taskService
+ self._featureService = featureService
+ self._browserService = browserService
+ self._categoryService = categoryService
+ self._coroutineRunner = coroutineRunner
+ self._runtimeStatusService = runtimeStatusService
+ self._speedMeter = speedMeter
+ self._plan = plan
self.setMicaEffectEnabled(False)
if sys.platform != "darwin":
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
self._pages: dict[str, QWidget] = {}
- self._draft = TaskDraft(parent=self)
+ self._draft = TaskDraft(self._coroutineRunner, self._featureService, parent=self)
self.searchEdit = SearchLineEdit(self.titleBar)
self._initWidget()
@@ -74,8 +99,7 @@ class MainWindow(MSFluentWindow):
self._showPage(TaskPage)
def setupPacks(self) -> None:
- from app.services.feature_service import featureService
- for PageClass in featureService.pages():
+ for PageClass in self._featureService.pages():
self._addPage(PageClass, PageClass.icon, PageClass.title,
NavigationItemPosition.TOP)
@@ -99,7 +123,7 @@ class MainWindow(MSFluentWindow):
routeKey = pageClass.__name__
page = self._pages.get(routeKey)
if page is None:
- page = pageClass(self)
+ page = self._createPage(pageClass)
page.setObjectName(routeKey)
self.stackedWidget.addWidget(page)
self._pages[routeKey] = page
@@ -111,6 +135,19 @@ class MainWindow(MSFluentWindow):
self.navigationInterface.setCurrentItem(routeKey)
self._updateSearchTarget(page)
+ def _createPage(self, pageClass: type[QWidget]) -> QWidget:
+ if pageClass is TaskPage:
+ return TaskPage(
+ self._taskService, self._featureService,
+ self._categoryService, self._speedMeter, self._coroutineRunner, self._plan, parent=self,
+ )
+ if pageClass is SettingPage:
+ return SettingPage(
+ self._featureService, self._browserService,
+ self._coroutineRunner, self._categoryService, parent=self,
+ )
+ return pageClass(self)
+
def _onSearchTextChanged(self, text: str) -> None:
page = self.stackedWidget.currentWidget()
if hasattr(page, 'setSearchText'):
@@ -139,7 +176,7 @@ class MainWindow(MSFluentWindow):
self.searchEdit.selectAll()
def _bind(self) -> None:
- self._draft.taskConfirmed.connect(taskService.add)
+ self._draft.taskConfirmed.connect(self._taskService.add)
cfg.themeChanged.connect(self._setTheme)
QApplication.instance().styleHints().colorSchemeChanged.connect(self._onSystemColorSchemeChanged)
self.titleBar.closeBtn.clicked.disconnect(self.close)
@@ -177,11 +214,12 @@ class MainWindow(MSFluentWindow):
@cached_property
def _draftDialog(self) -> TaskDraftDialog:
from app.view.dialogs.task_draft import TaskDraftDialog
- return TaskDraftDialog(self._draft, parent=self)
+ return TaskDraftDialog(
+ self._draft, self._featureService, self._categoryService,
+ parent=self,
+ )
def confirmPair(self, request) -> None:
- from app.services.browser_service import browserService
-
session = request["session"]
requestId = request["requestId"]
peerAddress = request.get("peerAddress", "")
@@ -200,9 +238,9 @@ class MainWindow(MSFluentWindow):
dialog.contentLabel.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse)
if dialog.exec():
- browserService.approvePair(session, requestId)
+ self._browserService.approvePair(session, requestId)
else:
- browserService.rejectPair(session, requestId)
+ self._browserService.rejectPair(session, requestId)
def _onUpdateAvailable(self, release) -> None:
from qfluentwidgets import PrimaryPushButton, PushButton
diff --git a/app/view/windows/oobe_window.py b/app/view/windows/oobe_window.py
index 9a30469b..8ffd8d28 100644
--- a/app/view/windows/oobe_window.py
+++ b/app/view/windows/oobe_window.py
@@ -14,8 +14,9 @@ from qfluentwidgets import (
GroupHeaderCardWidget, HorizontalPipsPager, IconWidget, InfoBar,
InfoBarIcon, InfoBarPosition, PipsScrollButtonDisplayMode,
PrimaryPushButton, PushButton, SubtitleLabel, SwitchButton, Theme,
- TitleLabel, TransparentPushButton, isDarkTheme, themeColor,
+ TitleLabel, TransparentPushButton, isDarkTheme, qconfig, themeColor,
)
+from qfluentwidgets.common.style_sheet import updateStyleSheet
from app.config.cfg import cfg, LANGUAGE_TEXTS
from app.config.constants import (
@@ -356,6 +357,8 @@ class BasicSettingsPage(QWidget):
def _onThemePicked(self, theme: Theme) -> None:
cfg.set(cfg.themeMode, theme)
+ updateStyleSheet()
+ qconfig.themeChangedFinished.emit()
self._refreshThemeCards()
def _refreshThemeCards(self) -> None:
@@ -380,8 +383,10 @@ class BasicSettingsPage(QWidget):
class BrowserExtensionPage(QWidget):
- def __init__(self, parent=None):
+ def __init__(self, browserService, coroutineRunner, parent=None):
super().__init__(parent)
+ self._browserService = browserService
+ self._coroutineRunner = coroutineRunner
self._isPaired = False
self._banner: InfoBar | None = None
self._initWidget()
@@ -463,12 +468,11 @@ class BrowserExtensionPage(QWidget):
layout.addStretch(1)
def _bind(self) -> None:
- from app.services.browser_service import browserService
self.manualCard.clicked.connect(self._onManualInstallClicked)
for card, url in self.storeCards:
card.clicked.connect(lambda u=url: QDesktopServices.openUrl(QUrl(u)))
- browserService.connectionChanged.connect(self._onConnectionChanged)
- browserService.protocolMismatched.connect(self._onProtocolMismatched)
+ self._browserService.connectionChanged.connect(self._onConnectionChanged)
+ self._browserService.protocolMismatched.connect(self._onProtocolMismatched)
def _setBanner(self, icon: InfoBarIcon, title: str) -> None:
if self._banner is not None:
@@ -485,8 +489,7 @@ class BrowserExtensionPage(QWidget):
def refreshPortStatus(self) -> None:
if self._isPaired:
return
- from app.services.browser_service import browserService
- if browserService.boundPort:
+ if self._browserService.boundPort:
self._setBanner(
InfoBarIcon.INFORMATION,
self.tr("正在端口 {} 上等待扩展连接").format(browserService.boundPort),
@@ -514,8 +517,7 @@ class BrowserExtensionPage(QWidget):
self._setBanner(InfoBarIcon.SUCCESS, text)
def _onConnectionChanged(self) -> None:
- from app.services.browser_service import browserService
- installType, version = browserService.connectionSummary
+ installType, version = self._browserService.connectionSummary
if installType or version:
self._isPaired = True
self._setConnectedBanner(version)
@@ -525,8 +527,7 @@ class BrowserExtensionPage(QWidget):
def _onManualInstallClicked(self) -> None:
from app.services.browser_service import extractBrowserExtension
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
extractBrowserExtension(),
done=self._onExtensionExtracted,
failed=self._onExtensionExtractFailed,
@@ -551,8 +552,7 @@ class BrowserExtensionPage(QWidget):
)
def onPairRequested(self, request: dict) -> None:
- from app.services.browser_service import browserService
- browserService.approvePair(request["session"], request["requestId"])
+ self._browserService.approvePair(request["session"], request["requestId"])
self._isPaired = True
self._setConnectedBanner(request.get("extensionVersion", ""))
@@ -565,8 +565,9 @@ class BrowserExtensionPage(QWidget):
class RuntimeInstallPage(QWidget):
- def __init__(self, parent=None):
+ def __init__(self, featureService, parent=None):
super().__init__(parent)
+ self._featureService = featureService
self._checkBoxes: list[tuple[CheckBox, BinaryRuntime]] = []
self._isMounted = False
self._initWidget()
@@ -593,8 +594,7 @@ class RuntimeInstallPage(QWidget):
return
self._isMounted = True
- from app.services.feature_service import featureService
- entries = [rt for rt in featureService.runtimes() if rt.canInstall and rt.title]
+ entries = [rt for rt in self._featureService.runtimes() if rt.canInstall and rt.title]
entries.sort(key=lambda rt: not rt.isRecommended)
for runtime in entries:
@@ -630,8 +630,9 @@ class RuntimeInstallPage(QWidget):
class AdvancedOptionsPage(QWidget):
- def __init__(self, parent=None):
+ def __init__(self, featureService, parent=None):
super().__init__(parent)
+ self._featureService = featureService
self._initWidget()
self._initLayout()
@@ -672,10 +673,9 @@ class AdvancedOptionsPage(QWidget):
)
def _isFileAssociationEnabled(self) -> bool:
- from app.services.feature_service import featureService
return any(
pack.config.associateFileTypes.value
- for pack in featureService.packs
+ for pack in self._featureService.packs
if pack.config is not None and hasattr(pack.config, "associateFileTypes")
)
@@ -697,8 +697,7 @@ class AdvancedOptionsPage(QWidget):
def save(self) -> None:
cfg.set(cfg.isCategoryEnabled, self.categoryCard.isChecked())
- from app.services.feature_service import featureService
- for pack in featureService.packs:
+ for pack in self._featureService.packs:
config = pack.config
if config is not None and hasattr(config, "associateFileTypes"):
cfg.set(config.associateFileTypes, self.fileAssocCard.isChecked())
@@ -770,8 +769,13 @@ class OobeWindow(FluentWidget):
PAGE_COUNT = 6
- def __init__(self, parent=None):
+ def __init__(self, browserService, coroutineRunner, featureService,
+ taskService, parent=None):
super().__init__(parent=parent)
+ self._browserService = browserService
+ self._coroutineRunner = coroutineRunner
+ self._featureService = featureService
+ self._taskService = taskService
self._currentIndex = 0
self._isFinished = False
self._queuedRuntimeIds: set[str] = set()
@@ -796,9 +800,10 @@ class OobeWindow(FluentWidget):
def _initContent(self) -> None:
self.welcomePage = WelcomePage(self)
self.basicSettingsPage = BasicSettingsPage(self)
- self.browserExtensionPage = BrowserExtensionPage(self)
- self.runtimeInstallPage = RuntimeInstallPage(self)
- self.advancedOptionsPage = AdvancedOptionsPage(self)
+ self.browserExtensionPage = BrowserExtensionPage(
+ self._browserService, self._coroutineRunner, self)
+ self.runtimeInstallPage = RuntimeInstallPage(self._featureService, self)
+ self.advancedOptionsPage = AdvancedOptionsPage(self._featureService, self)
self.completePage = CompletePage(self)
self.stackedWidget = DrillInTransitionStackedWidget(self)
@@ -925,11 +930,11 @@ class OobeWindow(FluentWidget):
return
from loguru import logger
- from app.services.task_service import taskService
- from app.services.coroutine_runner import coroutineRunner
+
+ _taskService = self._taskService
def onDone(task, name):
- taskService.add(task)
+ _taskService.add(task)
def onFailed(error, name):
logger.error("OOBE 安装 {} 失败: {}", name, error)
@@ -938,7 +943,7 @@ class OobeWindow(FluentWidget):
if runtime.path() or runtime.runtimeId in self._queuedRuntimeIds:
continue
self._queuedRuntimeIds.add(runtime.runtimeId)
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
runtime.installTask(),
done=onDone,
failed=onFailed,
diff --git a/features/bili_pack/account.py b/features/bili_pack/account.py
index 3ae096f2..74b174e1 100644
--- a/features/bili_pack/account.py
+++ b/features/bili_pack/account.py
@@ -53,8 +53,9 @@ class BilibiliAccount(QObject):
accountChanged = Signal()
qrStateChanged = Signal(int, str)
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, parent=None):
super().__init__(parent)
+ self._coroutineRunner = coroutineRunner
self._username = ""
self._mid = ""
self._vip = ""
@@ -104,20 +105,20 @@ class BilibiliAccount(QObject):
# ── QR login (wreq via coroutineRunner) ──
def startQrLogin(self):
- from app.services.coroutine_runner import coroutineRunner
+
self.cancelQrLogin()
- self._qrWorkId = coroutineRunner.submit(
+ self._qrWorkId = self._coroutineRunner.submit(
self._pollQrLogin(), done=self._onQrLoginDone, failed=self._onQrLoginFailed,
)
def cancelQrLogin(self):
if self._qrWorkId:
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.cancel(self._qrWorkId)
+
+ self._coroutineRunner.cancel(self._qrWorkId)
self._qrWorkId = ""
async def _pollQrLogin(self) -> str:
- from app.services.coroutine_runner import coroutineRunner
+
client = buildClient()
try:
@@ -133,7 +134,7 @@ class BilibiliAccount(QObject):
if not loginUrl or not qrCodeKey:
raise ValueError("二维码接口返回了不完整的数据")
- coroutineRunner.post(self.qrStateChanged.emit, 0, loginUrl)
+ self._coroutineRunner.post(self.qrStateChanged.emit, 0, loginUrl)
while True:
await asyncio.sleep(QR_POLL_INTERVAL)
@@ -146,11 +147,11 @@ class BilibiliAccount(QObject):
statusMessage = str(data.get("message") or "")
if statusCode in {QR_UNSCANNED, QR_SCANNED}:
- coroutineRunner.post(self.qrStateChanged.emit, statusCode, statusMessage)
+ self._coroutineRunner.post(self.qrStateChanged.emit, statusCode, statusMessage)
continue
if statusCode == QR_EXPIRED:
- coroutineRunner.post(self.qrStateChanged.emit, QR_EXPIRED, "")
+ self._coroutineRunner.post(self.qrStateChanged.emit, QR_EXPIRED, "")
return ""
if statusCode == 0:
@@ -180,7 +181,7 @@ class BilibiliAccount(QObject):
def setCookie(self, cookie: str):
from app.config.cfg import cfg
- from app.services.coroutine_runner import coroutineRunner
+
cookie = toCookie(cookie)
oldCookie = self.cookie
@@ -190,7 +191,7 @@ class BilibiliAccount(QObject):
self.accountChanged.emit()
if cookie:
self.fetchAccountInfo()
- coroutineRunner.submit(self._logout(), done=onDone, failed=onDone)
+ self._coroutineRunner.submit(self._logout(), done=onDone, failed=onDone)
else:
cfg.set(bilibiliConfig.userCookie, cookie)
self.accountChanged.emit()
@@ -198,12 +199,12 @@ class BilibiliAccount(QObject):
self.fetchAccountInfo()
def logout(self):
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(self._logout(), done=self._onLogoutDone, failed=self._onLogoutFailed)
+
+ self._coroutineRunner.submit(self._logout(), done=self._onLogoutDone, failed=self._onLogoutFailed)
def fetchAccountInfo(self):
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(self._fetchAccountInfo(), done=self._onAccountInfoDone)
+
+ self._coroutineRunner.submit(self._fetchAccountInfo(), done=self._onAccountInfoDone)
async def fetchWbiKeys(self) -> None:
if self._mixinKey:
@@ -316,4 +317,3 @@ class BilibiliAccount(QObject):
self.accountChanged.emit()
-bilibiliAccount = BilibiliAccount()
diff --git a/features/bili_pack/cards.py b/features/bili_pack/cards.py
index e09b167e..0e6415c6 100644
--- a/features/bili_pack/cards.py
+++ b/features/bili_pack/cards.py
@@ -6,19 +6,19 @@ from PySide6.QtWidgets import QAbstractItemView, QHBoxLayout, QHeaderView
from qfluentwidgets import (
BodyLabel, ComboBox, FluentIcon, MessageBoxBase,
PrimaryPushButton, PushButton, SubtitleLabel,
- ToolButton, ToolTipFilter, TransparentToolButton,
+ ToolTipFilter, TransparentToolButton,
)
from app.format import toReadableSize
-from app.view.cards.draft_cards import UniversalDraftCard
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.draft_cards import MultiFileDraftCard
+from app.view.cards.task_cards import MultiFileTaskCard
from app.view.components.tree_view import AutoSizingTreeView
from .task import BilibiliTask, DownloadMode
MODE_LABELS = ("视频", "音频", "封面")
-class BilibiliDraftCard(UniversalDraftCard):
+class BilibiliDraftCard(MultiFileDraftCard):
def _initWidget(self) -> None:
super()._initWidget()
@@ -35,35 +35,26 @@ class BilibiliDraftCard(UniversalDraftCard):
self._subtitleButton.setToolTip(self.tr("选择字幕"))
self._subtitleButton.setEnabled(bool(self._subtitleChoices))
- self._selectPagesButton = TransparentToolButton(FluentIcon.LIBRARY, self)
- self._selectPagesButton.installEventFilter(ToolTipFilter(self._selectPagesButton))
- self._selectPagesButton.setToolTip(self.tr("选择分P"))
+ if self._selectFilesButton is not None:
+ self._selectFilesButton.setToolTip(self.tr("选择分P"))
self._refreshButtonVisibility()
def _initLayout(self) -> None:
super()._initLayout()
self.layout().addWidget(self._modeCombo)
self.layout().addWidget(self._subtitleButton)
- self.layout().addWidget(self._selectPagesButton)
def _bind(self) -> None:
super()._bind()
self._modeCombo.currentIndexChanged.connect(self._onModeChanged)
self._subtitleButton.clicked.connect(self._onSubtitleClicked)
- self._selectPagesButton.clicked.connect(self._onSelectPagesClicked)
def _onModeChanged(self, index: int) -> None:
task: BilibiliTask = self._task
task.setMode(DownloadMode(index))
self._refreshSummary()
- def _onSubtitleClicked(self) -> None:
- task: BilibiliTask = self._task
- dialog = SubtitleSelectDialog(self._subtitleChoices, task.subtitleLanguages, self.window())
- if dialog.exec():
- task.setSubtitleLanguages(dialog.selectedLanguages())
-
- def _onSelectPagesClicked(self) -> None:
+ def _onSelectFilesClicked(self) -> None:
task: BilibiliTask = self._task
dialog = PageSelectDialog(task, self.window())
if dialog.exec():
@@ -72,6 +63,12 @@ class BilibiliDraftCard(UniversalDraftCard):
task.setSelection({n - 1 for n in selected})
self._refreshSummary()
+ def _onSubtitleClicked(self) -> None:
+ task: BilibiliTask = self._task
+ dialog = SubtitleSelectDialog(self._subtitleChoices, task.subtitleLanguages, self.window())
+ if dialog.exec():
+ task.setSubtitleLanguages(dialog.selectedLanguages())
+
def _refreshSummary(self) -> None:
self.sizeLabel.setText(toReadableSize(self._task.fileSize))
self.nameLabel.setText(self._task.name)
@@ -94,34 +91,28 @@ class BilibiliDraftCard(UniversalDraftCard):
def _refreshButtonVisibility(self) -> None:
task: BilibiliTask = self._task
isCover = task.mode == DownloadMode.COVER
- self._selectPagesButton.setVisible(not isCover and len(task.files or []) > 1)
+ if self._selectFilesButton is not None:
+ self._selectFilesButton.setVisible(not isCover and len(task.files or []) > 1)
self._subtitleButton.setVisible(not isCover)
self._subtitleButton.setEnabled(bool(self._subtitleChoices))
-
-class BilibiliTaskCard(UniversalTaskCard):
- def __init__(self, task: BilibiliTask, parent=None):
- super().__init__(task, parent)
- self.selectFilesButton = None
- if task.mode != DownloadMode.COVER and task.files and len(task.files) > 1:
- self.selectFilesButton = ToolButton(FluentIcon.LIBRARY, self)
- self.hBoxLayout.insertWidget(
- self.hBoxLayout.indexOf(self.verifyHashButton),
- self.selectFilesButton,
- )
+class BilibiliTaskCard(MultiFileTaskCard):
+ def __init__(self, task: BilibiliTask, taskService, categoryService, parent=None):
+ super().__init__(task, taskService, categoryService, parent)
+ if task.mode == DownloadMode.COVER and self.selectFilesButton:
+ self.selectFilesButton.hide()
+ if self.selectFilesButton:
self.selectFilesButton.setToolTip(self.tr("选择分P"))
self.selectFilesButton.installEventFilter(ToolTipFilter(self.selectFilesButton))
- self.selectFilesButton.clicked.connect(self._onSelectPagesClicked)
- def _onSelectPagesClicked(self) -> None:
- from app.services.task_service import taskService
+ def _onSelectFilesClicked(self) -> None:
dialog = PageSelectDialog(self._task, self.window())
try:
if dialog.exec():
selected = dialog.selectedPageNumbers()
if selected:
- taskService.applySelection(self._task, {n - 1 for n in selected})
+ self._taskService.applySelection(self._task, {n - 1 for n in selected})
self.refresh(force=True)
finally:
dialog.deleteLater()
diff --git a/features/bili_pack/config.py b/features/bili_pack/config.py
index fb3960cb..72f234da 100644
--- a/features/bili_pack/config.py
+++ b/features/bili_pack/config.py
@@ -40,8 +40,9 @@ def _toQrPixmap(content: str, size: int = 240) -> QPixmap:
class ScanLoginDialog(MessageBoxBase):
- def __init__(self, parent=None):
+ def __init__(self, account, parent=None):
super().__init__(parent)
+ self._account = account
self._loginUrl = ""
@@ -98,19 +99,17 @@ class ScanLoginDialog(MessageBoxBase):
self.viewLayout.addLayout(buttonLayout)
def _bind(self):
- from .account import bilibiliAccount
self.refreshButton.clicked.connect(self.reloadQrCode)
self.openBrowserButton.clicked.connect(self._onOpenBrowser)
- bilibiliAccount.qrStateChanged.connect(self._onQrState)
+ self._account.qrStateChanged.connect(self._onQrState)
def reloadQrCode(self):
- from .account import bilibiliAccount
self.qrLabel.setPixmap(QPixmap())
self.qrLabel.setFixedSize(240, 240)
self.statusLabel.setText(self.tr("正在获取二维码..."))
self.openBrowserButton.setEnabled(False)
self._loginUrl = ""
- bilibiliAccount.startQrLogin()
+ self._account.startQrLogin()
def _onQrState(self, statusCode: int, text: str):
from .account import QR_EXPIRED, QR_LOGIN_SUCCESS, QR_UNSCANNED, QR_SCANNED
@@ -137,8 +136,7 @@ class ScanLoginDialog(MessageBoxBase):
QDesktopServices.openUrl(QUrl(self._loginUrl))
def done(self, code):
- from .account import bilibiliAccount
- bilibiliAccount.cancelQrLogin()
+ self._account.cancelQrLogin()
super().done(code)
@@ -164,7 +162,8 @@ class EditCookieDialog(MessageBoxBase):
class BilibiliLoginSettingCard(SettingCard):
- def __init__(self, parent=None):
+ def __init__(self, account, parent=None):
+ self._account = account
super().__init__(
FluentIcon.VIEW, self.tr("账号登录"),
self.tr("状态:未登录"), parent,
@@ -186,18 +185,16 @@ class BilibiliLoginSettingCard(SettingCard):
self.hBoxLayout.addSpacing(16)
def _bind(self):
- from .account import bilibiliAccount
self.scanButton.clicked.connect(self._onScanLogin)
self.editButton.clicked.connect(self._onEditCookie)
self.logoutButton.clicked.connect(self._onLogout)
- bilibiliAccount.accountChanged.connect(self.refreshLoginInfo)
+ self._account.accountChanged.connect(self.refreshLoginInfo)
def refreshLoginInfo(self):
- from .account import bilibiliAccount
- if bilibiliAccount.isLoggedIn:
- uname = bilibiliAccount.username or "-"
- mid = bilibiliAccount.mid or "-"
- vip = bilibiliAccount.vip or "未开通"
+ if self._account.isLoggedIn:
+ uname = self._account.username or "-"
+ mid = self._account.mid or "-"
+ vip = self._account.vip or "未开通"
self.setContent(
self.tr("状态:已登录 用户名:{0} UID:{1} 会员状态:{2}").format(uname, mid, vip)
)
@@ -205,16 +202,16 @@ class BilibiliLoginSettingCard(SettingCard):
self.setContent(self.tr("状态:未登录"))
self.scanButton.setEnabled(True)
self.editButton.setEnabled(True)
- self.logoutButton.setEnabled(bilibiliAccount.isLoggedIn)
+ self.logoutButton.setEnabled(self._account.isLoggedIn)
def _onScanLogin(self):
- dialog = ScanLoginDialog(self.window())
+ dialog = ScanLoginDialog(self._account, self.window())
dialog.exec()
dialog.deleteLater()
def _onEditCookie(self):
- from .account import bilibiliAccount, toCookie
- dialog = EditCookieDialog(self.window(), bilibiliAccount.cookie)
+ from .account import toCookie
+ dialog = EditCookieDialog(self.window(), self._account.cookie)
if not dialog.exec():
dialog.deleteLater()
return
@@ -222,18 +219,17 @@ class BilibiliLoginSettingCard(SettingCard):
newCookie = toCookie(dialog.cookieTextEdit.toPlainText())
dialog.deleteLater()
if not newCookie:
- bilibiliAccount.setCookie("")
+ self._account.setCookie("")
return
- bilibiliAccount.setCookie(newCookie)
+ self._account.setCookie(newCookie)
def _onLogout(self):
- from .account import bilibiliAccount
self.scanButton.setEnabled(False)
self.editButton.setEnabled(False)
self.logoutButton.setEnabled(False)
self.setContent(self.tr("正在退出登录..."))
- bilibiliAccount.logout()
+ self._account.logout()
class BilibiliConfig(PackConfig):
@@ -254,7 +250,7 @@ class BilibiliConfig(PackConfig):
from app.view.components.setting_card_group import CollapsibleSettingCardGroup
biliGroup = CollapsibleSettingCardGroup(self.tr("Bilibili 下载"), "bilibili", parent)
- loginCard = BilibiliLoginSettingCard(biliGroup)
+ loginCard = BilibiliLoginSettingCard(self._account, biliGroup)
biliGroup.addSettingCards([
loginCard,
ComboBoxSettingCard(self.defaultQuality, FluentIcon.VIDEO, self.tr("默认画质"),
diff --git a/features/bili_pack/manifest.toml b/features/bili_pack/manifest.toml
index 209f7371..a401ca6b 100644
--- a/features/bili_pack/manifest.toml
+++ b/features/bili_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "BilibiliPack"
dependencies = ["http_pack", "ffmpeg_pack"]
diff --git a/features/bili_pack/pack.py b/features/bili_pack/pack.py
index 965974d0..92155c41 100644
--- a/features/bili_pack/pack.py
+++ b/features/bili_pack/pack.py
@@ -11,7 +11,7 @@ from app.config.cfg import cfg
from app.models.pack import FeaturePack, TaskParser
from app.models.task import TaskOptions
from app.platform.filesystem import toSafeFilename
-from .account import bilibiliAccount
+from .account import BilibiliAccount
from .config import bilibiliConfig
from .task import BiliPage, BilibiliTask
@@ -35,7 +35,7 @@ class BilibiliParser(TaskParser):
subworkerCount = options.subworkerCount
outputFolder = options.outputFolder
- await bilibiliAccount.fetchWbiKeys()
+ await self._pack.account.fetchWbiKeys()
parsed = urlparse(url)
referer = parsed._replace(netloc="www.bilibili.com").geturl() if (
@@ -43,7 +43,7 @@ class BilibiliParser(TaskParser):
) else url
apiHeaders = {}
- cookie = bilibiliAccount.cookie
+ cookie = self._pack.account.cookie
if cookie:
apiHeaders["cookie"] = cookie
@@ -131,7 +131,7 @@ class BilibiliParser(TaskParser):
playParams["avid"] = videoId[2:]
else:
playParams["bvid"] = videoId
- playParams = bilibiliAccount.signParams(playParams)
+ playParams = self._pack.account.signParams(playParams)
playApiUrl = f"https://api.bilibili.com/x/player/wbi/playurl?{urllib.parse.urlencode(playParams)}"
response = await client.get(playApiUrl)
@@ -285,20 +285,25 @@ class BilibiliPack(FeaturePack):
packId = "bili"
config = bilibiliConfig
+ def __init__(self, services):
+ super().__init__(services)
+ self.account = BilibiliAccount(services.coroutineRunner)
+ self.config._account = self.account
+
def parsers(self):
return [BilibiliParser()]
def draftCard(self, task, parent=None):
from .cards import BilibiliDraftCard
- return BilibiliDraftCard(task, parent)
+ return BilibiliDraftCard(task, self._services.categoryService, parent)
def taskCard(self, task, parent=None):
from .cards import BilibiliTaskCard
- return BilibiliTaskCard(task, parent)
+ return BilibiliTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
def optionCards(self, task, parent=None):
from app.view.components.option_cards import OutputFolderCard
return [OutputFolderCard(parent, initial=task.outputFolder)]
- def start(self):
- bilibiliAccount.fetchAccountInfo()
+ async def activate(self):
+ self.account.fetchAccountInfo()
diff --git a/features/bili_pack/task.py b/features/bili_pack/task.py
index ac51354e..783a7cc8 100644
--- a/features/bili_pack/task.py
+++ b/features/bili_pack/task.py
@@ -264,7 +264,7 @@ class BilibiliSubtitleStep(TaskStep):
if path.exists():
move(str(path), str(target))
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
from app.client import buildClient
task: BilibiliTask = self.task
diff --git a/features/bittorrent_pack/cards.py b/features/bittorrent_pack/cards.py
index e316e514..98defcc7 100644
--- a/features/bittorrent_pack/cards.py
+++ b/features/bittorrent_pack/cards.py
@@ -1,10 +1,10 @@
-from PySide6.QtWidgets import QFileIconProvider, QHBoxLayout, QVBoxLayout
-from qfluentwidgets import FluentIcon, ToolButton
+from PySide6.QtWidgets import QFileIconProvider
+from qfluentwidgets import FluentIcon
from app.format import toReadableSize, toReadableTime
from app.models.task import TaskStatus
-from app.view.cards.draft_cards import UniversalDraftCard
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.draft_cards import MultiFileDraftCard
+from app.view.cards.task_cards import MultiFileTaskCard
from app.view.components.labels import IconBodyLabel
from app.view.dialogs.file_select import FileSelectDialog
from .task import BTTask
@@ -27,7 +27,7 @@ class TorrentFileSelectDialog(FileSelectDialog):
return self._task.toRelativePath(file)
-class BTDraftCard(UniversalDraftCard):
+class BTDraftCard(MultiFileDraftCard):
@property
def task(self) -> BTTask:
@@ -38,76 +38,29 @@ class BTDraftCard(UniversalDraftCard):
icon = QFileIconProvider.IconType.File if self.task.isSingleFile else QFileIconProvider.IconType.Folder
self.iconLabel.setImage(QFileIconProvider().icon(icon).pixmap(16, 16))
self.iconLabel.setFixedSize(16, 16)
- self._selectFilesButton = None
- if len(self.task.files) > 1:
- from qfluentwidgets import ToolTipFilter, TransparentToolButton
- self._selectFilesButton = TransparentToolButton(FluentIcon.LIBRARY, self)
- self._selectFilesButton.setFixedSize(28, 28)
- self._selectFilesButton.setToolTip(self.tr("选择文件"))
- self._selectFilesButton.installEventFilter(ToolTipFilter(self._selectFilesButton))
-
- def _initLayout(self):
- super()._initLayout()
- if self._selectFilesButton is not None:
- self.layout().addWidget(self._selectFilesButton)
-
- def _bind(self):
- super()._bind()
- if self._selectFilesButton is not None:
- self._selectFilesButton.clicked.connect(self._onSelectFilesClicked)
-
- def _refreshSummary(self):
- self.sizeLabel.setText(
- self.tr("{0}/{1} 个文件 · {2}").format(
- self.task.countSelected,
- len(self.task.files),
- toReadableSize(self.task.fileSize),
- )
- )
def _onSelectFilesClicked(self):
if openFileSelection(self.task, self.window()) is not None:
self._refreshSummary()
-class BTTaskCard(UniversalTaskCard):
+class BTTaskCard(MultiFileTaskCard):
def _initWidget(self):
super()._initWidget()
self.speedLabel.setIcon(FluentIcon.DOWNLOAD)
self.uploadLabel = IconBodyLabel("", FluentIcon.SHARE, self)
self.uploadLabel.hide()
- self.selectFilesButton = ToolButton(FluentIcon.LIBRARY, self)
-
- def _initLayout(self):
- infoLayout = QHBoxLayout()
- infoLayout.addWidget(self.speedLabel)
- infoLayout.addWidget(self.uploadLabel)
- infoLayout.addWidget(self.etaLabel)
- infoLayout.addWidget(self.sizeLabel)
- infoLayout.addWidget(self.statusLabel)
- infoLayout.addStretch()
-
- contentLayout = QVBoxLayout()
- contentLayout.setContentsMargins(2, 8, 2, 8)
- contentLayout.addWidget(self.nameLabel)
- contentLayout.addLayout(infoLayout)
-
- self.hBoxLayout = QHBoxLayout(self)
- self.hBoxLayout.setContentsMargins(12, 0, 12, 0)
- self.hBoxLayout.addWidget(self.checkBox)
- self.hBoxLayout.addWidget(self.iconLabel)
- self.hBoxLayout.addLayout(contentLayout, 1)
- self.hBoxLayout.addWidget(self.toggleButton)
- self.hBoxLayout.addWidget(self.verifyHashButton)
- self.hBoxLayout.addWidget(self.selectFilesButton)
- self.hBoxLayout.addWidget(self.openFileButton)
- self.hBoxLayout.addWidget(self.openFolderButton)
- self.hBoxLayout.addWidget(self.deleteButton)
-
- def _bind(self):
- super()._bind()
- self.selectFilesButton.clicked.connect(self._onSelectFilesClicked)
+
+ def _infoWidgets(self):
+ return [self.uploadLabel]
+
+ def _onSelectFilesClicked(self):
+ openFileSelection(
+ self._task, self.window(),
+ apply=lambda indexes: self._taskService.applySelection(self._task, indexes),
+ )
+ self.refresh(force=True)
def refresh(self, force=False):
task: BTTask = self._task
@@ -137,7 +90,6 @@ class BTTaskCard(UniversalTaskCard):
if btStatus and not self._isFileMissing:
self.statusLabel.setText(btStatus)
-
def _refreshDownloading(self, task: BTTask):
self.statusLabel.hide()
self.progressBar.show()
@@ -182,11 +134,3 @@ class BTTaskCard(UniversalTaskCard):
if task.seedingTimeSeconds > 0:
parts.append(self.tr("做种 {0}").format(toReadableTime(task.seedingTimeSeconds)))
return " · ".join(parts)
-
- def _onSelectFilesClicked(self):
- from app.services.task_service import taskService
- openFileSelection(
- self._task, self.window(),
- apply=lambda indexes: taskService.applySelection(self._task, indexes),
- )
- self.refresh(force=True)
diff --git a/features/bittorrent_pack/config.py b/features/bittorrent_pack/config.py
index 146f2efa..7d80a768 100644
--- a/features/bittorrent_pack/config.py
+++ b/features/bittorrent_pack/config.py
@@ -102,7 +102,7 @@ class BitTorrentConfig(PackConfig):
SwitchSettingCard(FluentIcon.SYNC, self.tr("新建任务时刷新 Web Tracker"),
self.tr("创建新的 BT 任务时先从源地址拉取最新 Tracker"),
self.autoRefreshWebTrackers, btGroup),
- WebTrackerCard(btGroup),
+ WebTrackerCard(self._services.coroutineRunner, btGroup),
]
btGroup.addSettingCards(cards)
return [btGroup]
diff --git a/features/bittorrent_pack/manifest.toml b/features/bittorrent_pack/manifest.toml
index 90158411..b7d7bed5 100644
--- a/features/bittorrent_pack/manifest.toml
+++ b/features/bittorrent_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "BitTorrentPack"
dependencies = []
diff --git a/features/bittorrent_pack/pack.py b/features/bittorrent_pack/pack.py
index a7bdd1ae..d986479d 100644
--- a/features/bittorrent_pack/pack.py
+++ b/features/bittorrent_pack/pack.py
@@ -103,16 +103,20 @@ class BitTorrentPack(FeaturePack):
config = bittorrentConfig
proxySchemes = {"socks5"}
+ def __init__(self, services):
+ super().__init__(services)
+ btSession.setReportSpeed(services.speedMeter.addSpeed)
+
def parsers(self):
return [TorrentParser()]
def taskCard(self, task, parent=None):
from .cards import BTTaskCard
- return BTTaskCard(task, parent)
+ return BTTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
def draftCard(self, task, parent=None):
from .cards import BTDraftCard
- return BTDraftCard(task, parent)
+ return BTDraftCard(task, self._services.categoryService, parent)
def optionCards(self, task, parent=None):
from app.view.components.option_cards import OutputFolderCard
@@ -128,6 +132,5 @@ class BitTorrentPack(FeaturePack):
),
]
- def stop(self):
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(btSession.close())
+ async def deactivate(self):
+ await btSession.close()
diff --git a/features/bittorrent_pack/session.py b/features/bittorrent_pack/session.py
index 1b7ae0ac..a26a18de 100644
--- a/features/bittorrent_pack/session.py
+++ b/features/bittorrent_pack/session.py
@@ -12,7 +12,6 @@ from PySide6.QtCore import QObject, Signal
from app.config.cfg import cfg, proxy
from app.models.task import TaskError, TaskStatus
-from app.services.speed_meter import speedMeter
from .config import bittorrentConfig
@@ -41,7 +40,7 @@ _RESUME_SAVE_INTERVAL = 30
@dataclass(eq=False)
-class _ActiveTorrent:
+class ActiveTorrent:
task: BTTask
step: BTTaskStep
handle: lt.torrent_handle
@@ -70,7 +69,8 @@ class BTSession(QObject):
super().__init__(parent)
self._session: lt.session | None = None
self._poller: asyncio.Task | None = None
- self._active: dict[str, _ActiveTorrent] = {}
+ self._active: dict[str, ActiveTorrent] = {}
+ self._reportSpeed = None
for item in (
bittorrentConfig.maxUploadSpeed,
bittorrentConfig.maxConnections,
@@ -82,6 +82,9 @@ class BTSession(QObject):
# ── public interface ──
+ def setReportSpeed(self, reportSpeed):
+ self._reportSpeed = reportSpeed
+
async def run(self, task: BTTask, step: BTTaskStep) -> None:
self.open()
handle = self._addTorrent(task)
@@ -92,7 +95,7 @@ class BTSession(QObject):
handle.force_dht_announce()
done = asyncio.get_running_loop().create_future()
- entry = _ActiveTorrent(
+ entry = ActiveTorrent(
task=task, step=step, handle=handle,
done=done, seedBase=task.seedingTimeSeconds,
)
@@ -216,7 +219,7 @@ class BTSession(QObject):
return handle
- async def _saveResumeAndRemove(self, entry: _ActiveTorrent) -> None:
+ async def _saveResumeAndRemove(self, entry: ActiveTorrent) -> None:
try:
entry.handle.save_resume_data(
lt.save_resume_flags_t.flush_disk_cache | lt.save_resume_flags_t.save_info_dict
@@ -297,7 +300,7 @@ class BTSession(QObject):
self.alertReceived.emit(alert)
- def _updateTorrent(self, entry: _ActiveTorrent) -> None:
+ def _updateTorrent(self, entry: ActiveTorrent) -> None:
task = entry.task
step = entry.step
status = entry.handle.status()
@@ -308,7 +311,8 @@ class BTSession(QObject):
task.isSeeding = status.is_seeding
task.downloadRate = status.download_rate
task.uploadRate = status.upload_rate
- speedMeter.addSpeed(status.download_rate)
+ if self._reportSpeed is not None:
+ self._reportSpeed(status.download_rate)
downloaded = status.all_time_download or status.total_wanted_done or status.total_done
task.shareRatioPercent = (status.all_time_upload / downloaded * 100) if downloaded > 0 else 0.0
diff --git a/features/bittorrent_pack/task.py b/features/bittorrent_pack/task.py
index aed04831..2102bf0a 100644
--- a/features/bittorrent_pack/task.py
+++ b/features/bittorrent_pack/task.py
@@ -92,7 +92,11 @@ class BTTask(Task):
self.fileSize = sum(f.size for f in self.files if f.selected)
# 完成后补选新文件:步骤打回 WAITING,等待重新调度补下
if self.step.status == TaskStatus.COMPLETED and any(f.selected and not f.completed for f in self.files):
- self.step.setStatus(TaskStatus.WAITING, sync=False)
+ self.step.status = TaskStatus.WAITING
+ self.step.progress = 0
+ self.step.receivedBytes = 0
+ self.step.speed = 0
+ self.step.error = None
self.updateStatus()
def deleteFiles(self):
@@ -129,7 +133,7 @@ class BTTaskStep(TaskStep):
def outputPath(self) -> str:
return self.task.outputPath
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
from .session import btSession
task: BTTask = self.task
diff --git a/features/bittorrent_pack/web_tracker/card.py b/features/bittorrent_pack/web_tracker/card.py
index 6d5a5a88..646a1e0a 100644
--- a/features/bittorrent_pack/web_tracker/card.py
+++ b/features/bittorrent_pack/web_tracker/card.py
@@ -7,14 +7,14 @@ from qfluentwidgets import (
ToolTipFilter,
)
-from app.services.coroutine_runner import coroutineRunner
from ..config import bittorrentConfig
from .service import trackerService
class WebTrackerCard(SettingCard):
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, parent=None):
super().__init__(FluentIcon.GLOBE, self.tr("Web Tracker"), "", parent)
+ self._coroutineRunner = coroutineRunner
self.manageButton = PrimaryPushButton(self.tr("管理"), self)
self.refreshButton = ToolButton(FluentIcon.SYNC, self)
self._stateToolTip: StateToolTip | None = None
@@ -65,7 +65,7 @@ class WebTrackerCard(SettingCard):
self._stateToolTip.move(self._stateToolTip.getSuitablePos())
self._stateToolTip.show()
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
trackerService.refresh(),
done=self._onRefreshDone, failed=self._onRefreshFailed,
owner=self,
diff --git a/features/disk_pack/manifest.toml b/features/disk_pack/manifest.toml
index a6de767b..de92ddba 100644
--- a/features/disk_pack/manifest.toml
+++ b/features/disk_pack/manifest.toml
@@ -1,2 +1,3 @@
[pack]
entry = "pack.py"
+class = "DiskPack"
diff --git a/features/disk_pack/pack.py b/features/disk_pack/pack.py
index 96de8ad5..fd83b1f5 100644
--- a/features/disk_pack/pack.py
+++ b/features/disk_pack/pack.py
@@ -23,16 +23,19 @@ def assetNameFromUrl(url: str) -> str:
class InstallParser(TaskParser):
priority = 55
+ def __init__(self, pack):
+ self._pack = pack
+
def match(self, options: TaskOptions) -> bool:
return isinstance(options, BinaryInstallOptions)
async def parse(self, options: BinaryInstallOptions) -> Task:
- from app.services.feature_service import featureService
+ parse = self._pack._services.featureService.parse
installFolder = options.outputFolder
assetName = assetNameFromUrl(options.url)
- download = await featureService.parse(
+ download = await parse(
TaskOptions(url=options.url, outputFolder=installFolder)
)
downloadStep = download.steps[0]
@@ -59,7 +62,7 @@ class InstallParser(TaskParser):
stepIndex += 1
if options.sha256Url:
- checksumDownload = await featureService.parse(
+ checksumDownload = await parse(
TaskOptions(url=options.sha256Url, outputFolder=installFolder)
)
checksumStep = checksumDownload.steps[0]
@@ -99,4 +102,4 @@ class DiskPack(FeaturePack):
packId = "disk"
def parsers(self):
- return [InstallParser()]
+ return [InstallParser(self)]
diff --git a/features/disk_pack/task.py b/features/disk_pack/task.py
index 14fbbc77..2db7f515 100644
--- a/features/disk_pack/task.py
+++ b/features/disk_pack/task.py
@@ -108,7 +108,7 @@ class ExtractStep(TaskStep):
speedBytes, speedTime = extractedBytes, now
await asyncio.sleep(0)
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
archive = Path(self.archivePath)
if not archive.is_file():
raise TaskError("压缩包未找到:{path}", path=str(archive))
@@ -140,7 +140,7 @@ class InstallStep(TaskStep):
shouldDeleteSource: bool = True
executableNames: list[str] = field(default_factory=list)
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
sourceFolder = Path(self.sourceFolder)
installFolder = Path(self.installFolder)
archive = Path(self.archivePath) if self.archivePath else None
@@ -193,7 +193,7 @@ class ChecksumStep(TaskStep):
targetFile: str
sha256File: str
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
text = Path(self.sha256File).read_text(encoding="utf-8", errors="ignore").strip()
expected = text.split()[0].lower() if text else ""
if not expected:
@@ -218,7 +218,7 @@ class BinaryInstallStep(TaskStep):
binaryPath: str
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
path = Path(self.binaryPath)
if not path.is_file():
raise TaskError("下载的文件未找到:{path}", path=str(path))
diff --git a/features/ed2k_pack/__pycache__/session.cpython-311.pyc.5390013648 b/features/ed2k_pack/__pycache__/session.cpython-311.pyc.5390013648
new file mode 100644
index 00000000..e69de29b
diff --git a/features/ed2k_pack/config.py b/features/ed2k_pack/config.py
index f4ca96f4..bdb8e165 100644
--- a/features/ed2k_pack/config.py
+++ b/features/ed2k_pack/config.py
@@ -32,7 +32,7 @@ class ED2kConfig(PackConfig):
self.tr("goed2kd 安装目录"),
group,
)
- runtimeCard = RuntimeCard(ed2kRuntime, group)
+ runtimeCard = RuntimeCard(self._services.runtimeStatusService, self._services.coroutineRunner, self._services.taskService, ed2kRuntime, group)
installFolderCard.pathChanged.connect(runtimeCard._onInstallFolderChanged)
group.addSettingCards([
@@ -74,7 +74,6 @@ class ED2kRuntime(BinaryRuntime):
async def installTask(self):
from app.models.task import TaskOptions
- from app.services.feature_service import featureService
from disk_pack.task import InstallTask
from .task import ED2kInstallStep
@@ -84,7 +83,7 @@ class ED2kRuntime(BinaryRuntime):
binaryName = "goed2kd.exe" if sys.platform == "win32" else "goed2kd"
binaryPath = toPosixPath(installFolder / binaryName)
- download = await featureService.parse(
+ download = await self._services.featureService.parse(
TaskOptions(url=url, outputFolder=installFolder)
)
downloadStep = download.steps[0]
diff --git a/features/ed2k_pack/manifest.toml b/features/ed2k_pack/manifest.toml
index 86e7c35b..54bdc2ba 100644
--- a/features/ed2k_pack/manifest.toml
+++ b/features/ed2k_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "ED2kPack"
dependencies = ["disk_pack"]
diff --git a/features/ed2k_pack/pack.py b/features/ed2k_pack/pack.py
index 66d9cca2..71188cd9 100644
--- a/features/ed2k_pack/pack.py
+++ b/features/ed2k_pack/pack.py
@@ -32,15 +32,19 @@ class ED2kPack(FeaturePack):
packId = "ed2k"
config = ed2kConfig
+ def __init__(self, services):
+ super().__init__(services)
+ from . import task as _task_mod
+ _task_mod._coroutineRunner = services.coroutineRunner
+
def runtimes(self):
return [ed2kRuntime]
def parsers(self):
return [ED2kParser()]
- def stop(self):
+ async def deactivate(self):
from .session import ed2kSession
if ed2kSession._client is None:
return
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(ed2kSession.close())
+ await ed2kSession.close()
diff --git a/features/ed2k_pack/task.py b/features/ed2k_pack/task.py
index 93b8a0a7..ecb2e8f2 100644
--- a/features/ed2k_pack/task.py
+++ b/features/ed2k_pack/task.py
@@ -9,7 +9,8 @@ from urllib.parse import unquote
from loguru import logger
from app.models.task import Task, TaskError, TaskStep, TaskStatus
-from app.services.speed_meter import speedMeter
+
+_coroutineRunner = None
@dataclass(kw_only=True, eq=False)
@@ -22,11 +23,10 @@ class ED2kTask(Task):
return super().reset()
def deleteFiles(self):
- if self.fileHash:
- from app.services.coroutine_runner import coroutineRunner
+ if self.fileHash and _coroutineRunner is not None:
from .session import ed2kSession
try:
- coroutineRunner.submit(ed2kSession.client().remove(self.fileHash, deleteFile=True))
+ _coroutineRunner.submit(ed2kSession.client().remove(self.fileHash, deleteFile=True))
except Exception:
pass
super().deleteFiles()
@@ -34,7 +34,7 @@ class ED2kTask(Task):
@dataclass(kw_only=True)
class ED2kTaskStep(TaskStep):
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
from .python_ed2k import TransferState
from .python_ed2k.errors import ErrorCode, Error
from .session import ed2kSession
@@ -65,7 +65,7 @@ class ED2kTaskStep(TaskStep):
continue
self.receivedBytes = t.received
self.speed = t.downloadRate
- speedMeter.addSpeed(t.downloadRate)
+ reportSpeed(t.downloadRate)
if t.size > 0:
task.fileSize = t.size
self.progress = min(99.9, t.received / t.size * 100)
@@ -88,7 +88,7 @@ class ED2kInstallStep(TaskStep):
canPause = False
binaryPath: str = ""
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
path = Path(self.binaryPath)
if not path.is_file():
raise TaskError("{name} 未安装,请在设置中安装", name="goed2kd")
diff --git a/features/ffmpeg_pack/config.py b/features/ffmpeg_pack/config.py
index 8f9c3fa8..3f815217 100644
--- a/features/ffmpeg_pack/config.py
+++ b/features/ffmpeg_pack/config.py
@@ -44,7 +44,7 @@ class FFmpegConfig(PackConfig):
self.tr("FFmpeg 安装目录"),
ffmpegGroup,
)
- runtimeCard = RuntimeCard(ffmpegRuntime, ffmpegGroup)
+ runtimeCard = RuntimeCard(self._services.runtimeStatusService, self._services.coroutineRunner, self._services.taskService, ffmpegRuntime, ffmpegGroup)
installFolderCard.pathChanged.connect(runtimeCard._onInstallFolderChanged)
ffmpegGroup.addSettingCards([installFolderCard, runtimeCard])
@@ -98,7 +98,6 @@ class FFmpegRuntime(BinaryRuntime):
return line.removeprefix("ffmpeg version ").split(" Copyright", 1)[0].strip() or line
async def installTask(self) -> Task:
- from app.services.feature_service import featureService
from app.models.task import BinaryInstallOptions
target = ffmpegAssetTarget()
@@ -108,7 +107,7 @@ class FFmpegRuntime(BinaryRuntime):
("ffmpeg.exe", "ffprobe.exe") if sys.platform == "win32"
else ("ffmpeg", "ffprobe")
)
- return await featureService.parse(BinaryInstallOptions(
+ return await self._services.featureService.parse(BinaryInstallOptions(
url=url,
outputFolder=Path(ffmpegConfig.installFolder.value),
name=f"FFmpeg 安装 ({target})",
diff --git a/features/ffmpeg_pack/manifest.toml b/features/ffmpeg_pack/manifest.toml
index eef5b6e1..3576f5ed 100644
--- a/features/ffmpeg_pack/manifest.toml
+++ b/features/ffmpeg_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "FFmpegPack"
dependencies = ["http_pack", "disk_pack"]
diff --git a/features/ffmpeg_pack/pack.py b/features/ffmpeg_pack/pack.py
index a3f2dfa2..cd66a0cd 100644
--- a/features/ffmpeg_pack/pack.py
+++ b/features/ffmpeg_pack/pack.py
@@ -13,6 +13,9 @@ from .task import FFmpegResourceStep, FFmpegStep
class MergeParser(TaskParser):
priority = 60
+ def __init__(self, pack):
+ self._pack = pack
+
def match(self, options: TaskOptions) -> bool:
return isinstance(options, MergeTaskOptions)
@@ -22,10 +25,9 @@ class MergeParser(TaskParser):
if not ffmpegRuntime.path() or not ffmpegRuntime.ffprobePath():
raise RuntimeError("未找到可用的 ffmpeg 和 ffprobe,请先在设置中安装或配置 FFmpeg")
- from app.services.feature_service import featureService
-
- videoTask = await featureService.parse(options.video)
- audioTask = await featureService.parse(options.audio)
+ parse = self._pack._services.featureService.parse
+ videoTask = await parse(options.video)
+ audioTask = await parse(options.audio)
videoStep = videoTask.steps[0]
audioStep = audioTask.steps[0]
@@ -79,4 +81,4 @@ class FFmpegPack(FeaturePack):
return [ffmpegRuntime]
def parsers(self):
- return [MergeParser()]
+ return [MergeParser(self)]
diff --git a/features/ffmpeg_pack/task.py b/features/ffmpeg_pack/task.py
index cb96a927..687d1d11 100644
--- a/features/ffmpeg_pack/task.py
+++ b/features/ffmpeg_pack/task.py
@@ -55,7 +55,7 @@ class FFmpegStep(TaskStep):
suffix = f".{self.audioExtension}" if self.audioExtension else ""
return self.task.outputFolder / f"{mediaStem(self.task)}.audio{suffix}"
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
ffmpegPath = ffmpegRuntime.path()
ffprobePath = ffmpegRuntime.ffprobePath()
diff --git a/features/ftp_pack/cards.py b/features/ftp_pack/cards.py
index 9a36df4d..16e6b5d8 100644
--- a/features/ftp_pack/cards.py
+++ b/features/ftp_pack/cards.py
@@ -1,92 +1,30 @@
-from qfluentwidgets import FluentIcon, ToolButton
-
-from app.format import toReadableSize
-from app.models.task import TaskStatus
-from app.view.cards.draft_cards import UniversalDraftCard
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.draft_cards import MultiFileDraftCard
+from app.view.cards.task_cards import MultiFileTaskCard
from app.view.dialogs.file_select import FileSelectDialog
from .task import FtpTask
-def openFileSelection(task: FtpTask, parent, apply=None) -> set[int] | None:
- dialog = FileSelectDialog(task, parent)
- try:
- if not dialog.exec():
- return None
- selectedIndexes = dialog.selectedIndexes()
- (apply or task.setSelection)(selectedIndexes)
- return selectedIndexes
- finally:
- dialog.deleteLater()
-
-
-class FtpDraftCard(UniversalDraftCard):
+class FtpDraftCard(MultiFileDraftCard):
@property
def task(self) -> FtpTask:
return self._task
- def _initWidget(self):
- super()._initWidget()
- self._selectFilesButton = None
- if self.task.files and len(self.task.files) > 1:
- from qfluentwidgets import ToolTipFilter
- from qfluentwidgets import TransparentToolButton
- self._selectFilesButton = TransparentToolButton(FluentIcon.LIBRARY, self)
- self._selectFilesButton.setFixedSize(28, 28)
- self._selectFilesButton.setToolTip(self.tr("选择文件"))
- self._selectFilesButton.installEventFilter(ToolTipFilter(self._selectFilesButton))
- self._refreshSummary()
-
- def _initLayout(self):
- super()._initLayout()
- if self._selectFilesButton is not None:
- self.layout().addWidget(self._selectFilesButton)
-
- def _bind(self):
- super()._bind()
- if self._selectFilesButton is not None:
- self._selectFilesButton.clicked.connect(self._onSelectFilesClicked)
-
- def _refreshSummary(self):
- if not self.task.files or len(self.task.files) <= 1:
- self.sizeLabel.setText(toReadableSize(self.task.fileSize))
- return
- self.sizeLabel.setText(
- self.tr("{0}/{1} 个文件 · {2}").format(
- self.task.countSelected,
- len(self.task.files),
- toReadableSize(self.task.fileSize),
- )
- )
-
def _onSelectFilesClicked(self):
- if openFileSelection(self.task, self.window()) is not None:
- self._refreshSummary()
-
-class FtpTaskCard(UniversalTaskCard):
- def __init__(self, task: FtpTask, parent=None):
- super().__init__(task, parent)
- self.selectFilesButton = None
- if task.files and len(task.files) > 1:
- self.selectFilesButton = ToolButton(FluentIcon.LIBRARY, self)
- self.hBoxLayout.insertWidget(
- self.hBoxLayout.indexOf(self.verifyHashButton),
- self.selectFilesButton,
- )
- self.selectFilesButton.clicked.connect(self._onSelectFilesClicked)
+ dialog = FileSelectDialog(self.task, self.window())
+ try:
+ if dialog.exec():
+ self.task.setSelection(dialog.selectedIndexes())
+ self._refreshSummary()
+ finally:
+ dialog.deleteLater()
- def refresh(self, force: bool = False) -> None:
- super().refresh(force=force)
- if self.task.status in {TaskStatus.WAITING, TaskStatus.COMPLETED} and self.selectFilesButton is not None and not self._isFileMissing:
- selected = sum(1 for f in self.task.files if f.selected)
- self.statusLabel.setText(self.tr("{0}/{1} 个文件").format(selected, len(self.task.files)))
+class FtpTaskCard(MultiFileTaskCard):
def _onSelectFilesClicked(self):
- from app.services.task_service import taskService
openFileSelection(
- self.task, self.window(),
- apply=lambda indexes: taskService.applySelection(self.task, indexes),
+ self._task, self.window(),
+ apply=lambda indexes: self._taskService.applySelection(self._task, indexes),
)
self.refresh(force=True)
diff --git a/features/ftp_pack/manifest.toml b/features/ftp_pack/manifest.toml
index a6de767b..7cf5abe0 100644
--- a/features/ftp_pack/manifest.toml
+++ b/features/ftp_pack/manifest.toml
@@ -1,2 +1,3 @@
[pack]
entry = "pack.py"
+class = "FtpPack"
diff --git a/features/ftp_pack/pack.py b/features/ftp_pack/pack.py
index 2581737d..6bc4e2ec 100644
--- a/features/ftp_pack/pack.py
+++ b/features/ftp_pack/pack.py
@@ -127,11 +127,11 @@ class FtpPack(FeaturePack):
def taskCard(self, task, parent=None):
from .cards import FtpTaskCard
- return FtpTaskCard(task, parent)
+ return FtpTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
def draftCard(self, task, parent=None):
from .cards import FtpDraftCard
- return FtpDraftCard(task, parent)
+ return FtpDraftCard(task, self._services.categoryService, parent)
def optionCards(self, task, parent=None):
from app.view.components.option_cards import OutputFolderCard, SubworkerCountCard
diff --git a/features/ftp_pack/task.py b/features/ftp_pack/task.py
index 20affb03..684c64d8 100644
--- a/features/ftp_pack/task.py
+++ b/features/ftp_pack/task.py
@@ -17,8 +17,6 @@ from app.config.cfg import cfg
from app.models.task import Task, TaskError, TaskStep, TaskFile, TaskStatus, SpecialFileSize
from app.platform.filesystem import deletePath, toPosixPath
from app.platform.sysio import ftruncate, pwrite
-from app.services.speed_meter import speedMeter
-
FTP_CONNECTION_TIMEOUT = 15
FTP_SOCKET_TIMEOUT = 30
FTP_PATH_TIMEOUT = 30
@@ -141,10 +139,10 @@ class FtpStep(TaskStep):
if "subworkerCount" in options:
self.subworkerCount = options["subworkerCount"]
- def setStatus(self, status: TaskStatus, sync: bool = True):
+ def setStatus(self, status: TaskStatus):
if status == TaskStatus.COMPLETED:
self.receivedBytes = self.fileSize
- super().setStatus(status, sync=sync)
+ super().setStatus(status)
@classmethod
def fromFile(cls, file: TaskFile, task: Task) -> FtpStep:
@@ -329,8 +327,8 @@ class FtpStep(TaskStep):
return
pwrite(fd, chunk, subworker.position)
subworker.receivedBytes += len(chunk)
- speedMeter.addSpeed(len(chunk))
- await speedMeter.waitForSpeedLimit()
+ self._reportSpeed(len(chunk))
+ await self._waitForSpeedLimit()
except Exception as e:
if self._stopping or self.task.status != TaskStatus.RUNNING:
raise CancelledError
@@ -355,8 +353,8 @@ class FtpStep(TaskStep):
return
pwrite(fd, chunk, subworker.receivedBytes)
subworker.receivedBytes += len(chunk)
- speedMeter.addSpeed(len(chunk))
- await speedMeter.waitForSpeedLimit()
+ self._reportSpeed(len(chunk))
+ await self._waitForSpeedLimit()
except Exception as e:
if self._stopping or self.task.status != TaskStatus.RUNNING:
raise CancelledError
@@ -384,8 +382,8 @@ class FtpStep(TaskStep):
chunkSize = len(chunk)
subworker.receivedBytes += chunkSize
remaining -= chunkSize
- speedMeter.addSpeed(chunkSize)
- await speedMeter.waitForSpeedLimit()
+ self._reportSpeed(chunkSize)
+ await self._waitForSpeedLimit()
break
except Exception as e:
if self._stopping or self.task.status != TaskStatus.RUNNING:
@@ -420,7 +418,9 @@ class FtpStep(TaskStep):
with suppress(Exception, CancelledError):
t.result()
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
+ self._reportSpeed = reportSpeed
+ self._waitForSpeedLimit = waitForSpeedLimit
self._subworkers: list[FtpSubworker] = []
self._subworkerTasks: set[asyncio.Task] = set()
self._speedHistory: list[int] = []
diff --git a/features/github_pack/config.py b/features/github_pack/config.py
index cc29699a..d2aa0ca3 100644
--- a/features/github_pack/config.py
+++ b/features/github_pack/config.py
@@ -84,7 +84,8 @@ class GitHubProxySiteValidator(ConfigValidator):
class GitHubProxySiteCard(SettingCard):
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, parent=None):
+ self._coroutineRunner = coroutineRunner
super().__init__(
FluentIcon.GLOBE, self.tr("代理站"),
self.tr("选择 GitHub 反向代理站,延迟仅供参考"), parent,
@@ -177,9 +178,7 @@ class GitHubProxySiteCard(SettingCard):
self._latencies = {s: None for s in GITHUB_PROXY_SITES}
self._refreshLatencyLabels()
self.refreshButton.setEnabled(False)
- from app.services.coroutine_runner import coroutineRunner
-
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
probeProxyLatencies(),
done=self._onLatenciesDone, failed=self._onLatenciesFailed,
owner=self,
@@ -211,7 +210,7 @@ class GitHubConfig(PackConfig):
self.tr("命中 GitHub 文件链接时,自动改写为所选反向代理站"),
self.enabled, githubGroup,
)
- proxySiteCard = GitHubProxySiteCard(githubGroup)
+ proxySiteCard = GitHubProxySiteCard(self._services.coroutineRunner, githubGroup)
githubGroup.addSettingCards([enableCard, proxySiteCard])
return [githubGroup]
diff --git a/features/github_pack/manifest.toml b/features/github_pack/manifest.toml
index 784ec150..390da33b 100644
--- a/features/github_pack/manifest.toml
+++ b/features/github_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "GitHubPack"
dependencies = ["http_pack"]
diff --git a/features/github_pack/pack.py b/features/github_pack/pack.py
index 9b7140ef..447fbb5c 100644
--- a/features/github_pack/pack.py
+++ b/features/github_pack/pack.py
@@ -44,6 +44,9 @@ def isGitHubFileUrl(url: str) -> bool:
class GitHubParser(TaskParser):
priority = 90
+ def __init__(self, pack):
+ self._pack = pack
+
def match(self, options: TaskOptions) -> bool:
return (
githubConfig.enabled.value
@@ -53,10 +56,9 @@ class GitHubParser(TaskParser):
async def parse(self, options: TaskOptions) -> Task:
from dataclasses import replace
- from app.services.feature_service import featureService
proxiedUrl = f"{selectedProxySite().rstrip('/')}/{options.url.lstrip('/')}"
- task = await featureService.parse(replace(options, url=proxiedUrl))
+ task = await self._pack._services.featureService.parse(replace(options, url=proxiedUrl))
task.url = options.url
task.packId = "github"
return task
@@ -67,7 +69,7 @@ class GitHubPack(FeaturePack):
config = githubConfig
def parsers(self):
- return [GitHubParser()]
+ return [GitHubParser(self)]
def optionCards(self, task, parent=None):
from http_pack.pack import HttpPack
@@ -79,4 +81,4 @@ class GitHubPack(FeaturePack):
def taskCard(self, task, parent=None):
from http_pack.cards import HttpTaskCard
- return HttpTaskCard(task, parent)
+ return HttpTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
diff --git a/features/http_pack/cards.py b/features/http_pack/cards.py
index b385202f..19a49598 100644
--- a/features/http_pack/cards.py
+++ b/features/http_pack/cards.py
@@ -3,7 +3,7 @@ from PySide6.QtGui import QColor, QPainter, QPaintEvent
from PySide6.QtWidgets import QWidget
from qfluentwidgets import isDarkTheme, themeColor
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.task_cards import TaskCard
from .task import HttpTaskStep
FILL_EASING = 0.25
@@ -91,7 +91,7 @@ class SegmentedProgressBar(QWidget):
painter.drawRoundedRect(QRectF(x, 0, w, height), radius, radius)
-class HttpTaskCard(UniversalTaskCard):
+class HttpTaskCard(TaskCard):
def _buildProgressBar(self) -> QWidget:
step = self.task.steps[0] if self.task.steps else None
if isinstance(step, HttpTaskStep) and step.canUseRangeRequests and step.fileSize > 0 and step.subworkerCount > 1:
diff --git a/features/http_pack/manifest.toml b/features/http_pack/manifest.toml
index 90158411..d7cb4e26 100644
--- a/features/http_pack/manifest.toml
+++ b/features/http_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "HttpPack"
dependencies = []
diff --git a/features/http_pack/pack.py b/features/http_pack/pack.py
index d4a3f00e..32c9b9fe 100644
--- a/features/http_pack/pack.py
+++ b/features/http_pack/pack.py
@@ -233,4 +233,4 @@ class HttpPack(FeaturePack):
def taskCard(self, task, parent=None):
from .cards import HttpTaskCard
- return HttpTaskCard(task, parent)
+ return HttpTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
diff --git a/features/http_pack/task.py b/features/http_pack/task.py
index fe841b3a..8139697c 100644
--- a/features/http_pack/task.py
+++ b/features/http_pack/task.py
@@ -14,8 +14,6 @@ from app.client import buildClient, toEmulation
from app.config.cfg import cfg
from app.models.task import Task, TaskError, TaskStep, TaskStatus, SpecialFileSize
from app.platform.sysio import ftruncate, pwrite
-from app.services.speed_meter import speedMeter
-
PERMANENT_STATUS = frozenset({400, 401, 403, 404, 405, 410, 451})
@@ -258,8 +256,8 @@ class HttpTaskStep(TaskStep):
continue
pwrite(fd, chunk, subworker.position)
subworker.receivedBytes += len(chunk)
- speedMeter.addSpeed(len(chunk))
- await speedMeter.waitForSpeedLimit()
+ self._reportSpeed(len(chunk))
+ await self._waitForSpeedLimit()
finally:
response.close()
return
@@ -288,8 +286,8 @@ class HttpTaskStep(TaskStep):
continue
pwrite(fd, chunk, subworker.receivedBytes)
subworker.receivedBytes += len(chunk)
- speedMeter.addSpeed(len(chunk))
- await speedMeter.waitForSpeedLimit()
+ self._reportSpeed(len(chunk))
+ await self._waitForSpeedLimit()
finally:
response.close()
ftruncate(fd, subworker.receivedBytes)
@@ -325,8 +323,8 @@ class HttpTaskStep(TaskStep):
chunk = chunk[:remaining]
pwrite(fd, chunk, subworker.position)
subworker.receivedBytes += len(chunk)
- speedMeter.addSpeed(len(chunk))
- await speedMeter.waitForSpeedLimit()
+ self._reportSpeed(len(chunk))
+ await self._waitForSpeedLimit()
if subworker.position > subworker.end:
break
finally:
@@ -345,7 +343,9 @@ class HttpTaskStep(TaskStep):
self._reassignSubworker()
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
+ self._reportSpeed = reportSpeed
+ self._waitForSpeedLimit = waitForSpeedLimit
self._taskGroup = TaskGroup()
self._speedHistory: list[int] = []
self._accelCheckTime = 0
diff --git a/features/huggingface_pack/cards.py b/features/huggingface_pack/cards.py
index c872bd45..ed70c0b9 100644
--- a/features/huggingface_pack/cards.py
+++ b/features/huggingface_pack/cards.py
@@ -1,53 +1,17 @@
from __future__ import annotations
-from qfluentwidgets import FluentIcon, ToolButton, ToolTipFilter, TransparentToolButton
-
-from app.format import toReadableSize
-from app.models.task import TaskStatus
-from app.view.cards.draft_cards import UniversalDraftCard
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.draft_cards import MultiFileDraftCard
+from app.view.cards.task_cards import MultiFileTaskCard
from app.view.dialogs.file_select import FileSelectDialog
from .task import HuggingFaceTask
-class HuggingFaceDraftCard(UniversalDraftCard):
+class HuggingFaceDraftCard(MultiFileDraftCard):
@property
def task(self) -> HuggingFaceTask:
return self._task
- def _initWidget(self) -> None:
- super()._initWidget()
- self._selectFilesButton = None
- if self.task.files and len(self.task.files) > 1:
- self._selectFilesButton = TransparentToolButton(FluentIcon.LIBRARY, self)
- self._selectFilesButton.setFixedSize(28, 28)
- self._selectFilesButton.setToolTip(self.tr("选择文件"))
- self._selectFilesButton.installEventFilter(ToolTipFilter(self._selectFilesButton))
- self._refreshSummary()
-
- def _initLayout(self) -> None:
- super()._initLayout()
- if self._selectFilesButton is not None:
- self.layout().addWidget(self._selectFilesButton)
-
- def _bind(self) -> None:
- super()._bind()
- if self._selectFilesButton is not None:
- self._selectFilesButton.clicked.connect(self._onSelectFilesClicked)
-
- def _refreshSummary(self) -> None:
- if not self.task.files or len(self.task.files) <= 1:
- self.sizeLabel.setText(toReadableSize(self.task.fileSize))
- return
- self.sizeLabel.setText(
- self.tr("{0}/{1} 个文件 · {2}").format(
- self.task.countSelected,
- len(self.task.files),
- toReadableSize(self.task.fileSize),
- )
- )
-
def _onSelectFilesClicked(self) -> None:
dialog = FileSelectDialog(self.task, self.window())
try:
@@ -59,30 +23,13 @@ class HuggingFaceDraftCard(UniversalDraftCard):
dialog.deleteLater()
-class HuggingFaceTaskCard(UniversalTaskCard):
- def __init__(self, task: HuggingFaceTask, parent=None):
- super().__init__(task, parent)
- self.selectFilesButton = None
- if task.files and len(task.files) > 1:
- self.selectFilesButton = ToolButton(FluentIcon.LIBRARY, self)
- self.hBoxLayout.insertWidget(
- self.hBoxLayout.indexOf(self.verifyHashButton),
- self.selectFilesButton,
- )
- self.selectFilesButton.clicked.connect(self._onSelectFilesClicked)
-
- def refresh(self, force: bool = False) -> None:
- super().refresh(force=force)
- if self._task.status in {TaskStatus.WAITING, TaskStatus.COMPLETED} and self.selectFilesButton is not None and not self._isFileMissing:
- selected = sum(1 for f in self._task.files if f.selected)
- self.statusLabel.setText(self.tr("{0}/{1} 个文件").format(selected, len(self._task.files)))
+class HuggingFaceTaskCard(MultiFileTaskCard):
def _onSelectFilesClicked(self) -> None:
- from app.services.task_service import taskService
dialog = FileSelectDialog(self._task, self.window())
try:
if dialog.exec():
- taskService.applySelection(self._task, dialog.selectedIndexes())
+ self._taskService.applySelection(self._task, dialog.selectedIndexes())
self.refresh(force=True)
finally:
dialog.deleteLater()
diff --git a/features/huggingface_pack/config.py b/features/huggingface_pack/config.py
index 3795b448..2df21184 100644
--- a/features/huggingface_pack/config.py
+++ b/features/huggingface_pack/config.py
@@ -83,7 +83,8 @@ class HuggingFaceProxySiteValidator(ConfigValidator):
class HuggingFaceProxySiteCard(SettingCard):
- def __init__(self, parent=None):
+ def __init__(self, coroutineRunner, parent=None):
+ self._coroutineRunner = coroutineRunner
super().__init__(
FluentIcon.GLOBE, self.tr("镜像站"),
self.tr("选择 HuggingFace 镜像站,延迟仅供参考"), parent,
@@ -176,8 +177,7 @@ class HuggingFaceProxySiteCard(SettingCard):
self._latencies = {s: None for s in HF_PROXY_SITES}
self._refreshLatencyLabels()
self.refreshButton.setEnabled(False)
- from app.services.coroutine_runner import coroutineRunner
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
probeProxyLatencies(),
done=self._onLatenciesDone, failed=self._onLatenciesFailed,
owner=self,
@@ -237,7 +237,7 @@ class HuggingFaceConfig(PackConfig):
self.tr("命中 HuggingFace 链接时,自动改写为所选镜像站"),
self.isEnabled, group,
),
- HuggingFaceProxySiteCard(group),
+ HuggingFaceProxySiteCard(self._services.coroutineRunner, group),
HuggingFaceTokenCard(group),
])
return [group]
diff --git a/features/huggingface_pack/manifest.toml b/features/huggingface_pack/manifest.toml
index 784ec150..0e3e1e12 100644
--- a/features/huggingface_pack/manifest.toml
+++ b/features/huggingface_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "HuggingFacePack"
dependencies = ["http_pack"]
diff --git a/features/huggingface_pack/pack.py b/features/huggingface_pack/pack.py
index de54c21d..c70fea2c 100644
--- a/features/huggingface_pack/pack.py
+++ b/features/huggingface_pack/pack.py
@@ -202,11 +202,11 @@ class HuggingFacePack(FeaturePack):
def draftCard(self, task, parent=None):
from .cards import HuggingFaceDraftCard
- return HuggingFaceDraftCard(task, parent)
+ return HuggingFaceDraftCard(task, self._services.categoryService, parent)
def taskCard(self, task, parent=None):
from .cards import HuggingFaceTaskCard
- return HuggingFaceTaskCard(task, parent)
+ return HuggingFaceTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
def optionCards(self, task, parent=None):
from app.view.components.option_cards import OutputFolderCard
diff --git a/features/jack_yao/manifest.toml b/features/jack_yao/manifest.toml
index 90158411..40e31e7e 100644
--- a/features/jack_yao/manifest.toml
+++ b/features/jack_yao/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "JackYaoPack"
dependencies = []
diff --git a/features/jack_yao/pack.py b/features/jack_yao/pack.py
index fef031ac..1dd27b18 100644
--- a/features/jack_yao/pack.py
+++ b/features/jack_yao/pack.py
@@ -81,9 +81,8 @@ class CatalogPage(PackPage, ScrollArea):
self._loadingWidget.retryRequested.connect(self._loadCatalog)
def _loadCatalog(self):
- from app.services.coroutine_runner import coroutineRunner
self._loadingWidget.setLoading()
- coroutineRunner.submit(
+ _services.coroutineRunner.submit(
fetchCatalog(),
done=self._onCatalogLoaded, failed=self._onCatalogFailed,
owner=self,
@@ -251,9 +250,6 @@ class CatalogDownloadDialog(MessageBoxBase):
def _onStartClicked(self):
from qfluentwidgets import InfoBar, InfoBarPosition
from app.models.task import ResourceTaskOptions
- from app.services.coroutine_runner import coroutineRunner
- from app.services.feature_service import featureService
- from app.services.task_service import taskService
index = self._versionCard.comboBox.currentIndex()
item = self._items[index]
@@ -264,14 +260,14 @@ class CatalogDownloadDialog(MessageBoxBase):
def onParsed(task):
for step in task.steps:
step.setOptions(options)
- taskService.add(task)
+ _services.taskService.add(task)
def onFailed(error):
InfoBar.error(failedTitle, str(error), duration=-1,
position=InfoBarPosition.BOTTOM_RIGHT, parent=window)
- coroutineRunner.submit(
- featureService.parse(ResourceTaskOptions(
+ _services.coroutineRunner.submit(
+ _services.featureService.parse(ResourceTaskOptions(
url=item["Url"],
outputFolder=options.get("outputFolder", Path(cfg.downloadFolder.value)),
)),
@@ -282,8 +278,16 @@ class CatalogDownloadDialog(MessageBoxBase):
self.accept()
+_services = None
+
+
class JackYaoPack(FeaturePack):
packId = "jack_yao"
+ def __init__(self, services):
+ super().__init__(services)
+ global _services
+ _services = services
+
def pages(self):
return [CatalogPage]
diff --git a/features/m3u8_pack/cards.py b/features/m3u8_pack/cards.py
index 5e2e85f2..ff0355a1 100644
--- a/features/m3u8_pack/cards.py
+++ b/features/m3u8_pack/cards.py
@@ -8,8 +8,8 @@ from qfluentwidgets import BodyLabel, ComboBox, CompactSpinBox, FluentIcon, Tool
from app.format import toReadableSize
from app.models.task import TaskStatus
-from app.view.cards.draft_cards import UniversalDraftCard
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.draft_cards import DraftCard
+from app.view.cards.task_cards import TaskCard
from app.view.components.editors import AutoSizingEdit
from app.view.components.option_cards import OptionCard
@@ -17,11 +17,11 @@ if TYPE_CHECKING:
from .task import M3U8TaskStep
-class M3U8DraftCard(UniversalDraftCard):
+class M3U8DraftCard(DraftCard):
pass
-class M3U8TaskCard(UniversalTaskCard):
+class M3U8TaskCard(TaskCard):
def refresh(self, force: bool = False) -> None:
super().refresh(force=force)
@@ -37,7 +37,7 @@ class M3U8TaskCard(UniversalTaskCard):
return self._task.steps[0] if self._task.steps else None
-class M3U8LiveTaskCard(UniversalTaskCard):
+class M3U8LiveTaskCard(TaskCard):
def _initWidget(self) -> None:
super()._initWidget()
@@ -75,8 +75,7 @@ class M3U8LiveTaskCard(UniversalTaskCard):
if step is not None:
step.terminate()
else:
- from app.services.task_service import taskService
- taskService.start(self._task)
+ self._taskService.start(self._task)
self.refresh()
def _step(self) -> M3U8TaskStep | None:
diff --git a/features/m3u8_pack/config.py b/features/m3u8_pack/config.py
index 8c6abc0e..b20787f9 100644
--- a/features/m3u8_pack/config.py
+++ b/features/m3u8_pack/config.py
@@ -74,7 +74,7 @@ class M3U8Config(PackConfig):
self.tr("N_m3u8DL-RE 安装目录"),
m3u8Group,
)
- runtimeCard = RuntimeCard(m3u8Runtime, m3u8Group)
+ runtimeCard = RuntimeCard(self._services.runtimeStatusService, self._services.coroutineRunner, self._services.taskService, m3u8Runtime, m3u8Group)
cards = [installFolderCard, runtimeCard]
if sys.platform != "darwin":
@@ -181,13 +181,12 @@ class M3U8Runtime(BinaryRuntime):
else:
raise RuntimeError(f"当前平台暂不支持一键安装 N_m3u8DL-RE: {sys.platform}")
- from app.services.feature_service import featureService
from app.models.task import BinaryInstallOptions
extension = "zip" if sys.platform == "win32" else "tar.gz"
assetName = f"N_m3u8DL-RE_{RELEASE_TAG}_{target}_{RELEASE_DATE}.{extension}"
binaryName = "N_m3u8DL-RE.exe" if sys.platform == "win32" else "N_m3u8DL-RE"
- return await featureService.parse(BinaryInstallOptions(
+ return await self._services.featureService.parse(BinaryInstallOptions(
url=f"{RELEASE_BASE}/{assetName}",
outputFolder=Path(m3u8Config.installFolder.value),
name=f"N_m3u8DL-RE 安装 ({target})",
diff --git a/features/m3u8_pack/manifest.toml b/features/m3u8_pack/manifest.toml
index b7043905..f09ec6b5 100644
--- a/features/m3u8_pack/manifest.toml
+++ b/features/m3u8_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "M3U8Pack"
dependencies = ["http_pack", "disk_pack", "ffmpeg_pack"]
diff --git a/features/m3u8_pack/pack.py b/features/m3u8_pack/pack.py
index afada29b..37b9867f 100644
--- a/features/m3u8_pack/pack.py
+++ b/features/m3u8_pack/pack.py
@@ -244,8 +244,9 @@ class M3U8Parser(TaskParser):
class M3U8Pack(FeaturePack):
packId = "m3u8"
- def __init__(self):
+ def __init__(self, services):
self.config = m3u8Config
+ super().__init__(services)
def runtimes(self):
return [m3u8Runtime]
@@ -256,12 +257,12 @@ class M3U8Pack(FeaturePack):
def taskCard(self, task, parent=None):
from .cards import M3U8TaskCard, M3U8LiveTaskCard
if getattr(task, "isLive", False):
- return M3U8LiveTaskCard(task, parent)
- return M3U8TaskCard(task, parent)
+ return M3U8LiveTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
+ return M3U8TaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
def draftCard(self, task, parent=None):
from .cards import M3U8DraftCard
- return M3U8DraftCard(task, parent)
+ return M3U8DraftCard(task, self._services.categoryService, parent)
def optionCards(self, task, parent=None):
from app.view.components.option_cards import HeadersEditCard, OutputFolderCard
diff --git a/features/m3u8_pack/task.py b/features/m3u8_pack/task.py
index a60b5842..d007ad02 100644
--- a/features/m3u8_pack/task.py
+++ b/features/m3u8_pack/task.py
@@ -43,7 +43,10 @@ class M3U8Task(Task):
for step in self.steps:
if isinstance(step, M3U8TaskStep) and step.status != TaskStatus.COMPLETED:
step._findOutputFile()
- step.setStatus(TaskStatus.COMPLETED, sync=False)
+ step.status = TaskStatus.COMPLETED
+ step.progress = 100
+ step.speed = 0
+ step.error = None
self.updateStatus()
def _move(self, newFolder: Path) -> None:
@@ -338,7 +341,7 @@ class M3U8TaskStep(TaskStep):
if found.name != self.task.name:
self.task.setName(found.name)
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
self._stopping = False
self._process = None
diff --git a/features/yt_dlp_pack/cards.py b/features/yt_dlp_pack/cards.py
index 7b6debb2..512d0563 100644
--- a/features/yt_dlp_pack/cards.py
+++ b/features/yt_dlp_pack/cards.py
@@ -6,13 +6,13 @@ from PySide6.QtWidgets import QAbstractItemView, QHBoxLayout, QHeaderView, QWidg
from qfluentwidgets import (
BodyLabel, ComboBox, FluentIcon, IndeterminateProgressRing,
MessageBoxBase, PrimaryPushButton, ProgressBar, PushButton, SubtitleLabel,
- ToolButton, ToolTipFilter, TransparentToolButton,
+ ToolTipFilter, TransparentToolButton,
)
from app.format import toReadableSize
from app.models.task import TaskStatus
-from app.view.cards.draft_cards import UniversalDraftCard
-from app.view.cards.task_cards import UniversalTaskCard
+from app.view.cards.draft_cards import DraftCard
+from app.view.cards.task_cards import MultiFileTaskCard
from app.view.components.tree_view import AutoSizingTreeView
from .config import ytDlpConfig
from .task import STEPS_PER_VIDEO, YouTubeTask
@@ -75,7 +75,11 @@ STEP_LABELS = {
}
-class YtDlpDraftCard(UniversalDraftCard):
+class YtDlpDraftCard(DraftCard):
+
+ def __init__(self, task, categoryService, *, coroutineRunner, parent=None):
+ self._coroutineRunner = coroutineRunner
+ super().__init__(task, categoryService, parent)
def _initWidget(self) -> None:
super()._initWidget()
@@ -131,10 +135,9 @@ class YtDlpDraftCard(UniversalDraftCard):
self._videoSelectButton.clicked.connect(self._onVideoSelectClicked)
def _startMediaInfoFetch(self) -> None:
- from app.services.coroutine_runner import coroutineRunner
from features.yt_dlp_pack.pack import YouTubeParser
parser = YouTubeParser()
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
parser.fetchFormats(self._task.url),
done=self._onMediaInfoLoaded,
failed=self._onMediaInfoFailed,
@@ -185,10 +188,9 @@ class YtDlpDraftCard(UniversalDraftCard):
if not task.files:
self._videoSelectButton.hide()
self._playlistSpinner.show()
- from app.services.coroutine_runner import coroutineRunner
from features.yt_dlp_pack.pack import YouTubeParser
parser = YouTubeParser()
- coroutineRunner.submit(
+ self._coroutineRunner.submit(
parser.fetchPlaylist(task.url),
done=self._onPlaylistLoaded,
failed=self._onPlaylistFailed,
@@ -405,27 +407,19 @@ class VideoSelectDialog(MessageBoxBase):
}
-class YtDlpTaskCard(UniversalTaskCard):
+class YtDlpTaskCard(MultiFileTaskCard):
- def __init__(self, task: YouTubeTask, parent=None):
- super().__init__(task, parent)
- self.selectFilesButton = None
- if task.files and len(task.files) > 1:
- self.selectFilesButton = ToolButton(FluentIcon.LIBRARY, self)
- self.hBoxLayout.insertWidget(
- self.hBoxLayout.indexOf(self.verifyHashButton),
- self.selectFilesButton,
- )
+ def __init__(self, task: YouTubeTask, taskService, categoryService, parent=None):
+ super().__init__(task, taskService, categoryService, parent)
+ if self.selectFilesButton:
self.selectFilesButton.setToolTip(self.tr("选择视频"))
self.selectFilesButton.installEventFilter(ToolTipFilter(self.selectFilesButton))
- self.selectFilesButton.clicked.connect(self._onSelectVideosClicked)
- def _onSelectVideosClicked(self) -> None:
- from app.services.task_service import taskService
+ def _onSelectFilesClicked(self) -> None:
dialog = VideoSelectDialog(self._task.files, self.window())
try:
if dialog.exec():
- taskService.applySelection(self._task, dialog.selectedIndices())
+ self._taskService.applySelection(self._task, dialog.selectedIndices())
self.refresh(force=True)
finally:
dialog.deleteLater()
diff --git a/features/yt_dlp_pack/config.py b/features/yt_dlp_pack/config.py
index ec880dd6..6cbce7fe 100644
--- a/features/yt_dlp_pack/config.py
+++ b/features/yt_dlp_pack/config.py
@@ -69,7 +69,7 @@ class YtDlpConfig(PackConfig):
group = CollapsibleSettingCardGroup(self.tr("YouTube 下载"), "ytdlp", parent)
- runtimeCard = RuntimeCard(youTubeRuntime, group)
+ runtimeCard = RuntimeCard(self._services.runtimeStatusService, self._services.coroutineRunner, self._services.taskService, youTubeRuntime, group)
cards = [runtimeCard]
if not IS_ANDROID:
@@ -226,10 +226,9 @@ class YouTubeRuntime(BinaryRuntime):
from disk_pack.task import BinaryInstallStep
from app.models.task import TaskOptions
- from app.services.feature_service import featureService
qjsBinaryName = "qjs.exe" if sys.platform == "win32" else "qjs"
- qjsDownload = await featureService.parse(TaskOptions(
+ qjsDownload = await self._services.featureService.parse(TaskOptions(
url=f"{QJS_RELEASE_BASE}/{_qjsAssetName()}",
outputFolder=installFolder,
))
diff --git a/features/yt_dlp_pack/manifest.toml b/features/yt_dlp_pack/manifest.toml
index b7043905..e92cc737 100644
--- a/features/yt_dlp_pack/manifest.toml
+++ b/features/yt_dlp_pack/manifest.toml
@@ -1,3 +1,4 @@
[pack]
entry = "pack.py"
+class = "YouTubePack"
dependencies = ["http_pack", "disk_pack", "ffmpeg_pack"]
diff --git a/features/yt_dlp_pack/pack.py b/features/yt_dlp_pack/pack.py
index 523123d2..c6129319 100644
--- a/features/yt_dlp_pack/pack.py
+++ b/features/yt_dlp_pack/pack.py
@@ -81,8 +81,9 @@ class YouTubeParser(TaskParser):
class YouTubePack(FeaturePack):
packId = "ytdlp"
- def __init__(self):
+ def __init__(self, services):
self.config = ytDlpConfig
+ super().__init__(services)
def runtimes(self):
return [youTubeRuntime]
@@ -92,11 +93,11 @@ class YouTubePack(FeaturePack):
def taskCard(self, task, parent=None):
from .cards import YtDlpTaskCard
- return YtDlpTaskCard(task, parent)
+ return YtDlpTaskCard(task, self._services.taskService, self._services.featureService, self._services.categoryService, parent)
def draftCard(self, task, parent=None):
from .cards import YtDlpDraftCard
- return YtDlpDraftCard(task, parent)
+ return YtDlpDraftCard(task, self._services.categoryService, parent)
def optionCards(self, task, parent=None):
from app.view.components.option_cards import OutputFolderCard
diff --git a/features/yt_dlp_pack/task.py b/features/yt_dlp_pack/task.py
index dd545088..d6970dd9 100644
--- a/features/yt_dlp_pack/task.py
+++ b/features/yt_dlp_pack/task.py
@@ -205,7 +205,7 @@ class YouTubeExtractStep(TaskStep):
fileIndex: int = 0
videoUrl: str = ""
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
if self._hasFreshSiblingUrls():
self.setStatus(TaskStatus.COMPLETED)
return
@@ -360,7 +360,7 @@ class YouTubeResourceStep(FFmpegResourceStep):
suffix = f".{self.extension}" if self.extension else ""
return str(self.task.outputFolder / f"{stem}.{self.role}{suffix}")
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
if not self.url:
self.setStatus(TaskStatus.COMPLETED)
return
@@ -393,7 +393,7 @@ class YouTubeMergeStep(FFmpegStep):
suffix = f".{self.audioExtension}" if self.audioExtension else ""
return self.task.outputFolder / f"{stem}.audio{suffix}"
- async def run(self) -> None:
+ async def run(self, reportSpeed, waitForSpeedLimit) -> None:
hasVideo = self._videoPath.exists()
hasAudio = self._audioPath.exists()
diff --git a/pyproject.toml b/pyproject.toml
index e121de4c..856b2435 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,5 +24,12 @@ dependencies = [
[dependency-groups]
dev = [
+ "aiohttp>=3.14.2",
+ "pytest>=9.1.1",
+ "pytest-asyncio>=1.4.0",
"types-libtorrent>=2.0.11.20250816",
]
+
+[tool.pytest.ini_options]
+pythonpath = ["."]
+asyncio_mode = "auto"
diff --git a/tests/test_file_selection.py b/tests/test_file_selection.py
deleted file mode 100644
index 2699a609..00000000
--- a/tests/test_file_selection.py
+++ /dev/null
@@ -1,578 +0,0 @@
-"""文件选择标志过滤语义与动态编排的分支测试。
-
-背景:多文件任务的选择语义从"增删 Step"统一为"标志过滤"(ADR 0008),
-并支持任意状态下修改选择(taskService.applySelection)。
-
-覆盖:
- - 基类:_isStepSelected 全分支、setSelection 纯标志翻转、
- updateStatus/setStatus/pendingSteps/currentSnapshot 的选择过滤、
- _updateFilesFromSteps 多步聚合
- - M3U8:直播任务加载校正(假暂停定案)全状态分支
- - HF/FTP:旧存档缺失 Step 补建、解析路径不重复建
- - YouTube:setVideos 步骤组、选择感知的大小/快照/待执行步骤、
- extract 兄弟步骤按 fileIndex 更新
- - Bili:三种模式重建、P 后缀与选择解耦、字幕步按稳定身份查页
- - BT:完成后补选打回 WAITING 的判定分支
- - applySelection:暂停重启/复活/直通三条路径及其边界
-"""
-from __future__ import annotations
-
-import asyncio
-import json
-import sys
-from dataclasses import dataclass, field
-from pathlib import Path
-
-import pytest
-from PySide6.QtWidgets import QApplication
-
-ROOT = Path(__file__).resolve().parents[1]
-sys.path.insert(0, str(ROOT))
-sys.path.insert(0, str(ROOT / "features"))
-
-app = QApplication.instance() or QApplication(sys.argv)
-
-from app.models.task import SpecialFileSize, Task, TaskFile, TaskStatus, TaskStep
-from app.services.task_service import TaskQueue, taskService
-
-from bili_pack.task import BiliPage, BilibiliSubtitleStep, BilibiliTask, DownloadMode
-from bittorrent_pack.task import BTFile, BTTask, BTTaskStep
-from ftp_pack.task import FtpConnectionInfo, FtpTask
-from huggingface_pack.task import HuggingFaceFile, HuggingFaceStep, HuggingFaceTask
-from m3u8_pack.task import M3U8Task, M3U8TaskStep
-from yt_dlp_pack.task import (
- STEPS_PER_VIDEO, YouTubeExtractStep, YouTubeFile,
- YouTubeMergeStep, YouTubeResourceStep, YouTubeTask,
-)
-
-
-@dataclass(kw_only=True)
-class IndexedStep(TaskStep):
- fileIndex: int = -1
-
- async def run(self):
- self.setStatus(TaskStatus.COMPLETED)
-
-
-@dataclass(kw_only=True)
-class PlainStep(TaskStep):
- async def run(self):
- self.setStatus(TaskStatus.COMPLETED)
-
-
-def buildTask(fileStates, stepStates=None, **kwargs):
- """fileStates: [(selected, completed)],默认每文件一个同状态 Step。"""
- files = [
- TaskFile(index=i, relativePath=f"f{i}.bin", size=10, selected=sel, completed=comp)
- for i, (sel, comp) in enumerate(fileStates)
- ]
- stepStates = stepStates or [
- TaskStatus.COMPLETED if comp else TaskStatus.WAITING for _, comp in fileStates
- ]
- steps = [
- IndexedStep(stepIndex=i + 1, fileIndex=i, status=s)
- for i, s in enumerate(stepStates)
- ]
- return Task(name="t", url="https://example.com", packId="test",
- files=files, steps=steps, **kwargs)
-
-
-# ─── 基类:_isStepSelected ─────────────────────────────────
-
-
-def test_step_selected_when_no_files():
- task = Task(name="t", url="u", packId="p", steps=[IndexedStep(stepIndex=1, fileIndex=0)])
- assert task._isStepSelected(task.steps[0])
-
-
-def test_step_without_file_index_always_selected():
- task = buildTask([(False, False)])
- step = PlainStep(stepIndex=99)
- step._bindTask(task)
- assert task._isStepSelected(step)
-
-
-def test_step_selected_follows_file_flag():
- task = buildTask([(True, False), (False, False)])
- assert task._isStepSelected(task.steps[0])
- assert not task._isStepSelected(task.steps[1])
-
-
-def test_step_with_unknown_file_index_not_selected():
- task = buildTask([(True, False)])
- orphan = IndexedStep(stepIndex=9, fileIndex=42)
- orphan._bindTask(task)
- assert not task._isStepSelected(orphan)
-
-
-# ─── 基类:setSelection 纯标志翻转 ─────────────────────────
-
-
-def test_set_selection_flips_flags_without_step_churn():
- task = buildTask([(True, False), (True, False), (True, False)])
- stepIds = [id(s) for s in task.steps]
- task.steps[0].receivedBytes = 55
- task.setSelection({1, 2})
- assert [id(s) for s in task.steps] == stepIds
- assert [f.selected for f in task.files] == [False, True, True]
- assert task.fileSize == 20
- task.setSelection({0, 1, 2})
- assert task.steps[0].receivedBytes == 55 # 断点进度保留
-
-
-def test_set_selection_noop_without_files():
- task = Task(name="t", url="u", packId="p", fileSize=77)
- task.setSelection({0})
- assert task.fileSize == 77
-
-
-# ─── 基类:状态聚合过滤 ────────────────────────────────────
-
-
-def test_update_status_ignores_unselected_failed_step():
- task = buildTask([(True, True), (False, False)],
- stepStates=[TaskStatus.COMPLETED, TaskStatus.FAILED])
- assert task.updateStatus() == TaskStatus.COMPLETED
-
-
-def test_update_status_completes_when_selected_done():
- task = buildTask([(True, True), (False, False)])
- assert task.updateStatus() == TaskStatus.COMPLETED
- assert task.completedAt > 0
-
-
-def test_update_status_keeps_status_when_nothing_selected():
- task = buildTask([(False, False)], status=TaskStatus.PAUSED)
- assert task.updateStatus() == TaskStatus.PAUSED
-
-
-def test_set_status_skips_unselected_and_completed():
- task = buildTask([(True, True), (True, False), (False, False)],
- stepStates=[TaskStatus.COMPLETED, TaskStatus.FAILED, TaskStatus.WAITING])
- task.setStatus(TaskStatus.RUNNING)
- assert task.steps[0].status == TaskStatus.COMPLETED # 已完成不动
- assert task.steps[1].status == TaskStatus.RUNNING # FAILED 被 reset 后置 RUNNING
- assert task.steps[2].status == TaskStatus.WAITING # 未选中不动
-
-
-def test_pending_steps_filters_and_sorts():
- task = buildTask([(True, True), (False, False), (True, False)])
- task.steps.reverse()
- task.status = TaskStatus.RUNNING
- pending = [s.fileIndex for s in task.pendingSteps()]
- assert pending == [2] # 跳过已完成 f0、未选中 f1,且按 stepIndex 排序
-
-
-def test_pending_steps_stops_when_not_running():
- task = buildTask([(True, False)])
- assert list(task.pendingSteps()) == []
-
-
-def test_current_snapshot_counts_only_selected():
- task = buildTask([(True, False), (False, False)])
- task.steps[0].progress, task.steps[0].receivedBytes = 50.0, 500
- task.steps[1].progress, task.steps[1].receivedBytes = 100.0, 999
- progress, _speed, received = task.currentSnapshot()
- assert progress == 50.0
- assert received == 500
-
-
-def test_files_mirror_multi_step_group_progress():
- steps = [
- IndexedStep(stepIndex=1, fileIndex=0, status=TaskStatus.COMPLETED),
- IndexedStep(stepIndex=2, fileIndex=0, status=TaskStatus.WAITING),
- ]
- steps[0].receivedBytes, steps[1].receivedBytes = 30, 12
- task = Task(name="t", url="u", packId="p", steps=steps,
- files=[TaskFile(index=0, relativePath="a", size=42)])
- task.updateStatus()
- assert task.files[0].downloadedBytes == 42
- assert not task.files[0].completed # 组内还有未完成步骤
-
-
-# ─── M3U8:直播加载校正 ────────────────────────────────────
-
-
-def buildLiveTask(status, isLive=True, tmp=None):
- return M3U8Task(
- name="live.ts", url="https://example.com/live.m3u8", isLive=isLive,
- status=status, outputFolder=tmp,
- steps=[M3U8TaskStep(stepIndex=1, status=status)],
- )
-
-
[email protected]("status", [TaskStatus.PAUSED, TaskStatus.RUNNING])
-def test_live_task_finalized_on_load(tmp_path, status):
- task = buildLiveTask(status, tmp=tmp_path)
- assert task.status == TaskStatus.COMPLETED
- assert task.steps[0].status == TaskStatus.COMPLETED
- assert task.completedAt > 0
-
-
[email protected]("status", [TaskStatus.WAITING, TaskStatus.FAILED, TaskStatus.COMPLETED])
-def test_live_task_other_statuses_untouched(tmp_path, status):
- task = buildLiveTask(status, tmp=tmp_path)
- assert task.status == status
-
-
-def test_vod_task_pause_untouched(tmp_path):
- task = buildLiveTask(TaskStatus.PAUSED, isLive=False, tmp=tmp_path)
- assert task.status == TaskStatus.PAUSED
-
-
-# ─── HF/FTP:旧存档补建与解析不重复 ────────────────────────
-
-
-def hfRecord(fileStates, stepIndexes):
- return {
- "type": "HuggingFaceTask", "name": "repo", "url": "https://huggingface.co/a/b",
- "packId": "huggingface", "status": "PAUSED", "repoId": "a/b",
- "files": [
- {"index": i, "relativePath": f"f{i}.bin", "size": 10,
- "selected": sel, "downloadUrl": f"u{i}"}
- for i, sel in enumerate(fileStates)
- ],
- "steps": [
- {"type": "HuggingFaceStep", "stepIndex": i + 1, "fileIndex": i,
- "url": f"u{i}", "fileSize": 10, "status": "PAUSED"}
- for i in stepIndexes
- ],
- }
-
-
-def test_hf_rebuilds_missing_steps_from_archive():
- task = Task.fromDict(json.dumps(hfRecord([True, False, False], [0])))
- assert len(task.steps) == 3
- rebuilt = next(s for s in task.steps if s.fileIndex == 2)
- assert rebuilt.url == "u2"
-
-
-def test_hf_full_archive_no_duplicates():
- task = Task.fromDict(json.dumps(hfRecord([True, True], [0, 1])))
- assert len(task.steps) == 2
-
-
-def test_hf_parse_style_construction_no_duplicates():
- """回归:files+steps 一起构造时 __post_init__ 不得再补一份。"""
- files = [HuggingFaceFile(index=i, relativePath=f"f{i}", size=1, downloadUrl=f"u{i}")
- for i in range(3)]
- steps = [HuggingFaceStep(stepIndex=i + 1, url=f"u{i}", fileIndex=i) for i in range(3)]
- task = HuggingFaceTask(name="r", url="u", files=files, steps=steps)
- assert len(task.steps) == 3
-
-
-def test_hf_no_files_no_reconciliation():
- task = HuggingFaceTask(name="r", url="u")
- assert task.steps == []
-
-
-def test_ftp_rebuilds_missing_steps_from_archive():
- from ftp_pack.task import FtpFile
- task = FtpTask(
- name="dir", url="ftp://h/dir", sourceType="dir",
- connectionInfo=FtpConnectionInfo(
- scheme="ftp", host="h", port=21, username="", password="", sourcePath="/dir"),
- files=[
- FtpFile(index=0, relativePath="a", size=1, remotePath="/dir/a"),
- FtpFile(index=1, relativePath="b", size=2, remotePath="/dir/b", selected=False),
- ],
- )
- assert len(task.steps) == 2
- assert {s.fileIndex for s in task.steps} == {0, 1}
-
-
-# ─── YouTube ───────────────────────────────────────────────
-
-
-def buildYtTask(videoCount=3):
- task = YouTubeTask(name="list.mp4", url="https://youtube.com/watch?v=x&list=L",
- isPlaylist=True, fileSize=int(SpecialFileSize.UNKNOWN))
- task.setVideos([
- {"id": f"v{i}", "title": f"Video {i}", "duration": 60 + i}
- for i in range(videoCount)
- ])
- return task
-
-
-def test_yt_set_videos_builds_indexed_groups():
- task = buildYtTask(3)
- assert len(task.files) == 3 and len(task.steps) == 3 * STEPS_PER_VIDEO
- group1 = [s for s in task.steps if s.fileIndex == 1]
- assert [s.stepIndex for s in group1] == [5, 6, 7, 8]
- assert task.files[1].videoId == "v1"
- extract = next(s for s in group1 if isinstance(s, YouTubeExtractStep))
- assert extract.videoUrl == "https://www.youtube.com/watch?v=v1"
-
-
-def test_yt_empty_videos_keeps_placeholder_group():
- task = YouTubeTask(name="v.mp4", url="https://youtube.com/watch?v=x")
- task.setVideos([])
- assert task.files == [] and len(task.steps) == STEPS_PER_VIDEO
-
-
-def test_yt_selection_size_unknown_before_extract():
- task = buildYtTask(2)
- task.setSelection({0})
- assert task.fileSize == int(SpecialFileSize.UNKNOWN)
-
-
-def test_yt_selection_size_sums_selected_resources():
- task = buildYtTask(2)
- for s in task.steps:
- if isinstance(s, YouTubeResourceStep):
- s.fileSize = 100
- task.setSelection({1})
- assert task.fileSize == 200 # 仅组1的 video+audio
-
-
-def test_yt_pending_steps_always_yields_selected_extract():
- task = buildYtTask(2)
- for s in task.steps:
- s.status = TaskStatus.COMPLETED
- task.status = TaskStatus.RUNNING
- pending = list(task.pendingSteps())
- assert all(isinstance(s, YouTubeExtractStep) for s in pending)
- assert {s.fileIndex for s in pending} == {0, 1}
-
-
-def test_yt_pending_steps_skips_unselected_group():
- task = buildYtTask(2)
- task.setSelection({1})
- task.status = TaskStatus.RUNNING
- assert {s.fileIndex for s in task.pendingSteps()} == {1}
-
-
-def test_yt_snapshot_excludes_extract_and_unselected():
- task = buildYtTask(2)
- task.setSelection({0})
- for s in task.steps:
- s.receivedBytes = 10
- _p, _s, received = task.currentSnapshot()
- assert received == 30 # 组0的 video+audio+merge,不含 extract 与组1
-
-
-def test_yt_extract_updates_only_own_group():
- task = buildYtTask(2)
- extract = next(s for s in task.steps
- if isinstance(s, YouTubeExtractStep) and s.fileIndex == 0)
- videoFmt = {"url": "https://cdn/video", "filesize": 500, "ext": "mp4"}
- audioFmt = {"url": "https://cdn/audio", "filesize": 100, "ext": "m4a"}
- extract._updateSiblingSteps(videoFmt, audioFmt, {"title": "T"})
- group0 = [s for s in task.steps if isinstance(s, YouTubeResourceStep) and s.fileIndex == 0]
- group1 = [s for s in task.steps if isinstance(s, YouTubeResourceStep) and s.fileIndex == 1]
- assert all(s.url for s in group0)
- assert all(not s.url for s in group1)
- assert task.fileSize == 600
-
-
-def test_yt_serialization_roundtrip():
- task = buildYtTask(2)
- task.setSelection({1})
- restored = Task.fromDict(json.dumps(task.toDict()))
- assert type(restored.files[0]) is YouTubeFile
- assert [f.selected for f in restored.files] == [False, True]
- assert len(restored.steps) == 2 * STEPS_PER_VIDEO
-
-
-# ─── Bilibili ──────────────────────────────────────────────
-
-
-def buildBiliTask(pageCount=3, subsOnPage=(0,), **kwargs):
- pages = [
- BiliPage(index=i, relativePath=f"P{i + 1}", pagePart=f"第{i + 1}集",
- videoUrl=f"v{i}", audioUrl=f"a{i}", videoSize=100, audioSize=10,
- subtitles=[{"lan": "zh", "subtitle_url": "u"}] if i in subsOnPage else [])
- for i in range(pageCount)
- ]
- task = BilibiliTask(name="合集.mp4", url="https://bilibili.com/video/BVx",
- files=pages, _baseName="合集", **kwargs)
- task._rebuildSteps()
- return task
-
-
-def test_bili_video_mode_step_layout():
- task = buildBiliTask(2, subsOnPage=(0,), subtitleLanguages=["zh"])
- assert len(task.steps) == 3 + 1 + 3 # P1 三步+字幕,P2 三步
- group0 = sorted(s.stepIndex for s in task.steps if s.fileIndex == 0)
- assert group0 == [1, 2, 3, 4]
- group1 = sorted(s.stepIndex for s in task.steps if s.fileIndex == 1)
- assert group1 == [5, 6, 7]
-
-
-def test_bili_no_subtitle_language_no_subtitle_steps():
- task = buildBiliTask(2, subsOnPage=(0, 1))
- assert not any(isinstance(s, BilibiliSubtitleStep) for s in task.steps)
-
-
-def test_bili_audio_mode():
- task = buildBiliTask(2)
- task.setMode(DownloadMode.AUDIO)
- assert task.name == "合集.m4a"
- assert len(task.steps) == 2
- assert task.fileSize == 20
- assert all(f.size == f.audioSize for f in task.files)
-
-
-def test_bili_cover_mode():
- task = buildBiliTask(2, coverUrl="https://c/pic.jpg", coverSize=5)
- task.setMode(DownloadMode.COVER)
- assert task.name == "合集.jpg"
- assert len(task.steps) == 1 and task.fileSize == 5
-
-
-def test_bili_suffix_follows_total_not_selection():
- task = buildBiliTask(3)
- task.setSelection({1})
- assert len(task.steps) == 9 # 改选不重建
- suffix = next(s.pageSuffix for s in task.steps if s.fileIndex == 1)
- assert suffix == " - P2 第2集"
- assert task.fileSize == 110
-
-
-def test_bili_single_page_no_suffix():
- task = buildBiliTask(1)
- assert all(s.pageSuffix == "" for s in task.steps)
-
-
-def test_bili_suffix_omits_part_equal_to_base_name():
- page = BiliPage(index=1, relativePath="P2", pagePart="合集",
- videoUrl="v", audioUrl="a")
- task = buildBiliTask(3)
- assert task._pageSuffix(page) == " - P2"
-
-
-def test_bili_subtitle_step_finds_page_by_stable_index():
- task = buildBiliTask(3, subsOnPage=(2,), subtitleLanguages=["en"])
- sub = next(s for s in task.steps if isinstance(s, BilibiliSubtitleStep))
- assert sub.fileIndex == 2
- asyncio.run(sub.run()) # 页面存在但语言不匹配 -> 直接完成,不发网络请求
- assert sub.status == TaskStatus.COMPLETED
-
-
-def test_bili_subtitle_step_missing_page_completes():
- task = buildBiliTask(1)
- sub = BilibiliSubtitleStep(stepIndex=99, fileIndex=42)
- sub._bindTask(task)
- asyncio.run(sub.run())
- assert sub.status == TaskStatus.COMPLETED
-
-
-# ─── BT:完成后补选 ────────────────────────────────────────
-
-
-def buildBTTask(fileStates):
- return BTTask(
- name="t", url="magnet:?xt=urn:btih:x",
- files=[
- BTFile(index=i, relativePath=f"t/f{i}", size=10, selected=sel, completed=comp)
- for i, (sel, comp) in enumerate(fileStates)
- ],
- steps=[BTTaskStep(stepIndex=0, status=TaskStatus.COMPLETED)],
- status=TaskStatus.COMPLETED,
- )
-
-
-def test_bt_reselect_uncompleted_revives_step():
- task = buildBTTask([(True, True), (False, False)])
- task.setSelection({0, 1})
- assert task.step.status == TaskStatus.WAITING
- assert task.status == TaskStatus.WAITING
-
-
-def test_bt_deselect_completed_stays_completed():
- task = buildBTTask([(True, True), (True, True)])
- task.setSelection({0})
- assert task.step.status == TaskStatus.COMPLETED
-
-
-def test_bt_unchanged_selection_early_return():
- task = buildBTTask([(True, True), (False, False)])
- task.files[1].priority = 0 # 与未选中状态一致,构成真正的"无变化"
- version = task._fileSelectionVersion
- task.setSelection({0})
- assert task._fileSelectionVersion == version
-
-
-def test_bt_empty_selection_rejected():
- task = buildBTTask([(True, True)])
- with pytest.raises(ValueError):
- task.setSelection(set())
-
-
-# ─── taskService.applySelection ────────────────────────────
-
-
-def serviceProbe(monkeypatch):
- calls = []
- monkeypatch.setattr(taskService, "_queue", TaskQueue())
- monkeypatch.setattr(taskService, "_pump", lambda: calls.append("pump"))
- monkeypatch.setattr(taskService, "_schedule",
- lambda t: calls.append("schedule"))
- monkeypatch.setattr(taskService, "_unwatchFile",
- lambda t: calls.append("unwatch"))
- monkeypatch.setattr(
- taskService, "_cancelRun",
- lambda t, finished=None: (calls.append("cancel"), finished and finished()))
- return calls
-
-
-def test_apply_selection_waiting_passthrough(serviceProbe):
- task = buildTask([(True, False), (True, False)])
- taskService.applySelection(task, {0})
- assert serviceProbe == []
- assert not task.files[1].selected
-
-
-def test_apply_selection_revives_completed(serviceProbe):
- task = buildTask([(True, True), (False, False)], completedAt=123)
- task.status = TaskStatus.COMPLETED
- taskService.applySelection(task, {0, 1})
- assert serviceProbe == ["unwatch", "schedule"]
- assert task.completedAt == 0
- assert task.status == TaskStatus.WAITING
-
-
-def test_apply_selection_completed_no_new_work_no_revive(serviceProbe):
- task = buildTask([(True, True), (True, True)], completedAt=123)
- task.status = TaskStatus.COMPLETED
- taskService.applySelection(task, {0})
- assert serviceProbe == []
- assert task.completedAt == 123
- assert task.status == TaskStatus.COMPLETED
-
-
-def test_apply_selection_restarts_when_running_step_deselected(serviceProbe):
- task = buildTask([(True, False), (True, False)],
- stepStates=[TaskStatus.RUNNING, TaskStatus.WAITING])
- task.status = TaskStatus.RUNNING
- taskService._queue.run(task.taskId, "w")
- taskService.applySelection(task, {1})
- assert serviceProbe == ["cancel", "schedule"]
- assert not task.files[0].selected
-
-
-def test_apply_selection_keeps_running_when_other_deselected(serviceProbe):
- task = buildTask([(True, False), (True, False)],
- stepStates=[TaskStatus.RUNNING, TaskStatus.WAITING])
- task.status = TaskStatus.RUNNING
- taskService._queue.run(task.taskId, "w")
- taskService.applySelection(task, {0})
- assert serviceProbe == []
- assert not task.files[1].selected
-
-
-def test_apply_selection_running_step_without_file_index_not_interrupted(serviceProbe):
- step = PlainStep(stepIndex=1, status=TaskStatus.RUNNING)
- task = Task(name="t", url="u", packId="p", steps=[step],
- files=[TaskFile(index=0, relativePath="a", size=1)])
- task.status = TaskStatus.RUNNING
- taskService._queue.run(task.taskId, "w")
- taskService.applySelection(task, set())
- assert serviceProbe == []
-
-
-def test_apply_selection_files_none_safe(serviceProbe):
- task = Task(name="t", url="u", packId="p")
- taskService.applySelection(task, {0})
- assert serviceProbe == []
diff --git a/tests/test_http_subworker.py b/tests/test_http_subworker.py
new file mode 100644
index 00000000..d1418b55
--- /dev/null
+++ b/tests/test_http_subworker.py
@@ -0,0 +1,306 @@
+"""HTTP subworker 边界情况测试——防止文件损坏和静默失败。
+
+使用本地 aiohttp 服务器精确控制服务器行为。
+
+Seam S13a: 范围正确性(无重叠、无间隙)
+Seam S13c: 服务器降级(200-for-range、403)
+Seam S13e: 请求构造(_effectiveHeaders 一致性)
+"""
+from __future__ import annotations
+
+import asyncio
+import os
+import tempfile
+from pathlib import Path
+
+import pytest
+from aiohttp import web
+
+from features.http_pack.task import HttpTask, HttpTaskStep, PermanentDownloadError
+from app.models.task import TaskStatus, TaskError
+
+
+# ── Test server ──
+
+
+def makeFileContent(size: int) -> bytes:
+ return bytes(i % 256 for i in range(size))
+
+
+def rangeHandler(content: bytes):
+ """Standard HTTP range server."""
+ async def handler(request: web.Request) -> web.Response:
+ rangeHeader = request.headers.get("Range")
+ if rangeHeader is None:
+ return web.Response(
+ body=content,
+ headers={"Content-Length": str(len(content)), "Accept-Ranges": "bytes"},
+ )
+ rangeSpec = rangeHeader.replace("bytes=", "")
+ parts = rangeSpec.split("-")
+ start = int(parts[0])
+ end = int(parts[1]) if parts[1] else len(content) - 1
+ body = content[start:end + 1]
+ return web.Response(
+ status=206,
+ body=body,
+ headers={
+ "Content-Range": f"bytes {start}-{end}/{len(content)}",
+ "Content-Length": str(len(body)),
+ },
+ )
+ return handler
+
+
+async def tmpdir():
+ with tempfile.TemporaryDirectory() as d:
+ yield Path(d)
+
+
+async def server():
+ """Yields a factory: call with a handler to get a base URL."""
+ runners = []
+
+ async def start(handler):
+ app = web.Application()
+ app.router.add_get("/file", handler)
+ runner = web.AppRunner(app)
+ await runner.setup()
+ runners.append(runner)
+ site = web.TCPSite(runner, "127.0.0.1", 0)
+ await site.start()
+ port = site._server.sockets[0].getsockname()[1]
+ return f"http://127.0.0.1:{port}/file"
+
+ yield start
+
+ for runner in runners:
+ await runner.cleanup()
+
+
+def makeStep(url: str, tmpdir: Path, *, fileSize: int, subworkerCount: int = 2,
+ canUseRangeRequests: bool = True, userAgent: str = "",
+ clientProfile: str = "raw") -> tuple[HttpTask, HttpTaskStep]:
+ step = HttpTaskStep(
+ stepIndex=0,
+ url=url,
+ fileSize=fileSize,
+ subworkerCount=subworkerCount,
+ canUseRangeRequests=canUseRangeRequests,
+ userAgent=userAgent,
+ clientProfile=clientProfile,
+ )
+ task = HttpTask(
+ name="test.bin",
+ url=url,
+ outputFolder=tmpdir,
+ fileSize=fileSize,
+ steps=[step],
+ )
+ step._bindTask(task)
+ return task, step
+
+
+async def runStep(step: HttpTaskStep) -> list[int]:
+ """Run a step, collect reported speeds, return them."""
+ speeds = []
+
+ def reportSpeed(n):
+ speeds.append(n)
+
+ async def waitForSpeedLimit():
+ pass
+
+ await step.run(reportSpeed, waitForSpeedLimit)
+ return speeds
+
+
+# ── S13a: Range correctness ──
+
+
+class TestRangeCorrectness:
+
+ def test_buildSubworkers_two_workers_no_overlap(self):
+ step = HttpTaskStep(stepIndex=0, url="", fileSize=1000,
+ subworkerCount=2, canUseRangeRequests=True)
+ sws = step._buildSubworkers()
+ assert len(sws) == 2
+ assert sws[0].start == 0
+ assert sws[0].end == 499
+ assert sws[1].start == 500
+ assert sws[1].end == 999
+
+ def test_buildSubworkers_full_coverage(self):
+ step = HttpTaskStep(stepIndex=0, url="", fileSize=1000,
+ subworkerCount=3, canUseRangeRequests=True)
+ sws = step._buildSubworkers()
+ covered = set()
+ for sw in sws:
+ for b in range(sw.start, sw.end + 1):
+ assert b not in covered, f"byte {b} covered twice"
+ covered.add(b)
+ assert covered == set(range(1000))
+
+ def test_buildSubworkers_one_byte_file(self):
+ step = HttpTaskStep(stepIndex=0, url="", fileSize=1,
+ subworkerCount=1, canUseRangeRequests=True)
+ sws = step._buildSubworkers()
+ assert len(sws) == 1
+ assert sws[0].start == 0
+ assert sws[0].end == 0
+
+ def test_buildSubworkers_clamps_to_filesize(self):
+ step = HttpTaskStep(stepIndex=0, url="", fileSize=3,
+ subworkerCount=10, canUseRangeRequests=True)
+ sws = step._buildSubworkers()
+ assert len(sws) == 3
+
+ def test_buildSubworkers_no_range_support(self):
+ step = HttpTaskStep(stepIndex=0, url="", fileSize=1000,
+ subworkerCount=4, canUseRangeRequests=False)
+ sws = step._buildSubworkers()
+ assert len(sws) == 1
+ assert sws[0].end == -1
+
+ async def test_download_produces_correct_file(self, server, tmpdir):
+ content = makeFileContent(1000)
+ url = await server(rangeHandler(content))
+ task, step = makeStep(url, tmpdir, fileSize=1000, subworkerCount=2)
+ task.setStatus(TaskStatus.RUNNING)
+
+ await runStep(step)
+
+ result = (tmpdir / "test.bin").read_bytes()
+ assert result == content
+
+ async def test_single_subworker_correct(self, server, tmpdir):
+ content = makeFileContent(500)
+ url = await server(rangeHandler(content))
+ task, step = makeStep(url, tmpdir, fileSize=500, subworkerCount=1)
+ task.setStatus(TaskStatus.RUNNING)
+
+ await runStep(step)
+
+ assert (tmpdir / "test.bin").read_bytes() == content
+
+ async def test_many_subworkers_correct(self, server, tmpdir):
+ content = makeFileContent(100)
+ url = await server(rangeHandler(content))
+ task, step = makeStep(url, tmpdir, fileSize=100, subworkerCount=10)
+ task.setStatus(TaskStatus.RUNNING)
+
+ await runStep(step)
+
+ assert (tmpdir / "test.bin").read_bytes() == content
+
+
+# ── S13c: Server degradation ──
+
+
+class TestServerDegradation:
+
+ async def test_403_raises_permanent_error(self, server, tmpdir):
+ async def forbidden(request):
+ return web.Response(status=403, text="Forbidden")
+
+ url = await server(forbidden)
+ task, step = makeStep(url, tmpdir, fileSize=100, subworkerCount=1)
+ task.setStatus(TaskStatus.RUNNING)
+
+ with pytest.raises(TaskError, match="403"):
+ await runStep(step)
+
+ async def test_cloudflare_mitigated_raises_permanent(self, server, tmpdir):
+ async def cfMitigated(request):
+ return web.Response(
+ status=403,
+ headers={"cf-mitigated": "challenge"},
+ text="Cloudflare",
+ )
+
+ url = await server(cfMitigated)
+ task, step = makeStep(url, tmpdir, fileSize=100, subworkerCount=1)
+ task.setStatus(TaskStatus.RUNNING)
+
+ with pytest.raises(TaskError):
+ await runStep(step)
+
+ async def test_no_range_support_downloads_full(self, server, tmpdir):
+ """Server doesn't support ranges — step falls back to single full download."""
+ content = makeFileContent(500)
+
+ async def noRange(request):
+ return web.Response(
+ body=content,
+ headers={"Content-Length": str(len(content))},
+ )
+
+ url = await server(noRange)
+ task, step = makeStep(url, tmpdir, fileSize=500, subworkerCount=1,
+ canUseRangeRequests=False)
+ task.setStatus(TaskStatus.RUNNING)
+
+ await runStep(step)
+ assert (tmpdir / "test.bin").read_bytes() == content
+
+
+# ── S13e: Request construction ──
+
+
+class TestRequestConstruction:
+
+ async def test_effective_headers_include_user_agent(self, server, tmpdir):
+ """All subworker paths should send the configured User-Agent.
+
+ Known bug: normal-range path uses self.headers instead of
+ self._effectiveHeaders, potentially omitting User-Agent.
+ """
+ receivedHeaders: list[dict] = []
+
+ async def captureHeaders(request):
+ receivedHeaders.append(dict(request.headers))
+ rangeHeader = request.headers.get("Range")
+ content = makeFileContent(100)
+ if rangeHeader:
+ parts = rangeHeader.replace("bytes=", "").split("-")
+ start = int(parts[0])
+ end = int(parts[1]) if parts[1] else len(content) - 1
+ body = content[start:end + 1]
+ return web.Response(
+ status=206, body=body,
+ headers={
+ "Content-Range": f"bytes {start}-{end}/{len(content)}",
+ "Content-Length": str(len(body)),
+ },
+ )
+ return web.Response(body=content, headers={"Content-Length": str(len(content))})
+
+ url = await server(captureHeaders)
+ task, step = makeStep(url, tmpdir, fileSize=100, subworkerCount=2,
+ userAgent="GhostTest/1.0")
+ task.setStatus(TaskStatus.RUNNING)
+
+ await runStep(step)
+
+ assert len(receivedHeaders) >= 2
+ for hdrs in receivedHeaders:
+ ua = hdrs.get("user-agent", hdrs.get("User-Agent", ""))
+ assert "GhostTest/1.0" in ua, (
+ f"User-Agent missing from request headers: {hdrs}"
+ )
+
+ async def test_speed_reported_for_every_chunk(self, server, tmpdir):
+ content = makeFileContent(1000)
+ url = await server(rangeHandler(content))
+ task, step = makeStep(url, tmpdir, fileSize=1000, subworkerCount=2)
+ task.setStatus(TaskStatus.RUNNING)
+
+ speeds = await runStep(step)
+
+ assert sum(speeds) == 1000
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_oobe_runtime_page.py b/tests/test_oobe_runtime_page.py
deleted file mode 100644
index a98cd60a..00000000
--- a/tests/test_oobe_runtime_page.py
+++ /dev/null
@@ -1,157 +0,0 @@
-"""RuntimeInstallPage(OOBE 推荐组件页)的逐分支测试。
-
-覆盖:
- - mount 过滤:canInstall=False / title 未声明的 runtime 不出现
- - mount 排序:推荐组件在前,组内保持 pack 加载序(稳定排序)
- - 已安装 runtime:展示但不可勾选
- - 未安装 runtime:勾选默认值 = isRecommended
- - mount 幂等
- - selectedRuntimes 只返回勾选项
- - 四个真实 pack 的自描述声明齐全
-"""
-from __future__ import annotations
-
-import sys
-from unittest.mock import MagicMock
-
-import pytest
-from PySide6.QtWidgets import QApplication
-from qfluentwidgets import FluentIcon
-
-app = QApplication.instance() or QApplication(sys.argv)
-
-from app.models.pack import BinaryRuntime
-
-
-class FakeRuntime(BinaryRuntime):
-
- def __init__(self, title="组件", name="bin", canInstall=True,
- isRecommended=False, installedPath=""):
- self.title = title
- self.description = f"{title} 的说明"
- self.icon = FluentIcon.VIDEO
- self.name = name
- self.canInstall = canInstall
- self.isRecommended = isRecommended
- self._installedPath = installedPath
-
- def path(self) -> str:
- return self._installedPath
-
-
-def page():
- from app.view.windows.oobe_window import RuntimeInstallPage
- p = RuntimeInstallPage()
- p._card.addGroup = MagicMock()
- return p
-
-
-def _mount(page, monkeypatch, runtimes):
- monkeypatch.setattr(
- "app.services.feature_service.featureService",
- MagicMock(runtimes=MagicMock(return_value=runtimes)),
- )
- page.mount()
-
-
-def _shownTitles(page) -> list[str]:
- return [call.args[1] for call in page._card.addGroup.call_args_list]
-
-
-class TestMountFiltering:
-
- def test_excludes_not_installable(self, page, monkeypatch):
- _mount(page, monkeypatch, [
- FakeRuntime(title="可装"),
- FakeRuntime(title="不可装", canInstall=False),
- ])
- assert _shownTitles(page) == ["可装"]
-
- def test_excludes_without_title(self, page, monkeypatch):
- _mount(page, monkeypatch, [
- FakeRuntime(title="有自描述"),
- FakeRuntime(title=""),
- ])
- assert _shownTitles(page) == ["有自描述"]
-
-
-class TestMountOrdering:
-
- def test_recommended_first_stable(self, page, monkeypatch):
- _mount(page, monkeypatch, [
- FakeRuntime(title="普通"),
- FakeRuntime(title="推荐甲", isRecommended=True),
- FakeRuntime(title="推荐乙", isRecommended=True),
- ])
- assert _shownTitles(page) == ["推荐甲", "推荐乙", "普通"]
-
-
-class TestMountInstalledState:
-
- def test_installed_runtime_has_no_checkbox(self, page, monkeypatch):
- _mount(page, monkeypatch, [
- FakeRuntime(title="已装", installedPath="C:/bin/x.exe"),
- FakeRuntime(title="未装"),
- ])
- assert len(_shownTitles(page)) == 2
- assert [rt.title for _, rt in page._checkBoxes] == ["未装"]
-
- def test_checkbox_follows_recommendation(self, page, monkeypatch):
- _mount(page, monkeypatch, [
- FakeRuntime(title="推荐", isRecommended=True),
- FakeRuntime(title="普通", isRecommended=False),
- ])
- checkedByTitle = {rt.title: cb.isChecked() for cb, rt in page._checkBoxes}
- assert checkedByTitle == {"推荐": True, "普通": False}
-
-
-class TestMountIdempotent:
-
- def test_mount_twice_adds_once(self, page, monkeypatch):
- runtimes = [FakeRuntime(title="唯一")]
- _mount(page, monkeypatch, runtimes)
- _mount(page, monkeypatch, runtimes)
- assert page._card.addGroup.call_count == 1
- assert len(page._checkBoxes) == 1
-
-
-class TestSelectedRuntimes:
-
- def test_returns_only_checked(self, page, monkeypatch):
- _mount(page, monkeypatch, [
- FakeRuntime(title="推荐", isRecommended=True),
- FakeRuntime(title="普通", isRecommended=False),
- ])
- assert [rt.title for rt in page.selectedRuntimes()] == ["推荐"]
-
- for checkBox, _ in page._checkBoxes:
- checkBox.setChecked(not checkBox.isChecked())
- assert [rt.title for rt in page.selectedRuntimes()] == ["普通"]
-
-
-class TestPackDeclarations:
- """四个真实 pack 的 runtime 自描述齐全,策展值固化。"""
-
- def test_all_runtimes_self_described(self):
- sys.path.insert(0, "features")
- from ffmpeg_pack.config import FFmpegRuntime
- from m3u8_pack.config import M3U8Runtime
- from yt_dlp_pack.config import YouTubeRuntime
- from ed2k_pack.config import ED2kRuntime
-
- expected = {
- FFmpegRuntime: True,
- M3U8Runtime: True,
- YouTubeRuntime: True,
- ED2kRuntime: False,
- }
- for cls, isRecommended in expected.items():
- assert cls.title, cls.__name__
- assert cls.description, cls.__name__
- assert cls.icon is not None, cls.__name__
- assert cls.isRecommended is isRecommended, cls.__name__
-
-
-if __name__ == "__main__":
- pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_card.py b/tests/test_task_card.py
new file mode 100644
index 00000000..900e0ee5
--- /dev/null
+++ b/tests/test_task_card.py
@@ -0,0 +1,138 @@
+"""TaskCard.refresh() 回归测试 — 历史上断过 2 次。
+
+Seam S10: refresh() 在所有状态 × fileSize 组合下不抛异常。
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass
+
+import pytest
+
+from app.models.task import Task, TaskStep, TaskStatus, StepError
+
+
[email protected](scope="session")
+def qapp():
+ from PySide6.QtWidgets import QApplication
+ app = QApplication.instance() or QApplication([])
+ yield app
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+class StubTaskService:
+ def pause(self, task): pass
+ def start(self, task): pass
+ def delete(self, task, **kw): pass
+ def redownload(self, task): pass
+ def setCategory(self, task, cat): pass
+
+
+class StubFeatureService:
+ def editCards(self, task, parent=None):
+ return []
+
+
+class StubCategoryService:
+ def __init__(self):
+ from PySide6.QtCore import Signal, QObject
+ class _Obj(QObject):
+ categoriesChanged = Signal()
+ self._obj = _Obj()
+
+ @property
+ def categoriesChanged(self):
+ return self._obj.categoriesChanged
+
+ def categoryById(self, cid):
+ return None
+
+ def categories(self):
+ return []
+
+
+_stubCategoryService = None
+
+def makeCard(qapp, status, fileSize=1000, withError=False):
+ from app.view.cards.task_cards import TaskCard
+ global _stubCategoryService
+ if _stubCategoryService is None:
+ _stubCategoryService = StubCategoryService()
+
+ step = StubStep(stepIndex=0, status=status)
+ if status == TaskStatus.COMPLETED:
+ step.progress = 100
+ step.receivedBytes = fileSize
+ if withError:
+ step.error = StepError("测试错误")
+
+ task = Task(name="test.txt", url="http://test", packId="test",
+ steps=[step], fileSize=fileSize)
+ step._bindTask(task)
+ task.updateStatus()
+
+ card = TaskCard(task, StubTaskService(), StubFeatureService(), _stubCategoryService)
+ return card
+
+
+ALL_STATUSES = [
+ TaskStatus.WAITING,
+ TaskStatus.RUNNING,
+ TaskStatus.PAUSED,
+ TaskStatus.COMPLETED,
+ TaskStatus.FAILED,
+]
+
+
+class TestRefreshNoCrash:
+
+ @pytest.mark.parametrize("status", ALL_STATUSES, ids=lambda s: s.name)
+ def test_refresh_with_filesize(self, qapp, status):
+ card = makeCard(qapp, status, fileSize=1024)
+ card.refresh()
+ card.refresh(force=True)
+
+ @pytest.mark.parametrize("status", ALL_STATUSES, ids=lambda s: s.name)
+ def test_refresh_zero_filesize(self, qapp, status):
+ card = makeCard(qapp, status, fileSize=0)
+ card.refresh()
+ card.refresh(force=True)
+
+ def test_refresh_failed_with_error(self, qapp):
+ card = makeCard(qapp, TaskStatus.FAILED, withError=True)
+ card.refresh()
+
+ def test_refresh_failed_without_error(self, qapp):
+ card = makeCard(qapp, TaskStatus.FAILED, withError=False)
+ card.refresh()
+
+ def test_refresh_skips_unchanged_non_running(self, qapp):
+ card = makeCard(qapp, TaskStatus.PAUSED)
+ card.refresh()
+ card.refresh()
+
+ def test_refresh_always_runs_for_running(self, qapp):
+ card = makeCard(qapp, TaskStatus.RUNNING)
+ card.refresh()
+ card.refresh()
+
+ def test_progress_bar_visible_when_created_during_running(self, qapp):
+ card = makeCard(qapp, TaskStatus.RUNNING)
+ card.refresh()
+ assert not card.progressBar.isHidden()
+ assert card.statusLabel.isHidden()
+
+ def test_progress_bar_hidden_when_completed(self, qapp):
+ card = makeCard(qapp, TaskStatus.COMPLETED)
+ card.refresh()
+ assert card.progressBar.isHidden()
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_card_progress.py b/tests/test_task_card_progress.py
deleted file mode 100644
index ce4cc21d..00000000
--- a/tests/test_task_card_progress.py
+++ /dev/null
@@ -1,358 +0,0 @@
-"""任务卡进度条协议的回归测试。
-
-背景:UniversalTaskCard.refresh() 曾假设进度条实现 stop()/error() 等
-qfluentwidgets 专有方法,SegmentedProgressBar / ProgressBar 缺少 stop()
-导致 COMPLETED 且 fileSize<=0 时 AttributeError 崩溃。
-
-覆盖:
- - 7 种 FeaturePack 卡片 × 全部状态分支 × fileSize {0, >0},refresh 不抛异常
- - COMPLETED 隐藏进度条,回到 RUNNING 重新显示(redownload 回归)
- - 基类 refresh 只使用收窄后的进度条协议动词
- - SegmentedProgressBar 仅在大小已知且多线程时被选择
- - FAILED 时 SegmentedProgressBar 进入错误配色
- - pack 特有分支:BT 做种、YtDlp 播放列表、M3U8 未知大小百分比、
- M3U8 直播录制、FTP/HuggingFace 多文件计数
-"""
-from __future__ import annotations
-
-import sys
-from pathlib import Path
-from unittest.mock import MagicMock
-
-import pytest
-from PySide6.QtCore import QObject, Signal
-from PySide6.QtWidgets import QApplication
-
-ROOT = Path(__file__).resolve().parents[1]
-sys.path.insert(0, str(ROOT))
-sys.path.insert(0, str(ROOT / "features"))
-
-app = QApplication.instance() or QApplication(sys.argv)
-
-from app.models.task import Task, TaskStatus
-from app.view.cards.task_cards import UniversalTaskCard
-
-from bittorrent_pack.cards import BTTaskCard
-from bittorrent_pack.task import BTFile, BTTask, BTTaskStep
-from ftp_pack.cards import FtpTaskCard
-from ftp_pack.task import FtpConnectionInfo, FtpFile, FtpTask
-from http_pack.cards import HttpTaskCard, SegmentedProgressBar
-from http_pack.task import HttpTask, HttpTaskStep
-from huggingface_pack.cards import HuggingFaceTaskCard
-from huggingface_pack.task import HuggingFaceFile, HuggingFaceTask
-from m3u8_pack.cards import M3U8LiveTaskCard, M3U8TaskCard
-from m3u8_pack.task import M3U8Task, M3U8TaskStep
-from yt_dlp_pack.cards import YtDlpTaskCard
-from yt_dlp_pack.task import YouTubeExtractStep, YouTubeTask
-
-ALL_STATUSES = [
- TaskStatus.WAITING,
- TaskStatus.RUNNING,
- TaskStatus.PAUSED,
- TaskStatus.FAILED,
- TaskStatus.COMPLETED,
-]
-
-ALLOWED_PROGRESS_VERBS = {"setValue", "setError", "pause", "show", "hide", "setGeometry"}
-
-
-class StubCategoryService(QObject):
- categoriesChanged = Signal()
-
- def categories(self):
- return []
-
- def categoryById(self, cid):
- return None
-
-
[email protected](autouse=True)
-def categoryStub(monkeypatch):
- monkeypatch.setattr(
- "app.services.category_service.categoryService", StubCategoryService()
- )
-
-
-def makeCard():
- cards = []
-
- def make(cardFactory):
- card = cardFactory()
- cards.append(card)
- card.show()
- return card
-
- yield make
- for card in cards:
- card.close()
- card.deleteLater()
- app.processEvents()
-
-
-# ─── 各 pack 的任务/卡片构造 ─────────────────────────────────
-
-
-def buildHttpTask(fileSize=100, canUseRangeRequests=True, subworkerCount=8):
- url = "https://example.com/file.bin"
- step = HttpTaskStep(
- stepIndex=0,
- url=url,
- fileSize=fileSize,
- canUseRangeRequests=canUseRangeRequests,
- subworkerCount=subworkerCount,
- )
- return HttpTask(name="file.bin", url=url, fileSize=fileSize, steps=[step])
-
-
-def buildHttpCard(fileSize):
- return HttpTaskCard(buildHttpTask(fileSize=fileSize))
-
-
-def buildYtDlpCard(fileSize):
- task = YouTubeTask(
- name="video", url="https://youtube.com/watch?v=x", fileSize=fileSize
- )
- return YtDlpTaskCard(task)
-
-
-def buildBtCard(fileSize):
- files = [BTFile(index=0, relativePath="file.bin", size=fileSize)] if fileSize else []
- task = BTTask(
- name="file.bin",
- url="magnet:?xt=urn:btih:0",
- files=files,
- steps=[BTTaskStep(stepIndex=0)],
- )
- return BTTaskCard(task)
-
-
-def buildM3U8Card(fileSize):
- task = M3U8Task(
- name="video",
- url="https://example.com/index.m3u8",
- fileSize=fileSize,
- steps=[M3U8TaskStep(stepIndex=0)],
- )
- return M3U8TaskCard(task)
-
-
-def buildM3U8LiveCard(fileSize):
- task = M3U8Task(
- name="live",
- url="https://example.com/live.m3u8",
- fileSize=fileSize,
- isLive=True,
- steps=[M3U8TaskStep(stepIndex=0)],
- )
- return M3U8LiveTaskCard(task)
-
-
-def buildFtpCard(fileSize):
- task = FtpTask(
- name="file.bin",
- url="ftp://127.0.0.1/file.bin",
- connectionInfo=FtpConnectionInfo(
- scheme="ftp",
- host="127.0.0.1",
- port=21,
- username="",
- password="",
- sourcePath="/file.bin",
- ),
- fileSize=fileSize,
- )
- return FtpTaskCard(task)
-
-
-def buildHuggingFaceCard(fileSize):
- task = HuggingFaceTask(
- name="model", url="https://huggingface.co/org/model", fileSize=fileSize
- )
- return HuggingFaceTaskCard(task)
-
-
-CARD_BUILDERS = {
- "http": buildHttpCard,
- "ytdlp": buildYtDlpCard,
- "bt": buildBtCard,
- "m3u8": buildM3U8Card,
- "m3u8live": buildM3U8LiveCard,
- "ftp": buildFtpCard,
- "huggingface": buildHuggingFaceCard,
-}
-
-
-# ─── 全 pack × 全状态矩阵 ────────────────────────────────────
-
-
[email protected]("fileSize", [0, 100], ids=["unknownSize", "knownSize"])
[email protected]("buildCard", CARD_BUILDERS.values(), ids=CARD_BUILDERS.keys())
-class TestRefreshMatrix:
-
- def test_refresh_covers_every_status(self, makeCard, buildCard, fileSize):
- card = makeCard(lambda: buildCard(fileSize))
- for status in ALL_STATUSES:
- card._task.status = status
- card.refresh(force=True)
-
- def test_completed_hides_bar_and_running_shows_again(self, makeCard, buildCard, fileSize):
- card = makeCard(lambda: buildCard(fileSize))
- card._task.status = TaskStatus.COMPLETED
- card.refresh(force=True)
- assert card.progressBar.isHidden()
-
- card._task.status = TaskStatus.RUNNING
- card.refresh(force=True)
- assert not card.progressBar.isHidden()
-
-
-# ─── 协议钉死:基类只用收窄后的动词 ──────────────────────────
-
-
-def test_refresh_only_uses_shared_progress_verbs(makeCard):
- task = Task(name="file.bin", url="https://example.com/file.bin", packId="test")
- card = makeCard(lambda: UniversalTaskCard(task))
- bar = MagicMock()
- card.progressBar = bar
- app.processEvents()
- bar.reset_mock()
-
- for status in ALL_STATUSES:
- task.status = status
- card.refresh(force=True)
-
- calledVerbs = {name.split(".")[0] for name, _, _ in bar.method_calls}
- assert calledVerbs <= ALLOWED_PROGRESS_VERBS
-
-
-# ─── SegmentedProgressBar 选择守卫 ───────────────────────────
-
-
- "fileSize,canUseRangeRequests,subworkerCount,expectSegmented",
- [
- (100, True, 8, True),
- (0, True, 8, False),
- (100, False, 8, False),
- (100, True, 1, False),
- ],
- ids=["knownSizeMultiWorker", "unknownSize", "noRangeRequests", "singleWorker"],
-)
-def test_segmented_bar_requires_known_size(
- makeCard, fileSize, canUseRangeRequests, subworkerCount, expectSegmented
-):
- task = buildHttpTask(
- fileSize=fileSize,
- canUseRangeRequests=canUseRangeRequests,
- subworkerCount=subworkerCount,
- )
- card = makeCard(lambda: HttpTaskCard(task))
- assert isinstance(card.progressBar, SegmentedProgressBar) is expectSegmented
-
-
-def test_failed_segmented_bar_enters_error_state(makeCard):
- card = makeCard(lambda: buildHttpCard(100))
- assert isinstance(card.progressBar, SegmentedProgressBar)
- card._task.status = TaskStatus.FAILED
- card.refresh(force=True)
- assert card.progressBar._isError
-
-
-# ─── pack 特有分支 ───────────────────────────────────────────
-
-
-def test_bt_seeding_hides_bar_and_shows_status(makeCard):
- card = makeCard(lambda: buildBtCard(100))
- card._task.isSeeding = True
- card._task.status = TaskStatus.RUNNING
- card.refresh(force=True)
- assert card.progressBar.isHidden()
- assert "做种中" in card.statusLabel.text()
-
- card._task.isSeeding = False
- card.refresh(force=True)
- assert not card.progressBar.isHidden()
-
-
-def test_ytdlp_playlist_completed_shows_video_count(makeCard):
- task = YouTubeTask(
- name="playlist",
- url="https://youtube.com/playlist?list=x",
- isPlaylist=True,
- steps=[
- YouTubeExtractStep(stepIndex=i, receivedBytes=25) for i in range(4)
- ],
- )
- card = makeCard(lambda: YtDlpTaskCard(task))
- task.status = TaskStatus.COMPLETED
- card.refresh(force=True)
- assert "个视频" in card.sizeLabel.text()
- assert not card.sizeLabel.isHidden()
-
-
-def test_m3u8_running_unknown_size_shows_percent(makeCard):
- card = makeCard(lambda: buildM3U8Card(0))
- step = card._task.steps[0]
- step.progress = 42.0
- step.receivedBytes = 1000
- card._task.status = TaskStatus.RUNNING
- card.refresh(force=True)
- assert "%" in card.sizeLabel.text()
-
-
-def test_m3u8_live_running_shows_recording(makeCard):
- card = makeCard(lambda: buildM3U8LiveCard(0))
- card._task.status = TaskStatus.RUNNING
- card.refresh(force=True)
- assert card.sizeLabel.text() == "录制中"
-
- card._task.steps[0].liveStatus = "Waiting"
- card.refresh(force=True)
- assert card.sizeLabel.text() == "等待中"
-
-
-def test_ftp_multifile_shows_selection_count(makeCard):
- task = FtpTask(
- name="folder",
- url="ftp://127.0.0.1/dir",
- sourceType="dir",
- connectionInfo=FtpConnectionInfo(
- scheme="ftp",
- host="127.0.0.1",
- port=21,
- username="",
- password="",
- sourcePath="/dir",
- ),
- fileSize=100,
- files=[
- FtpFile(index=0, relativePath="a.bin", size=50, remotePath="/a.bin"),
- FtpFile(index=1, relativePath="b.bin", size=50, remotePath="/b.bin"),
- ],
- )
- card = makeCard(lambda: FtpTaskCard(task))
- card._task.status = TaskStatus.WAITING
- card.refresh(force=True)
- assert "2/2" in card.statusLabel.text()
- assert card.selectFilesButton is not None
-
-
-def test_huggingface_multifile_shows_selection_count(makeCard):
- task = HuggingFaceTask(
- name="model",
- url="https://huggingface.co/org/model",
- files=[
- HuggingFaceFile(index=0, relativePath="a.safetensors", size=50),
- HuggingFaceFile(index=1, relativePath="b.safetensors", size=50),
- ],
- )
- card = makeCard(lambda: HuggingFaceTaskCard(task))
- card._task.status = TaskStatus.WAITING
- card.refresh(force=True)
- assert card.selectFilesButton is not None
- assert "2/2" in card.statusLabel.text()
-
-
-if __name__ == "__main__":
- pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_draft.py b/tests/test_task_draft.py
new file mode 100644
index 00000000..2435f014
--- /dev/null
+++ b/tests/test_task_draft.py
@@ -0,0 +1,236 @@
+"""TaskDraft parse→review→confirm 流程的逐分支测试。
+
+Seam S9: TaskDraft — 批量解析、确认、取消的生命周期。
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from uuid import uuid4
+
+import pytest
+from PySide6.QtWidgets import QApplication
+
+from app.models.task import Task, TaskStep, TaskStatus
+
+
[email protected](scope="session")
+def qapp():
+ app = QApplication.instance() or QApplication([])
+ yield app
+
+
+# ── Stubs ──
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+def stubTask(url: str = "http://example.com/file.zip") -> Task:
+ step = StubStep(stepIndex=0)
+ task = Task(name="file.zip", url=url, packId="http", steps=[step])
+ step._bindTask(task)
+ return task
+
+
+class StubCoroutineRunner:
+ def __init__(self):
+ self._pending: dict[str, dict] = {}
+ self._cancelled: list[str] = []
+
+ def submit(self, coro, *, done=None, failed=None, **kwargs):
+ workId = f"work_{uuid4().hex[:8]}"
+ self._pending[workId] = {"coro": coro, "done": done, "failed": failed, "kwargs": kwargs}
+ return workId
+
+ def cancel(self, workId, finished=None):
+ self._cancelled.append(workId)
+ self._pending.pop(workId, None)
+ if finished:
+ finished()
+
+ def resolve(self, workId, result):
+ entry = self._pending.pop(workId)
+ if entry["done"]:
+ entry["done"](result, **entry["kwargs"])
+
+ def reject(self, workId, error: str):
+ entry = self._pending.pop(workId)
+ if entry["failed"]:
+ entry["failed"](error, **entry["kwargs"])
+
+
+class StubFeatureService:
+ async def parse(self, options):
+ return stubTask(url=options.url)
+
+
+def runner():
+ return StubCoroutineRunner()
+
+
+def draft(qapp, runner):
+ from app.services.task_draft import TaskDraft
+ return TaskDraft(runner, StubFeatureService())
+
+
+# ── Tests ──
+
+
+class TestSetUrls:
+
+ def test_submits_parse_for_each_url(self, draft, runner):
+ draft.setUrls(["http://a.com/1", "http://b.com/2"])
+ assert len(runner._pending) == 2
+
+ def test_removes_old_urls_cancels_parse(self, draft, runner):
+ draft.setUrls(["http://a.com/1", "http://b.com/2"])
+ oldIds = list(runner._pending.keys())
+ draft.setUrls(["http://c.com/3"])
+ assert all(wid in runner._cancelled for wid in oldIds)
+ assert len(runner._pending) == 1
+
+ def test_keeps_equal_urls(self, draft, runner):
+ draft.setUrls(["http://a.com/1", "http://b.com/2"])
+ firstIds = set(runner._pending.keys())
+ draft.setUrls(["http://a.com/1", "http://b.com/2"])
+ assert set(runner._pending.keys()) == firstIds
+
+ def test_parsingBusyChanged_emitted(self, draft, runner):
+ signals = []
+ draft.parsingBusyChanged.connect(signals.append)
+ draft.setUrls(["http://a.com/1"])
+ assert True in signals
+
+
+class TestParseCallbacks:
+
+ def test_success_emits_parseSucceeded(self, draft, runner):
+ received = []
+ draft.parseSucceeded.connect(lambda url, task: received.append((url, task)))
+ draft.setUrls(["http://a.com/file.zip"])
+ workId = list(runner._pending.keys())[0]
+ task = stubTask("http://a.com/file.zip")
+ runner.resolve(workId, task)
+ assert len(received) == 1
+ assert received[0][0] == "http://a.com/file.zip"
+ assert received[0][1] is task
+
+ def test_failure_emits_parseFailed(self, draft, runner):
+ errors = []
+ draft.parseFailed.connect(lambda url, err: errors.append((url, err)))
+ draft.setUrls(["http://a.com/file.zip"])
+ workId = list(runner._pending.keys())[0]
+ runner.reject(workId, "network error")
+ assert len(errors) == 1
+ assert errors[0][0] == "http://a.com/file.zip"
+ assert "network error" in errors[0][1]
+
+ def test_success_clears_parsing_busy(self, draft, runner):
+ states = []
+ draft.parsingBusyChanged.connect(states.append)
+ draft.setUrls(["http://a.com/1"])
+ workId = list(runner._pending.keys())[0]
+ runner.resolve(workId, stubTask("http://a.com/1"))
+ assert states[-1] is False
+
+
+class TestConfirm:
+
+ def test_emits_taskConfirmed_for_completed(self, draft, runner):
+ confirmed = []
+ draft.taskConfirmed.connect(confirmed.append)
+ draft.setUrls(["http://a.com/1"])
+ workId = list(runner._pending.keys())[0]
+ task = stubTask("http://a.com/1")
+ runner.resolve(workId, task)
+ draft.confirm()
+ assert len(confirmed) == 1
+ assert confirmed[0] is task
+
+ def test_pending_parse_auto_confirms_on_completion(self, draft, runner):
+ confirmed = []
+ draft.taskConfirmed.connect(confirmed.append)
+ draft.setUrls(["http://a.com/1"])
+ workId = list(runner._pending.keys())[0]
+ draft.confirm()
+ assert len(confirmed) == 0
+ task = stubTask("http://a.com/1")
+ runner.resolve(workId, task)
+ assert len(confirmed) == 1
+ assert confirmed[0] is task
+
+ def test_confirm_skips_items_without_task_or_parse(self, draft, runner):
+ confirmed = []
+ draft.taskConfirmed.connect(confirmed.append)
+ draft.confirm()
+ assert len(confirmed) == 0
+
+ def test_confirm_applies_base_options(self, draft, runner):
+ confirmed = []
+ draft.taskConfirmed.connect(confirmed.append)
+ draft.setBaseOptions({"subworkerCount": 8})
+ draft.setUrls(["http://a.com/1"])
+ workId = list(runner._pending.keys())[0]
+ task = stubTask("http://a.com/1")
+ runner.resolve(workId, task)
+ draft.confirm()
+ assert len(confirmed) == 1
+
+ def test_confirm_applies_category_override(self, draft, runner):
+ confirmed = []
+ draft.taskConfirmed.connect(confirmed.append)
+ draft.setUrls(["http://a.com/1"])
+ workId = list(runner._pending.keys())[0]
+ task = stubTask("http://a.com/1")
+ runner.resolve(workId, task)
+ draft.setUrlCategory("http://a.com/1", "video")
+ draft.confirm()
+ assert confirmed[0].category == "video"
+
+
+class TestClear:
+
+ def test_cancels_all_in_flight(self, draft, runner):
+ draft.setUrls(["http://a.com/1", "http://b.com/2"])
+ workIds = list(runner._pending.keys())
+ draft.clear()
+ assert all(wid in runner._cancelled for wid in workIds)
+
+ def test_emits_itemsCleared(self, draft, runner):
+ cleared = []
+ draft.itemsCleared.connect(lambda: cleared.append(True))
+ draft.setUrls(["http://a.com/1"])
+ draft.clear()
+ assert len(cleared) == 1
+
+ def test_urls_empty_after_clear(self, draft, runner):
+ draft.setUrls(["http://a.com/1"])
+ draft.clear()
+ assert draft.urls() == []
+
+
+class TestCanConfirm:
+
+ def test_false_when_empty(self, draft):
+ assert draft.canConfirm() is False
+
+ def test_true_when_parsing(self, draft, runner):
+ draft.setUrls(["http://a.com/1"])
+ assert draft.canConfirm() is True
+
+ def test_true_when_task_parsed(self, draft, runner):
+ draft.setUrls(["http://a.com/1"])
+ workId = list(runner._pending.keys())[0]
+ runner.resolve(workId, stubTask("http://a.com/1"))
+ assert draft.canConfirm() is True
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_edit.py b/tests/test_task_edit.py
new file mode 100644
index 00000000..0b273f4a
--- /dev/null
+++ b/tests/test_task_edit.py
@@ -0,0 +1,257 @@
+"""LiveEditDialog 的 6 分支决策逻辑测试。
+
+Seam S8: LiveEditDialog.accept() 的分支覆盖
+ 1. URL 不变 → taskService.edit(task, options) 直接调用
+ 2. URL 变 + parse 成功 + canReuseProgress → edit 不丢数据
+ 3. URL 变 + parse 成功 + 不可复用 + 无已下载数据 → 直接 edit
+ 4. URL 变 + parse 成功 + 不可复用 + 有已下载数据 → 弹确认框
+ 5. URL 变 + parse 失败 → 显示错误,task 不变
+ 6. reject 时取消进行中的 parse
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from unittest.mock import MagicMock, patch
+
+import pytest
+from PySide6.QtWidgets import QWidget
+
+from app.models.task import Task, TaskStep, TaskStatus
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+def makeTask(url="http://example.com/file.zip", receivedBytes=0) -> Task:
+ step = StubStep(stepIndex=0, receivedBytes=receivedBytes)
+ task = Task(name="file.zip", url=url, packId="http", steps=[step])
+ step._bindTask(task)
+ return task
+
+
+class RecordingTaskService:
+ def __init__(self):
+ self.editCalls: list[tuple] = []
+
+ def edit(self, task, options, newTask=None):
+ self.editCalls.append((task, options, newTask))
+
+
+class RecordingCoroutineRunner:
+ def __init__(self):
+ self._counter = 0
+ self._pending: dict[str, tuple] = {}
+
+ def submit(self, work, done=None, failed=None, **kwargs) -> str:
+ self._counter += 1
+ workId = f"wrk_{self._counter}"
+ self._pending[workId] = (work, done, failed, kwargs)
+ return workId
+
+ def cancel(self, workId, finished=None):
+ self._pending.pop(workId, None)
+
+ def resolveLast(self, result):
+ workId = f"wrk_{self._counter}"
+ _, done, _, kwargs = self._pending.pop(workId)
+ if done:
+ done(result, **{k: v for k, v in kwargs.items() if k not in ("owner",)})
+
+ def failLast(self, error: str):
+ workId = f"wrk_{self._counter}"
+ _, _, failed, kwargs = self._pending.pop(workId)
+ if failed:
+ failed(error, **{k: v for k, v in kwargs.items() if k not in ("owner",)})
+
+
+class StubFeatureService:
+ async def parse(self, options):
+ return makeTask(url=options.url)
+
+ def editCards(self, task, parent=None):
+ return []
+
+
+class StubOptionCard(QWidget):
+ def __init__(self, opts: dict, parent=None):
+ super().__init__(parent)
+ self._opts = opts
+
+ def options(self):
+ return dict(self._opts)
+
+
[email protected](scope="session")
+def qapp():
+ from PySide6.QtWidgets import QApplication
+ app = QApplication.instance() or QApplication([])
+ yield app
+
+
+def parentWindow(qapp):
+ from PySide6.QtWidgets import QWidget
+ w = QWidget()
+ w.resize(800, 600)
+ yield w
+ w.deleteLater()
+
+
+def env(parentWindow):
+ ts = RecordingTaskService()
+ cr = RecordingCoroutineRunner()
+ fs = StubFeatureService()
+ return ts, cr, fs, parentWindow
+
+
+def makeDialog(task, cards, ts, cr, fs, parent):
+ from app.view.dialogs.edit_task import LiveEditDialog
+ return LiveEditDialog(task, cards, cr, fs, ts, parent)
+
+
+class TestEditNoUrlChange:
+
+ def test_direct_edit(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask()
+ card = StubOptionCard({"subworkerCount": 8})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+
+ assert len(ts.editCalls) == 1
+ called_task, called_opts, called_new = ts.editCalls[0]
+ assert called_task is task
+ assert called_opts == {"subworkerCount": 8}
+ assert called_new is None
+
+ def test_empty_url_treated_as_no_change(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask()
+ card = StubOptionCard({"url": "", "subworkerCount": 4})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+
+ assert len(ts.editCalls) == 1
+ _, opts, newTask = ts.editCalls[0]
+ assert newTask is None
+
+ def test_same_url_treated_as_no_change(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask(url="http://example.com/file.zip")
+ card = StubOptionCard({"url": "http://example.com/file.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+
+ assert len(ts.editCalls) == 1
+ _, _, newTask = ts.editCalls[0]
+ assert newTask is None
+
+
+class TestEditWithUrlChange:
+
+ def test_reusable_progress(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask()
+ task.canReuseProgress = lambda newTask: True
+ card = StubOptionCard({"url": "http://example.com/new.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+ newTask = makeTask(url="http://example.com/new.zip")
+ cr.resolveLast(newTask)
+
+ assert len(ts.editCalls) == 1
+ _, _, editNewTask = ts.editCalls[0]
+ assert editNewTask is newTask
+
+ def test_not_reusable_no_data(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask(receivedBytes=0)
+ card = StubOptionCard({"url": "http://example.com/new.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+ newTask = makeTask(url="http://example.com/new.zip")
+ cr.resolveLast(newTask)
+
+ assert len(ts.editCalls) == 1
+ _, _, editNewTask = ts.editCalls[0]
+ assert editNewTask is newTask
+
+ def test_not_reusable_with_data_confirm(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask(receivedBytes=1024)
+ card = StubOptionCard({"url": "http://example.com/new.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+ newTask = makeTask(url="http://example.com/new.zip")
+
+ with patch("app.view.dialogs.edit_task.MessageBox") as MockBox:
+ MockBox.return_value.exec.return_value = True
+ cr.resolveLast(newTask)
+
+ assert len(ts.editCalls) == 1
+ _, _, editNewTask = ts.editCalls[0]
+ assert editNewTask is newTask
+
+ def test_not_reusable_with_data_cancel(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask(receivedBytes=1024)
+ card = StubOptionCard({"url": "http://example.com/new.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+ newTask = makeTask(url="http://example.com/new.zip")
+
+ with patch("app.view.dialogs.edit_task.MessageBox") as MockBox:
+ MockBox.return_value.exec.return_value = False
+ cr.resolveLast(newTask)
+
+ assert len(ts.editCalls) == 0
+
+
+class TestEditParseFail:
+
+ def test_parse_failure_shows_error(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask()
+ card = StubOptionCard({"url": "http://example.com/new.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+
+ with patch("app.view.dialogs.edit_task.InfoBar") as MockInfoBar:
+ cr.failLast("解析失败")
+
+ assert len(ts.editCalls) == 0
+ assert dialog.yesButton.isEnabled()
+
+
+class TestEditReject:
+
+ def test_reject_cancels_pending_parse(self, env):
+ ts, cr, fs, parent = env
+ task = makeTask()
+ card = StubOptionCard({"url": "http://example.com/new.zip"})
+ dialog = makeDialog(task, [card], ts, cr, fs, parent)
+
+ dialog.accept()
+ assert len(cr._pending) == 1
+
+ dialog.reject()
+ assert len(cr._pending) == 0
+ assert len(ts.editCalls) == 0
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_page.py b/tests/test_task_page.py
new file mode 100644
index 00000000..fd120122
--- /dev/null
+++ b/tests/test_task_page.py
@@ -0,0 +1,199 @@
+"""TaskPage _runningIds 刷新机制测试。
+
+Seam S11: taskStarted/Stopped → 精确刷新 running cards。
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from unittest.mock import MagicMock
+
+import pytest
+
+from app.models.task import Task, TaskStep, TaskStatus
+
+
[email protected](scope="session")
+def qapp():
+ from PySide6.QtWidgets import QApplication
+ app = QApplication.instance() or QApplication([])
+ yield app
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+def makeTask(taskId="tsk_1", status=TaskStatus.WAITING):
+ step = StubStep(stepIndex=0, status=status)
+ task = Task(name="test", url="http://test", packId="test",
+ taskId=taskId, steps=[step])
+ step._bindTask(task)
+ task.updateStatus()
+ return task
+
+
+class StubTaskService:
+ def __init__(self):
+ from PySide6.QtCore import Signal, QObject
+ class _Signals(QObject):
+ taskAdded = Signal(object)
+ taskRemoved = Signal(str)
+ taskStarted = Signal(object)
+ taskPaused = Signal(object)
+ taskCompleted = Signal(object)
+ taskFailed = Signal(object)
+ tasksAllCompleted = Signal()
+ fileDisappeared = Signal(object)
+ diskSpaceInsufficient = Signal(int, int)
+ self._signals = _Signals()
+ self.tasks = []
+
+ def __getattr__(self, name):
+ return getattr(self._signals, name)
+
+ def runningCount(self):
+ return sum(1 for t in self.tasks if t.status == TaskStatus.RUNNING)
+
+ def runningProgress(self):
+ return -1.0
+
+
+class StubFeatureService:
+ def taskCard(self, task, parent=None):
+ return None
+
+ def pages(self):
+ return []
+
+ def settingGroups(self, parent):
+ return []
+
+ def runtimes(self):
+ return []
+
+
+class StubCategoryService:
+ def __init__(self):
+ from PySide6.QtCore import Signal, QObject
+ class _Obj(QObject):
+ categoriesChanged = Signal()
+ self._obj = _Obj()
+
+ @property
+ def categoriesChanged(self):
+ return self._obj.categoriesChanged
+
+ def categories(self):
+ return []
+
+ def categoryById(self, cid):
+ return None
+
+
+class StubSpeedMeter:
+ def __init__(self):
+ from PySide6.QtCore import Signal, QObject
+ class _Obj(QObject):
+ speedChanged = Signal(int)
+ self._obj = _Obj()
+
+ @property
+ def speedChanged(self):
+ return self._obj.speedChanged
+
+
+class StubCoroutineRunner:
+ def submit(self, *a, **kw):
+ return "work_1"
+
+ def cancel(self, *a, **kw):
+ pass
+
+
+class TestRunningIds:
+
+ @pytest.fixture
+ def page(self, qapp):
+ from app.view.pages.task_page import TaskPage
+ ts = StubTaskService()
+ page = TaskPage(
+ taskService=ts,
+ featureService=StubFeatureService(),
+ categoryService=StubCategoryService(),
+ speedMeter=StubSpeedMeter(),
+ coroutineRunner=StubCoroutineRunner(),
+ )
+ return page, ts
+
+ def test_initial_running_ids_empty(self, page):
+ p, ts = page
+ assert p._runningIds == set()
+
+ def test_task_started_adds_to_running(self, page):
+ p, ts = page
+ task = makeTask("tsk_a", TaskStatus.RUNNING)
+ ts.taskStarted.emit(task)
+ assert "tsk_a" in p._runningIds
+
+ def test_task_completed_removes_from_running(self, page):
+ p, ts = page
+ task = makeTask("tsk_a", TaskStatus.RUNNING)
+ ts.taskStarted.emit(task)
+ assert "tsk_a" in p._runningIds
+ task.setStatus(TaskStatus.COMPLETED)
+ ts.taskCompleted.emit(task)
+ assert "tsk_a" not in p._runningIds
+
+ def test_task_failed_removes_from_running(self, page):
+ p, ts = page
+ task = makeTask("tsk_b", TaskStatus.RUNNING)
+ ts.taskStarted.emit(task)
+ task.setStatus(TaskStatus.FAILED)
+ ts.taskFailed.emit(task)
+ assert "tsk_b" not in p._runningIds
+
+ def test_task_paused_removes_from_running(self, page):
+ p, ts = page
+ task = makeTask("tsk_c", TaskStatus.RUNNING)
+ ts.taskStarted.emit(task)
+ task.setStatus(TaskStatus.PAUSED)
+ ts.taskPaused.emit(task)
+ assert "tsk_c" not in p._runningIds
+
+ def test_all_completed_clears_running(self, page):
+ p, ts = page
+ for i in range(3):
+ ts.taskStarted.emit(makeTask(f"tsk_{i}", TaskStatus.RUNNING))
+ assert len(p._runningIds) == 3
+ ts.tasksAllCompleted.emit()
+ assert p._runningIds == set()
+
+ def test_timer_started_on_task_start(self, page):
+ p, ts = page
+ assert not p._cardRefreshTimer.isActive()
+ ts.taskStarted.emit(makeTask("tsk_x", TaskStatus.RUNNING))
+ assert p._cardRefreshTimer.isActive()
+
+ def test_timer_stopped_when_last_task_stops(self, page):
+ p, ts = page
+ task = makeTask("tsk_y", TaskStatus.RUNNING)
+ ts.taskStarted.emit(task)
+ assert p._cardRefreshTimer.isActive()
+ task.setStatus(TaskStatus.COMPLETED)
+ ts.taskCompleted.emit(task)
+ assert not p._cardRefreshTimer.isActive()
+
+ def test_timer_stopped_on_all_completed(self, page):
+ p, ts = page
+ ts.taskStarted.emit(makeTask("tsk_z", TaskStatus.RUNNING))
+ assert p._cardRefreshTimer.isActive()
+ ts.tasksAllCompleted.emit()
+ assert not p._cardRefreshTimer.isActive()
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_page_lazy.py b/tests/test_task_page_lazy.py
deleted file mode 100644
index 76f8377d..00000000
--- a/tests/test_task_page_lazy.py
+++ /dev/null
@@ -1,711 +0,0 @@
-"""TaskPage 懒加载重构的逐分支测试。
-
-覆盖:
- - 视口卡片生命周期(创建/销毁)
- - 选择状态提升(_selectedIds)
- - selectAll / invertSelection / selectMissing
- - Shift+Click 范围选择
- - CommandView 批量操作(重下载/删除/移动分类)
- - 筛选切换后选择态保留与恢复
- - 空状态判断
- - _onTaskAdded / _onTaskRemoved
- - _onFileDisappeared
-"""
-from __future__ import annotations
-
-import sys
-from dataclasses import dataclass, field
-from pathlib import Path
-from time import time
-from typing import ClassVar, Type
-from unittest.mock import MagicMock, patch
-
-import pytest
-from PySide6.QtCore import Signal, QObject
-from PySide6.QtWidgets import QApplication
-
-app = QApplication.instance() or QApplication(sys.argv)
-
-
-# ─── 轻量 stub ───────────────────────────────────────────────
-
-
-class StubTaskStore:
- def __init__(self):
- self._tasks: dict[str, StubTask] = {}
-
- def tasks(self):
- return dict(self._tasks)
-
- def taskById(self, taskId):
- return self._tasks.get(taskId)
-
- def flush(self):
- pass
-
-
-class StubTaskService(QObject):
- taskAdded = Signal(object)
- taskRemoved = Signal(str)
- taskStarted = Signal(object)
- taskPaused = Signal(object)
- taskCompleted = Signal(object)
- taskFailed = Signal(object)
- fileDisappeared = Signal(object)
-
- def __init__(self):
- super().__init__()
- self._store = StubTaskStore()
- self._redownloaded: list[str] = []
- self._deleted: list[tuple[str, bool]] = []
- self._categories: dict[str, str] = {}
-
- @property
- def tasks(self) -> list[StubTask]:
- return list(self._store._tasks.values())
-
- def taskById(self, taskId: str):
- return self._store.taskById(taskId)
-
- def addTask(self, task: StubTask):
- self._store._tasks[task.taskId] = task
- self.taskAdded.emit(task)
-
- def removeTask(self, taskId: str):
- self._store._tasks.pop(taskId, None)
- self.taskRemoved.emit(taskId)
-
- def redownload(self, task):
- self._redownloaded.append(task.taskId)
-
- def delete(self, task, shouldDeleteFiles: bool):
- self._deleted.append((task.taskId, shouldDeleteFiles))
- self.removeTask(task.taskId)
-
- def setCategory(self, task, categoryId: str):
- task.category = categoryId
- self._categories[task.taskId] = categoryId
-
- def startAll(self):
- pass
-
- def pauseAll(self):
- pass
-
-
-class StubTask:
- hasOutputFile: ClassVar[bool] = True
-
- def __init__(self, taskId: str, name: str = "", status=None, fileSize: int = 100,
- createdAt: int = 0, completedAt: int = 0, category: str = ""):
- from app.models.task import TaskStatus
- self.taskId = taskId
- self.name = name or taskId
- self.url = f"https://example.com/{taskId}"
- self.packId = "stub"
- self.status = status or TaskStatus.WAITING
- self.fileSize = fileSize
- self.createdAt = createdAt or int(time())
- self.completedAt = completedAt
- self.outputFolder = Path("C:/tmp/downloads")
- self.category = category
- self.steps = []
-
- @property
- def outputPath(self) -> str:
- return str(self.outputFolder / self.name)
-
- @property
- def canPause(self) -> bool:
- return True
-
- @property
- def lastError(self):
- return None
-
- def currentSnapshot(self):
- return 50.0, 1024, self.fileSize // 2
-
-
-class StubSpeedMeter(QObject):
- speedChanged = Signal(int)
-
-
-class StubCategoryService(QObject):
- categoriesChanged = Signal()
-
- def categories(self):
- return []
-
- def categoryById(self, cid):
- return None
-
-
-# ─── fixtures ────────────────────────────────────────────────
-
-def env(monkeypatch):
- """搭建完整的 stub 环境,返回 (taskPage, stubTaskService)。"""
- stubService = StubTaskService()
- stubSpeed = StubSpeedMeter()
- stubCategory = StubCategoryService()
-
- monkeypatch.setattr("app.services.task_service.taskService", stubService)
- monkeypatch.setattr("app.view.pages.task_page.taskService", stubService)
- monkeypatch.setattr("app.view.pages.task_page.speedMeter", stubSpeed)
- monkeypatch.setattr("app.services.category_service.categoryService", stubCategory)
-
- from app.view.cards.task_cards import UniversalTaskCard
-
- def fakeTaskCard(task, parent=None):
- return UniversalTaskCard(task, parent)
-
- monkeypatch.setattr("app.view.pages.task_page.featureService",
- MagicMock(taskCard=MagicMock(side_effect=fakeTaskCard)))
-
- # cfg stubs
- monkeypatch.setattr("app.view.pages.task_page.cfg.isCategoryEnabled",
- MagicMock(value=False, valueChanged=MagicMock(connect=MagicMock())))
- monkeypatch.setattr("app.view.pages.task_page.cfg.isSpeedLimitEnabled",
- MagicMock(value=False))
-
- from app.view.pages.task_page import TaskPage
- page = TaskPage()
- page.resize(400, 800)
- page.show()
-
- app.processEvents()
-
- return page, stubService
-
-
-def _addTasks(svc: StubTaskService, count: int, **kwargs) -> list[StubTask]:
- tasks = []
- for i in range(count):
- t = StubTask(taskId=f"t{i}", name=f"file_{i}.zip", createdAt=1000 + i, **kwargs)
- tasks.append(t)
- for t in tasks:
- svc.addTask(t)
- app.processEvents()
- return tasks
-
-
-def _visibleIds(page) -> set[str]:
- return set(page._liveCards.keys())
-
-
-# ─── 视口生命周期 ─────────────────────────────────────────────
-
-class TestViewportLifecycle:
-
- def test_only_viewport_cards_created(self, env):
- page, svc = env
- tasks = _addTasks(svc, 50)
- assert len(page._liveCards) < 50
- assert len(page._liveCards) > 0
-
- def test_scroll_creates_and_destroys(self, env):
- page, svc = env
- _addTasks(svc, 50)
- initialIds = set(page._liveCards.keys())
-
- page.scrollArea.verticalScrollBar().setValue(
- page.scrollArea.verticalScrollBar().maximum()
- )
- app.processEvents()
- page._refreshViewport()
-
- afterScrollIds = set(page._liveCards.keys())
- assert afterScrollIds != initialIds
-
- def test_empty_state_no_tasks(self, env):
- page, svc = env
- app.processEvents()
- assert page.emptyStatusWidget.isVisible()
-
- def test_empty_state_with_filter(self, env):
- from app.models.task import TaskStatus
- page, svc = env
- _addTasks(svc, 3, status=TaskStatus.COMPLETED)
- from app.view.pages.task_page import FilterMode
- page.setFilterMode(FilterMode.ACTIVE)
- assert page.emptyStatusWidget.isVisible()
-
- def test_task_added_creates_card_in_viewport(self, env):
- page, svc = env
- t = StubTask(taskId="new1", createdAt=9999)
- svc.addTask(t)
- app.processEvents()
- assert "new1" in page._displayOrder
-
- def test_task_removed_destroys_card(self, env):
- page, svc = env
- _addTasks(svc, 5)
- assert "t0" in page._liveCards
- svc.removeTask("t0")
- app.processEvents()
- assert "t0" not in page._liveCards
-
- def test_create_card_returns_none(self, env):
- """pack 不可用时 featureService.taskCard 返回 None,不崩溃。"""
- page, svc = env
- from app.view.pages.task_page import featureService
- featureService.taskCard.side_effect = lambda task, parent=None: None
- t = StubTask(taskId="orphan", createdAt=9999)
- svc.addTask(t)
- app.processEvents()
- assert "orphan" not in page._liveCards
-
-
-# ─── 选择状态提升 ─────────────────────────────────────────────
-
-class TestSelectionState:
-
- def test_select_all_includes_offscreen(self, env):
- page, svc = env
- _addTasks(svc, 50)
- page.setSelectionMode(True)
- page.selectAll()
- assert page._selectedIds == set(page._displayOrder)
- assert len(page._selectedIds) == 50
-
- def test_invert_selection(self, env):
- page, svc = env
- _addTasks(svc, 50)
- page.setSelectionMode(True)
- page._selectedIds.add("t0")
- page._selectedIds.add("t1")
- page.invertSelection()
- assert "t0" not in page._selectedIds
- assert "t1" not in page._selectedIds
- assert "t2" in page._selectedIds
-
- def test_select_missing_checks_filesystem(self, env, tmp_path):
- page, svc = env
- tasks = _addTasks(svc, 5)
- for t in tasks:
- t.outputFolder = tmp_path
- existing = tmp_path / "file_0.zip"
- existing.write_bytes(b"data")
-
- page.setSelectionMode(True)
- page.selectMissing()
-
- assert "t0" not in page._selectedIds
- assert "t1" in page._selectedIds
- assert "t2" in page._selectedIds
-
- def test_exit_selection_clears_selectedIds(self, env):
- page, svc = env
- _addTasks(svc, 5)
- page.setSelectionMode(True)
- page.selectAll()
- assert len(page._selectedIds) > 0
- page.setSelectionMode(False)
- assert len(page._selectedIds) == 0
-
- def test_selection_restored_on_scroll(self, env):
- page, svc = env
- _addTasks(svc, 50)
- page.setSelectionMode(True)
- page.selectAll()
-
- page.scrollArea.verticalScrollBar().setValue(
- page.scrollArea.verticalScrollBar().maximum()
- )
- app.processEvents()
- page._refreshViewport()
-
- for taskId, card in page._liveCards.items():
- assert card.isChecked(), f"Card {taskId} should be checked after scroll"
-
- def test_shift_click_range(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page.setSelectionMode(True)
-
- page._onCardSelectionChanged("t2", True, False)
- assert page._selectionAnchor == "t2"
-
- page._onCardSelectionChanged("t5", True, True)
- assert page._selectedIds == {"t2", "t3", "t4", "t5"}
-
- def test_uncheck_last_exits_selection_mode(self, env):
- page, svc = env
- _addTasks(svc, 3)
- page._onCardSelectionChanged("t0", True, False)
- assert page._isSelectionMode is True
- page._onCardSelectionChanged("t0", False, False)
- assert page._isSelectionMode is False
-
- def test_selection_survives_filter_change(self, env):
- from app.models.task import TaskStatus
- from app.view.pages.task_page import FilterMode
- page, svc = env
- tasks = _addTasks(svc, 10)
- tasks[0].status = TaskStatus.COMPLETED
- tasks[1].status = TaskStatus.COMPLETED
- for t in tasks[2:]:
- t.status = TaskStatus.WAITING
-
- page.setSelectionMode(True)
- page.selectAll()
- allSelected = set(page._selectedIds)
-
- page.setFilterMode(FilterMode.ACTIVE)
- assert page._selectedIds == allSelected
-
- page.setFilterMode(FilterMode.ALL)
- for taskId in page._liveCards:
- card = page._liveCards[taskId]
- if taskId in allSelected:
- assert card.isChecked()
-
-
-# ─── CommandView 批量操作 ────────────────────────────────────
-
-class TestCommandViewActions:
-
- def test_redownload_selected(self, env):
- page, svc = env
- _addTasks(svc, 5)
- page.setSelectionMode(True)
- page._selectedIds.update(["t1", "t3"])
- for tid, card in page._liveCards.items():
- card.setChecked(tid in page._selectedIds)
-
- page._onRedownloadSelected()
- assert set(svc._redownloaded) == {"t1", "t3"}
- assert page._isSelectionMode is False
-
- def test_delete_selected(self, env):
- page, svc = env
- _addTasks(svc, 5)
- page.setSelectionMode(True)
- page._selectedIds.update(["t0", "t2", "t4"])
- for tid, card in page._liveCards.items():
- card.setChecked(tid in page._selectedIds)
-
- page._onDeleteConfirmed(shouldDeleteFiles=True)
- deletedIds = {tid for tid, _ in svc._deleted}
- assert deletedIds == {"t0", "t2", "t4"}
- assert page._isSelectionMode is False
-
- def test_delete_scoped_to_display_order(self, env):
- """只删除 _displayOrder 中的选中任务,不删除被筛选掉的。"""
- from app.models.task import TaskStatus
- from app.view.pages.task_page import FilterMode
- page, svc = env
- tasks = _addTasks(svc, 5)
- tasks[0].status = TaskStatus.COMPLETED
- for t in tasks[1:]:
- t.status = TaskStatus.WAITING
-
- page.setSelectionMode(True)
- page.selectAll()
- page.setFilterMode(FilterMode.ACTIVE)
-
- page._onDeleteConfirmed(shouldDeleteFiles=False)
- deletedIds = {tid for tid, _ in svc._deleted}
- assert "t0" not in deletedIds
-
- def test_move_category_selected(self, env):
- page, svc = env
- _addTasks(svc, 3)
- page.setSelectionMode(True)
- page._selectedIds.update(["t0", "t2"])
-
- targets = [
- task for taskId in page._displayOrder
- if taskId in page._selectedIds and (task := svc.taskById(taskId))
- ]
- assert len(targets) == 2
- for task in targets:
- svc.setCategory(task, "cat1")
- assert svc._categories["t0"] == "cat1"
- assert svc._categories["t2"] == "cat1"
-
- def test_redownload_only_displayed(self, env):
- """重下载只操作当前 displayOrder 中的选中任务。"""
- from app.models.task import TaskStatus
- from app.view.pages.task_page import FilterMode
- page, svc = env
- tasks = _addTasks(svc, 5)
- tasks[0].status = TaskStatus.COMPLETED
- for t in tasks[1:]:
- t.status = TaskStatus.WAITING
-
- page.setSelectionMode(True)
- page.selectAll()
- page.setFilterMode(FilterMode.ACTIVE)
-
- page._onRedownloadSelected()
- assert "t0" not in svc._redownloaded
-
-
-# ─── _onFileDisappeared ──────────────────────────────────────
-
-class TestFileDisappeared:
-
- def test_refresh_visible_card(self, env):
- page, svc = env
- tasks = _addTasks(svc, 3)
- card = page._liveCards.get("t0")
- assert card is not None
- card.refresh = MagicMock()
- svc.fileDisappeared.emit(tasks[0])
- assert card.refresh.called
- assert card.refresh.call_args == ((True,),) or \
- card.refresh.call_args.kwargs.get("force") is True
-
- def test_ignore_offscreen_card(self, env):
- page, svc = env
- tasks = _addTasks(svc, 50)
- # 默认 createdAt 降序,最早创建的 t0 排在最底部(index 49),应在视口外
- offscreen = tasks[0]
- assert offscreen.taskId not in page._liveCards
- svc.fileDisappeared.emit(offscreen)
-
-
-# ─── _refreshVisibleCards ────────────────────────────────────
-
-class TestRefreshVisibleCards:
-
- def test_refreshes_all_live_cards(self, env):
- page, svc = env
- _addTasks(svc, 5)
- mocks = {}
- for tid, card in page._liveCards.items():
- m = MagicMock()
- card.refresh = m
- mocks[tid] = m
-
- page._refreshVisibleCards()
- for tid, m in mocks.items():
- assert m.called, f"Card {tid} should have been refreshed"
-
-
-# ─── Delete 快捷键 ───────────────────────────────────────────
-
-class TestDeleteShortcut:
-
- def test_delete_key_triggers_delete_dialog(self, env):
- from unittest.mock import patch as _patch
- from PySide6.QtCore import Qt
- from PySide6.QtGui import QKeyEvent
- page, svc = env
- _addTasks(svc, 3)
- page.setSelectionMode(True)
- page._selectedIds.update(["t0", "t1"])
-
- with _patch.object(page, "_onDeleteSelected") as mock:
- event = QKeyEvent(QKeyEvent.Type.KeyPress, Qt.Key.Key_Delete, Qt.KeyboardModifier.NoModifier)
- page.keyPressEvent(event)
- assert mock.called
-
- def test_delete_key_ignored_outside_selection_mode(self, env):
- from unittest.mock import patch as _patch
- from PySide6.QtCore import Qt
- from PySide6.QtGui import QKeyEvent
- page, svc = env
- _addTasks(svc, 3)
-
- with _patch.object(page, "_onDeleteSelected") as mock:
- event = QKeyEvent(QKeyEvent.Type.KeyPress, Qt.Key.Key_Delete, Qt.KeyboardModifier.NoModifier)
- page.keyPressEvent(event)
- assert not mock.called
-
-
-# ─── BandSelector ────────────────────────────────────────────
-
-class TestBandSelector:
-
- def test_band_selector_exists(self, env):
- page, svc = env
- assert hasattr(page, "_bandSelector")
- from app.view.components.band_selector import BandSelector
- assert isinstance(page._bandSelector, BandSelector)
-
- def test_band_drag_started_enters_selection_mode(self, env):
- page, svc = env
- _addTasks(svc, 10)
- assert page._isSelectionMode is False
- page._onBandDragStarted(False)
- assert page._isSelectionMode is True
-
- def test_band_drag_started_with_shift_saves_snapshot(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page.setSelectionMode(True)
- page._selectedIds.update(["t8", "t9"])
- page._onBandDragStarted(True)
- assert page._bandSnapshot == {"t8", "t9"}
-
- def test_band_drag_started_without_shift_clears_snapshot(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page.setSelectionMode(True)
- page._selectedIds.update(["t8", "t9"])
- page._onBandDragStarted(False)
- assert page._bandSnapshot == set()
-
- def test_band_changed_selects_range(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._onBandDragStarted(False)
- # 选中 displayOrder 中 index 0..2(降序排列: t9, t8, t7)
- page._onBandChanged(0, 2)
- assert len(page._selectedIds) == 3
- assert page._displayOrder[0] in page._selectedIds
- assert page._displayOrder[1] in page._selectedIds
- assert page._displayOrder[2] in page._selectedIds
-
- def test_band_changed_replaces_previous(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._onBandDragStarted(False)
- page._onBandChanged(0, 4)
- assert len(page._selectedIds) == 5
- page._onBandChanged(2, 3)
- assert len(page._selectedIds) == 2
-
- def test_band_changed_with_shift_appends(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page.setSelectionMode(True)
- page._selectedIds.update(["t0", "t1"])
- page._onBandDragStarted(True)
- page._onBandChanged(0, 2)
- # 原来的 t0, t1 + band 选中的 3 个
- assert "t0" in page._selectedIds
- assert "t1" in page._selectedIds
- assert len(page._selectedIds) >= 3
-
- def test_band_changed_negative_clears(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._onBandDragStarted(False)
- page._onBandChanged(0, 2)
- assert len(page._selectedIds) == 3
- page._onBandChanged(-1, -1)
- assert len(page._selectedIds) == 0
-
- def test_band_finished_exits_if_empty(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._onBandDragStarted(False)
- page._onBandChanged(-1, -1)
- page._onBandDragFinished()
- assert page._isSelectionMode is False
-
- def test_band_finished_stays_if_selected(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._onBandDragStarted(False)
- page._onBandChanged(0, 2)
- page._onBandDragFinished()
- assert page._isSelectionMode is True
- assert len(page._selectedIds) == 3
-
- def test_band_syncs_live_card_checkboxes(self, env):
- page, svc = env
- _addTasks(svc, 5)
- page._onBandDragStarted(False)
- page._onBandChanged(0, len(page._displayOrder) - 1)
- for card in page._liveCards.values():
- assert card.isChecked()
-
- def test_band_selector_disabled_on_item_count_change(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._bandSelector._isDragging = True
- page._bandSelector.setItemCount(5)
- assert page._bandSelector._isDragging is False
-
- def test_set_enabled_false_clears_drag(self, env):
- page, svc = env
- _addTasks(svc, 10)
- page._bandSelector._isDragging = True
- page._bandSelector.setEnabled(False)
- assert page._bandSelector._isDragging is False
-
-
-# ─── 卸载推迟(嵌套事件循环安全) ─────────────────────────────
-
-class TestUnmountDeferral:
-
- def test_unmount_deferred_inside_nested_loop(self, env):
- """嵌套循环(对话框 exec)中卸载的卡片推迟真删,回主循环后回收。"""
- import shiboken6
- from PySide6.QtCore import QEventLoop, QTimer
-
- page, svc = env
- tasks = _addTasks(svc, 5)
- cardId = tasks[0].taskId
- card = page._liveCards[cardId]
-
- results = {}
- outer, inner = QEventLoop(), QEventLoop()
-
- def innerBody(): # loopLevel == 2,模拟对话框 exec 期间
- svc.removeTask(cardId)
- app.processEvents()
- results["alive"] = shiboken6.isValid(card)
- results["hidden"] = not card.isVisible()
- results["pending"] = card in page._pendingUnmounts
- inner.quit()
-
- def outerBody(): # loopLevel == 1,模拟主循环
- QTimer.singleShot(0, innerBody)
- inner.exec()
- outer.quit()
-
- QTimer.singleShot(0, outerBody)
- outer.exec()
-
- assert results == {"alive": True, "hidden": True, "pending": True}
-
- def reap(): # loopLevel == 1:刷新触发回收
- page._refreshViewport()
- outer.quit()
-
- QTimer.singleShot(0, reap)
- outer.exec()
- app.processEvents() # DeferredDelete 需回到更浅层级才执行
-
- assert not page._pendingUnmounts
- assert not shiboken6.isValid(card)
-
- def test_unmount_immediate_at_main_loop(self, env):
- """无嵌套循环时卸载走 deleteLater,不积压。"""
- page, svc = env
- tasks = _addTasks(svc, 5)
- svc.removeTask(tasks[0].taskId)
- assert not page._pendingUnmounts
-
-
-# ─── 拖拽队列投递 ─────────────────────────────────────────────
-
-class TestDragRequestedQueued:
-
- def test_drag_starts_from_page_frame(self, env, monkeypatch):
- """dragRequested 队列投递:emit 同步阶段不启动拖拽,事件循环后启动。"""
- from app.models.task import TaskStatus
-
- page, svc = env
- tasks = _addTasks(svc, 3, status=TaskStatus.COMPLETED)
- card = page._liveCards[tasks[0].taskId]
-
- calls = []
- monkeypatch.setattr("app.platform.desktop.startFileDrag",
- lambda paths, source: calls.append(paths))
-
- card.dragRequested.emit(tasks[0].taskId)
- assert not calls # 直连会立刻执行;队列投递此刻必须为空
-
- app.processEvents()
- assert calls == [[Path(tasks[0].outputPath)]]
-
-
-if __name__ == "__main__":
- pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_selection.py b/tests/test_task_selection.py
new file mode 100644
index 00000000..3bffe566
--- /dev/null
+++ b/tests/test_task_selection.py
@@ -0,0 +1,216 @@
+"""文件选择过滤的逐分支测试(历史重构 4 次的重灾区)。
+
+Seam S3: Task.pendingSteps() — 选择过滤 + 排序 + COMPLETED 跳过
+Seam S4: Task.currentSnapshot() — 跨 step 的 progress/speed/receivedBytes 聚合
+Seam S6: Task.setSelection() — 标志翻转 → 过滤联动
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+
+import pytest
+
+from app.models.task import Task, TaskStep, TaskFile, TaskStatus
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+ fileIndex: int | None = None
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+def makeMultiFileTask(fileCount: int, stepsPerFile: int = 1) -> Task:
+ files = [TaskFile(index=i, relativePath=f"file_{i}.dat", size=1000) for i in range(fileCount)]
+ steps = []
+ for fi in range(fileCount):
+ for si in range(stepsPerFile):
+ steps.append(StubStep(stepIndex=fi * stepsPerFile + si, fileIndex=fi))
+ task = Task(name="test", url="http://test", packId="test", steps=steps, files=files)
+ for step in steps:
+ step._bindTask(task)
+ return task
+
+
+# ── S6: setSelection ──
+
+
+class TestSetSelection:
+
+ def test_toggle_deselects_file(self):
+ task = makeMultiFileTask(3)
+ task.setSelection([0, 2])
+ assert task.files[0].selected is True
+ assert task.files[1].selected is False
+ assert task.files[2].selected is True
+
+ def test_filesize_recalculated(self):
+ task = makeMultiFileTask(3)
+ task.setSelection([0])
+ assert task.fileSize == 1000
+
+ def test_select_all(self):
+ task = makeMultiFileTask(3)
+ task.setSelection([0])
+ task.setSelection([0, 1, 2])
+ assert all(f.selected for f in task.files)
+ assert task.fileSize == 3000
+
+ def test_empty_selection(self):
+ task = makeMultiFileTask(3)
+ task.setSelection([])
+ assert not any(f.selected for f in task.files)
+ assert task.fileSize == 0
+
+
+# ── S3: _isStepSelected + pendingSteps ──
+
+
+class TestStepSelection:
+
+ def test_no_files_means_all_selected(self):
+ task = Task(name="test", url="http://test", packId="test",
+ steps=[StubStep(stepIndex=0)])
+ task.steps[0]._bindTask(task)
+ assert task._isStepSelected(task.steps[0]) is True
+
+ def test_step_without_fileindex_always_selected(self):
+ task = makeMultiFileTask(2)
+ noFileStep = StubStep(stepIndex=99)
+ noFileStep._bindTask(task)
+ task.steps.append(noFileStep)
+ task.setSelection([])
+ assert task._isStepSelected(noFileStep) is True
+
+ def test_deselected_file_excludes_step(self):
+ task = makeMultiFileTask(2)
+ task.setSelection([0])
+ assert task._isStepSelected(task.steps[0]) is True
+ assert task._isStepSelected(task.steps[1]) is False
+
+ def test_pending_skips_deselected(self):
+ task = makeMultiFileTask(3)
+ task.setStatus(TaskStatus.RUNNING)
+ task.setSelection([0, 2])
+ pending = list(task.pendingSteps())
+ fileIndexes = [s.fileIndex for s in pending]
+ assert 1 not in fileIndexes
+ assert 0 in fileIndexes
+ assert 2 in fileIndexes
+
+ def test_pending_skips_completed(self):
+ task = makeMultiFileTask(3)
+ task.setStatus(TaskStatus.RUNNING)
+ task.steps[0].status = TaskStatus.COMPLETED
+ pending = list(task.pendingSteps())
+ assert task.steps[0] not in pending
+ assert task.steps[1] in pending
+
+ def test_pending_sorted_by_index(self):
+ task = Task(name="test", url="http://test", packId="test", steps=[
+ StubStep(stepIndex=2),
+ StubStep(stepIndex=0),
+ StubStep(stepIndex=1),
+ ])
+ for s in task.steps:
+ s._bindTask(task)
+ task.setStatus(TaskStatus.RUNNING)
+ pending = list(task.pendingSteps())
+ assert [s.stepIndex for s in pending] == [0, 1, 2]
+
+ def test_pending_stops_when_not_running(self):
+ task = makeMultiFileTask(3)
+ task.status = TaskStatus.PAUSED
+ pending = list(task.pendingSteps())
+ assert pending == []
+
+ def test_pending_does_not_mutate_steps_order(self):
+ task = Task(name="test", url="http://test", packId="test", steps=[
+ StubStep(stepIndex=2),
+ StubStep(stepIndex=0),
+ ])
+ for s in task.steps:
+ s._bindTask(task)
+ task.setStatus(TaskStatus.RUNNING)
+ original_order = [s.stepIndex for s in task.steps]
+ list(task.pendingSteps())
+ assert [s.stepIndex for s in task.steps] == original_order
+
+
+# ── S4: currentSnapshot ──
+
+
+class TestCurrentSnapshot:
+
+ def test_single_step(self):
+ task = Task(name="test", url="http://test", packId="test", steps=[
+ StubStep(stepIndex=0),
+ ])
+ task.steps[0]._bindTask(task)
+ task.steps[0].progress = 50
+ task.steps[0].speed = 1000
+ task.steps[0].receivedBytes = 500
+ progress, speed, received = task.currentSnapshot()
+ assert progress == 50
+ assert speed == 1000
+ assert received == 500
+
+ def test_multiple_steps_averages_progress(self):
+ task = Task(name="test", url="http://test", packId="test", steps=[
+ StubStep(stepIndex=0),
+ StubStep(stepIndex=1),
+ ])
+ for s in task.steps:
+ s._bindTask(task)
+ task.steps[0].progress = 100
+ task.steps[1].progress = 0
+ progress, _, _ = task.currentSnapshot()
+ assert progress == 50
+
+ def test_multiple_steps_sums_speed(self):
+ task = Task(name="test", url="http://test", packId="test", steps=[
+ StubStep(stepIndex=0),
+ StubStep(stepIndex=1),
+ ])
+ for s in task.steps:
+ s._bindTask(task)
+ task.steps[0].speed = 1000
+ task.steps[1].speed = 2000
+ _, speed, _ = task.currentSnapshot()
+ assert speed == 3000
+
+ def test_deselected_steps_excluded(self):
+ task = makeMultiFileTask(2)
+ task.steps[0].progress = 100
+ task.steps[0].speed = 1000
+ task.steps[0].receivedBytes = 1000
+ task.steps[1].progress = 0
+ task.steps[1].speed = 500
+ task.steps[1].receivedBytes = 0
+ task.setSelection([0])
+ progress, speed, received = task.currentSnapshot()
+ assert progress == 100
+ assert speed == 1000
+ assert received == 1000
+
+ def test_no_selected_steps_returns_zero(self):
+ task = makeMultiFileTask(2)
+ task.setSelection([])
+ progress, speed, received = task.currentSnapshot()
+ assert progress == 0
+ assert speed == 0
+ assert received == 0
+
+ def test_status_derivation_respects_selection(self):
+ task = makeMultiFileTask(2)
+ task.steps[0].status = TaskStatus.COMPLETED
+ task.steps[1].status = TaskStatus.FAILED
+ task.setSelection([0])
+ task.updateStatus()
+ assert task.status == TaskStatus.COMPLETED
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/tests/test_task_service.py b/tests/test_task_service.py
new file mode 100644
index 00000000..4b604315
--- /dev/null
+++ b/tests/test_task_service.py
@@ -0,0 +1,273 @@
+"""TaskService 生命周期的逐分支测试。
+
+Seam S7: TaskService.add/pause/delete/redownload/edit/queue
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass
+from pathlib import Path
+from unittest.mock import MagicMock
+
+import pytest
+
+from app.models.task import Task, TaskStep, TaskStatus
+
+
+# ── Stubs ──
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+class StubCoroutineRunner:
+ def __init__(self):
+ self.submitted: list[tuple[str, object]] = []
+ self.cancelled: list[str] = []
+ self._counter = 0
+
+ def submit(self, work, done=None, failed=None, **kwargs) -> str:
+ self._counter += 1
+ workId = f"wrk_{self._counter}"
+ self.submitted.append((workId, done, failed))
+ return workId
+
+ def cancel(self, workId: str, finished=None) -> bool:
+ self.cancelled.append(workId)
+ if finished is not None:
+ finished()
+ return True
+
+ def addSpeed(self, n):
+ pass
+
+ async def waitForSpeedLimit(self):
+ pass
+
+
+class StubCategoryService:
+ def categoryOf(self, task):
+ return "video"
+
+ def folderOf(self, categoryId):
+ return None
+
+
+class StubSpeedMeter:
+ def addSpeed(self, n):
+ pass
+
+ async def waitForSpeedLimit(self):
+ pass
+
+ def start(self):
+ pass
+
+ def stop(self):
+ pass
+
+
+# ── Fixtures ──
+
+
[email protected](scope="session")
+def qapp():
+ from PySide6.QtWidgets import QApplication
+ app = QApplication.instance() or QApplication([])
+ yield app
+
+
+def service(qapp, monkeypatch, tmp_path):
+ from app.config.cfg import cfg
+ monkeypatch.setattr(cfg.maxTaskNum, "value", 3)
+ monkeypatch.setattr(cfg.isCategoryEnabled, "value", False)
+ monkeypatch.setattr(cfg.downloadFolder, "value", str(tmp_path))
+
+ runner = StubCoroutineRunner()
+ category = StubCategoryService()
+ speed = StubSpeedMeter()
+ svc = TaskService(runner, category, speed)
+ return svc, runner
+
+
+def makeTask(taskId: str = "t1", name: str = "test.zip") -> Task:
+ step = StubStep(stepIndex=0)
+ task = Task(name=name, url="http://test/file.zip", packId="http",
+ taskId=taskId, steps=[step])
+ step._bindTask(task)
+ return task
+
+
+from app.services.task_service import TaskService
+
+
+# ── S7: add ──
+
+
+class TestAdd:
+
+ def test_add_emits_signal(self, service):
+ svc, runner = service
+ spy = MagicMock()
+ svc.taskAdded.connect(spy)
+ task = makeTask()
+ svc.add(task)
+ spy.assert_called_once_with(task)
+
+ def test_add_schedules_task(self, service):
+ svc, runner = service
+ task = makeTask()
+ svc.add(task)
+ assert len(runner.submitted) == 1
+
+ def test_add_duplicate_rejected(self, service):
+ svc, runner = service
+ task = makeTask("dup")
+ svc.add(task)
+ spy = MagicMock()
+ svc.taskAdded.connect(spy)
+ svc.add(task)
+ spy.assert_not_called()
+
+ def test_task_in_store_after_add(self, service):
+ svc, runner = service
+ task = makeTask("stored")
+ svc.add(task)
+ assert svc.taskById("stored") is task
+
+
+# ── S7: pause ──
+
+
+class TestPause:
+
+ def test_pause_emits_signal(self, service):
+ svc, runner = service
+ task = makeTask("p1")
+ svc.add(task)
+ spy = MagicMock()
+ svc.taskPaused.connect(spy)
+ svc.pause(task)
+ spy.assert_called_once_with(task)
+
+ def test_pause_cancels_work(self, service):
+ svc, runner = service
+ task = makeTask("p2")
+ svc.add(task)
+ workId = runner.submitted[-1][0]
+ svc.pause(task)
+ assert workId in runner.cancelled
+
+ def test_pause_sets_status(self, service):
+ svc, runner = service
+ task = makeTask("p3")
+ svc.add(task)
+ svc.pause(task)
+ assert task.status == TaskStatus.PAUSED
+
+
+# ── S7: delete ──
+
+
+class TestDelete:
+
+ def test_delete_emits_signal(self, service):
+ svc, runner = service
+ task = makeTask("d1")
+ svc.add(task)
+ spy = MagicMock()
+ svc.taskRemoved.connect(spy)
+ svc.delete(task, shouldDeleteFiles=False)
+ spy.assert_called_once_with("d1")
+
+ def test_delete_removes_from_store(self, service):
+ svc, runner = service
+ task = makeTask("d2")
+ svc.add(task)
+ svc.delete(task, shouldDeleteFiles=False)
+ assert svc.taskById("d2") is None
+
+
+# ── S7: queue ──
+
+
+class TestQueue:
+
+ def test_max_parallel_respected(self, service, monkeypatch):
+ from app.config.cfg import cfg
+ svc, runner = service
+ monkeypatch.setattr(cfg.maxTaskNum, "value", 2)
+ for i in range(5):
+ svc.add(makeTask(f"q{i}"))
+ assert svc.runningCount() == 2
+
+ def test_pump_on_complete(self, service, monkeypatch):
+ from app.config.cfg import cfg
+ svc, runner = service
+ monkeypatch.setattr(cfg.maxTaskNum, "value", 1)
+ t1 = makeTask("pmp1")
+ t2 = makeTask("pmp2")
+ svc.add(t1)
+ svc.add(t2)
+ assert svc.runningCount() == 1
+ _, done, _ = runner.submitted[0]
+ done(None)
+ assert svc.runningCount() == 1
+ assert len(runner.submitted) == 2
+
+ def test_all_completed_signal(self, service, monkeypatch):
+ from app.config.cfg import cfg
+ svc, runner = service
+ monkeypatch.setattr(cfg.maxTaskNum, "value", 1)
+ task = makeTask("ac1")
+ svc.add(task)
+ spy = MagicMock()
+ svc.tasksAllCompleted.connect(spy)
+ _, done, _ = runner.submitted[-1]
+ done(None)
+ spy.assert_called_once()
+
+
+# ── S7: redownload ──
+
+
+class TestRedownload:
+
+ def test_redownload_resets_and_reschedules(self, service):
+ svc, runner = service
+ task = makeTask("rd1")
+ svc.add(task)
+ initial_count = len(runner.submitted)
+ task.steps[0].progress = 50
+ task.steps[0].receivedBytes = 1024
+ svc.redownload(task)
+ assert task.steps[0].progress == 0
+ assert task.steps[0].receivedBytes == 0
+ assert len(runner.submitted) > initial_count
+
+
+# ── S7: edit ──
+
+
+class TestEdit:
+
+ def test_edit_applies_options(self, service):
+ svc, runner = service
+ task = makeTask("ed1")
+ task.category = "audio"
+ svc.add(task)
+ svc.edit(task, {"category": "document"})
+ assert task.category == "document"
+
+ def test_edit_reschedules(self, service):
+ svc, runner = service
+ task = makeTask("ed2")
+ svc.add(task)
+ initial_count = len(runner.submitted)
+ svc.edit(task, {})
+ assert len(runner.submitted) > initial_count
diff --git a/tests/test_task_status.py b/tests/test_task_status.py
new file mode 100644
index 00000000..68f7fdcf
--- /dev/null
+++ b/tests/test_task_status.py
@@ -0,0 +1,201 @@
+"""Task 状态推导与转换的逐分支测试。
+
+Seam S1: Task.updateStatus() — step 状态组合 → task 状态推导
+Seam S2: Task.setStatus() — 批量状态转换行为
+"""
+from __future__ import annotations
+
+from dataclasses import dataclass
+
+import pytest
+
+from app.models.task import Task, TaskStep, TaskStatus, StepError
+
+
+@dataclass(kw_only=True)
+class StubStep(TaskStep):
+ stepIndex: int = 0
+
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ pass
+
+
+def makeTask(*statuses: TaskStatus) -> Task:
+ steps = [StubStep(stepIndex=i, status=s) for i, s in enumerate(statuses)]
+ task = Task(name="test", url="http://test", packId="test", steps=steps)
+ for step in steps:
+ step._bindTask(task)
+ return task
+
+
+# ── S1: updateStatus ──
+
+
+class TestUpdateStatus:
+
+ def test_single_completed(self):
+ task = makeTask(TaskStatus.COMPLETED)
+ assert task.updateStatus() == TaskStatus.COMPLETED
+
+ def test_single_failed(self):
+ task = makeTask(TaskStatus.FAILED)
+ assert task.updateStatus() == TaskStatus.FAILED
+
+ def test_any_failed_means_task_failed(self):
+ task = makeTask(TaskStatus.COMPLETED, TaskStatus.RUNNING, TaskStatus.FAILED)
+ assert task.updateStatus() == TaskStatus.FAILED
+
+ def test_all_completed_means_completed(self):
+ task = makeTask(TaskStatus.COMPLETED, TaskStatus.COMPLETED, TaskStatus.COMPLETED)
+ assert task.updateStatus() == TaskStatus.COMPLETED
+
+ def test_completed_and_running_means_running(self):
+ task = makeTask(TaskStatus.COMPLETED, TaskStatus.RUNNING)
+ assert task.updateStatus() == TaskStatus.RUNNING
+
+ def test_all_paused_means_paused(self):
+ task = makeTask(TaskStatus.PAUSED, TaskStatus.PAUSED)
+ assert task.updateStatus() == TaskStatus.PAUSED
+
+ def test_all_waiting_means_waiting(self):
+ task = makeTask(TaskStatus.WAITING, TaskStatus.WAITING)
+ assert task.updateStatus() == TaskStatus.WAITING
+
+ def test_paused_and_waiting_means_waiting(self):
+ task = makeTask(TaskStatus.PAUSED, TaskStatus.WAITING)
+ assert task.updateStatus() == TaskStatus.WAITING
+
+ def test_no_steps_preserves_current(self):
+ task = Task(name="test", url="http://test", packId="test")
+ task.status = TaskStatus.RUNNING
+ assert task.updateStatus() == TaskStatus.RUNNING
+
+ def test_completed_sets_completed_at(self):
+ task = makeTask(TaskStatus.COMPLETED)
+ task.completedAt = 0
+ task.updateStatus()
+ assert task.completedAt > 0
+
+ def test_failed_takes_priority_over_running(self):
+ task = makeTask(TaskStatus.RUNNING, TaskStatus.FAILED)
+ assert task.updateStatus() == TaskStatus.FAILED
+
+
+# ── S2: setStatus ──
+
+
+class TestSetStatus:
+
+ def test_running_resets_failed_steps(self):
+ task = makeTask(TaskStatus.COMPLETED, TaskStatus.FAILED)
+ task.setStatus(TaskStatus.RUNNING)
+ assert task.steps[1].status == TaskStatus.RUNNING
+ assert task.steps[1].error is None
+
+ def test_running_skips_completed_steps(self):
+ task = makeTask(TaskStatus.COMPLETED, TaskStatus.WAITING)
+ task.setStatus(TaskStatus.RUNNING)
+ assert task.steps[0].status == TaskStatus.COMPLETED
+
+ def test_paused_sets_speed_zero(self):
+ task = makeTask(TaskStatus.RUNNING, TaskStatus.RUNNING)
+ task.steps[0].speed = 1000
+ task.steps[1].speed = 2000
+ task.setStatus(TaskStatus.PAUSED)
+ assert task.steps[0].speed == 0
+ assert task.steps[1].speed == 0
+
+ def test_no_steps_sets_directly(self):
+ task = Task(name="test", url="http://test", packId="test")
+ task.setStatus(TaskStatus.RUNNING)
+ assert task.status == TaskStatus.RUNNING
+
+ def test_running_resets_failed_step_progress(self):
+ task = makeTask(TaskStatus.FAILED)
+ task.steps[0].progress = 50
+ task.steps[0].receivedBytes = 1024
+ task.steps[0].error = StepError("test error")
+ task.setStatus(TaskStatus.RUNNING)
+ assert task.steps[0].progress == 0
+ assert task.steps[0].receivedBytes == 0
+ assert task.steps[0].error is None
+
+
+# ── S5: 错误冒泡(Task.run 的异常处理)──
+
+
+class TestErrorBubble:
+
+ @pytest.mark.asyncio
+ async def test_task_error_sets_step_error(self):
+ from app.models.task import TaskError
+
+ @dataclass(kw_only=True)
+ class FailStep(TaskStep):
+ stepIndex: int = 0
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ raise TaskError("下载失败")
+
+ task = makeTask()
+ task.steps = [FailStep(stepIndex=0)]
+ task.steps[0]._bindTask(task)
+ task.setStatus(TaskStatus.RUNNING)
+
+ with pytest.raises(TaskError):
+ await task.run(lambda n: None, lambda: None)
+
+ assert task.steps[0].status == TaskStatus.FAILED
+ assert task.steps[0].error is not None
+ assert task.status == TaskStatus.FAILED
+
+ @pytest.mark.asyncio
+ async def test_generic_exception_sets_step_error(self):
+ @dataclass(kw_only=True)
+ class CrashStep(TaskStep):
+ stepIndex: int = 0
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ raise RuntimeError("unexpected")
+
+ task = makeTask()
+ task.steps = [CrashStep(stepIndex=0)]
+ task.steps[0]._bindTask(task)
+ task.setStatus(TaskStatus.RUNNING)
+
+ with pytest.raises(RuntimeError):
+ await task.run(lambda n: None, lambda: None)
+
+ assert task.steps[0].status == TaskStatus.FAILED
+ assert task.steps[0].error.params["detail"] == "unexpected"
+
+ async def test_cancelled_error_keeps_step_paused(self):
+ import asyncio
+
+ @dataclass(kw_only=True)
+ class SlowStep(TaskStep):
+ stepIndex: int = 0
+ async def run(self, reportSpeed, waitForSpeedLimit):
+ self.setStatus(TaskStatus.RUNNING)
+ try:
+ await asyncio.sleep(999)
+ except asyncio.CancelledError:
+ self.setStatus(TaskStatus.PAUSED)
+ raise
+
+ task = makeTask()
+ task.steps = [SlowStep(stepIndex=0)]
+ task.steps[0]._bindTask(task)
+ task.setStatus(TaskStatus.RUNNING)
+
+ coro = task.run(lambda n: None, lambda: None)
+ t = asyncio.ensure_future(coro)
+ await asyncio.sleep(0)
+ t.cancel()
+ with pytest.raises(asyncio.CancelledError):
+ await t
+
+ assert task.steps[0].status == TaskStatus.PAUSED
+ assert task.status == TaskStatus.PAUSED
+
+
+if __name__ == "__main__":
+ pytest.main([__file__, "-v", "--tb=short"])
diff --git a/uv.lock b/uv.lock
index e726698d..161a4bb4 100644
--- a/uv.lock
+++ b/uv.lock
@@ -20,6 +20,155 @@ socks = [
{ name = "siosocks" },
]
+[[package]]
+name = "aiohappyeyeballs"
+version = "2.7.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ce/f4/eec0465c2f67b2664688d0240b3212d5196fd89e741df67ddb81f8d35658/aiohappyeyeballs-2.7.1.tar.gz", hash = "sha256:065665c041c42a5938ed220bdcd7230f22527fbec085e1853d2402c8a3615d9d", size = 24757, upload-time = "2026-07-01T17:11:55.501Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/71/43/1947f06babed6b3f1d7f38b0c767f52df66bfb2bc10b468c4a7de9eceff2/aiohappyeyeballs-2.7.1-py3-none-any.whl", hash = "sha256:9243213661e29250eb41368e5daa826fc017156c3b8a11440826b2e3ed376472", size = 15038, upload-time = "2026-07-01T17:11:54.055Z" },
+]
+
+[[package]]
+name = "aiohttp"
+version = "3.14.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "aiohappyeyeballs" },
+ { name = "aiosignal" },
+ { name = "attrs" },
+ { name = "frozenlist" },
+ { name = "multidict" },
+ { name = "propcache" },
+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+ { name = "yarl" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/1d/cc/58f26f118d8099f84e009ce560b9148a3f803e63fa8473b57feb67241875/aiohttp-3.14.2.tar.gz", hash = "sha256:f96821eb2ae2f12b0dfa799eafbf221f5621a9220b457b4744a269a63a5f3a6c", size = 7969860, upload-time = "2026-07-20T19:53:26.881Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/f6/4a/a6c1426d2fb3cddd901575436803733caaaeb7ac0a49aa72d1930d2e3ab6/aiohttp-3.14.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:56432ee8f7abe47c97717cfbf5c32430463ea8a7138e12a87b7891fa6084c8ff", size = 764168, upload-time = "2026-07-20T19:50:07.389Z" },
+ { url = "https://files.pythonhosted.org/packages/0c/62/88ae65afc3590719788cbff3b2e0f56e6850f53ca34114cbb371e677c543/aiohttp-3.14.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6c244f7a65cbec04c830a301aae443c529d4dbca5fddfd4b19e5a179d896adfd", size = 516255, upload-time = "2026-07-20T19:50:08.84Z" },
+ { url = "https://files.pythonhosted.org/packages/8f/bc/ad9b767785b014f2f57497a2ccf67e3d4316d153f7ed1c7715fbbd7573fe/aiohttp-3.14.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c05afdd28ecacce5a1f63275a2e3dce09efddd3a63d143ee9799fda83989c8d", size = 514670, upload-time = "2026-07-20T19:50:10.325Z" },
+ { url = "https://files.pythonhosted.org/packages/48/94/697aef63f15ef354f64723eaac6ccfb289d59b99699b3b7cb1ff663b2045/aiohttp-3.14.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a57f39d6ec155932853b6b0f130cbbafab3208240fa807f29a2c96ea52b77ae1", size = 1780650, upload-time = "2026-07-20T19:50:11.676Z" },
+ { url = "https://files.pythonhosted.org/packages/99/f9/6a1994c1bf138403cf10171cb618571a330ae5683a5803b1ef29b5723d7f/aiohttp-3.14.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1fc31339824ec922cb7424d624b5b6c11d8942d077b2585e5bd602ca1a1e27ed", size = 1737710, upload-time = "2026-07-20T19:50:13.401Z" },
+ { url = "https://files.pythonhosted.org/packages/8b/ba/abe8d5015148b2cd7189473789461058dcf88ae202d4cf1cbecaf291a7ef/aiohttp-3.14.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d93854e215dcc7c88e4f530827193c1a594e2662931d8dbe7cca3abf52a7082d", size = 1845568, upload-time = "2026-07-20T19:50:15.168Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/89/98a2688810f469f19f2d02a298426a37b6e1cc420230a8cc7d6c85af7a01/aiohttp-3.14.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:87c9b03be0c18c3b3587be979149830381e37ac4a6ca8557dbe72e44fcad66c3", size = 1928485, upload-time = "2026-07-20T19:50:16.922Z" },
+ { url = "https://files.pythonhosted.org/packages/5a/fd/c980f64f5e5bff22f07968bcc6af1b64167dfd21dbbffda86f2d153fc802/aiohttp-3.14.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bc1a0793dce8fa9bb6906411e57fb18a2f1c31357b04172541b92b30337362a7", size = 1786216, upload-time = "2026-07-20T19:50:18.598Z" },
+ { url = "https://files.pythonhosted.org/packages/da/80/c710ce9c7f22fcbb83366aa64a5ccf03dced35ab09a6e37545656a6df01e/aiohttp-3.14.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2f1b9540d2d0f2f95590528a1effd0ba5370f6ec189ac925e70b5eecae02dc77", size = 1636921, upload-time = "2026-07-20T19:50:20.201Z" },
+ { url = "https://files.pythonhosted.org/packages/e1/b2/56ce1b0c535d188ef94c05bccbf3f5b1aaea1231fcb073318977bdd917e9/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c0a968b04fecf7c94e502015860ad1e2e112c6b761e97b6fdf65fbb374e22b73", size = 1753040, upload-time = "2026-07-20T19:50:21.857Z" },
+ { url = "https://files.pythonhosted.org/packages/86/61/4318a947139a21d4e1a40e7f5a92799d0fe28feffaca6640a4a165e62b0e/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:2d2eedae227cd5cbd0bccc5e759f71e1af2cd77b7f74ce413bb9a2b87f94a272", size = 1760811, upload-time = "2026-07-20T19:50:23.623Z" },
+ { url = "https://files.pythonhosted.org/packages/81/b0/2012165377d029ceb925c9e5f42b0b30a39d89cf7e494c4100f3ab8d27c6/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:9d3f4c68b2c2cd282b65e558cebf4b27c8b440ab511f2b938a643d3598df2ddb", size = 1819760, upload-time = "2026-07-20T19:50:25.34Z" },
+ { url = "https://files.pythonhosted.org/packages/16/e5/1de93ba3bc18edb87f71594326bedafdc38fe725da8118b7d36fd56610f8/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:d32a70b8bf8836fd80d4169d9e34eb032cd2a7cbccb0b9cf00eac1f40732467c", size = 1628145, upload-time = "2026-07-20T19:50:26.992Z" },
+ { url = "https://files.pythonhosted.org/packages/66/8f/adc9e8592449ee08f72fcce94b7f3f1a9bbf0591a46026e4d322e5a70d7a/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:386ce4e709b4cc40f9ef9a132ad8e672d2d164a65451305672df656e7794c68e", size = 1832577, upload-time = "2026-07-20T19:50:28.546Z" },
+ { url = "https://files.pythonhosted.org/packages/9b/7f/700500700513b1b63967a24c4e189aad377e18f9d67b7387b3418d6213cb/aiohttp-3.14.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bc0ed30b942c3bd755583d74bb00b90248c067d20b1f8301e4489a53a33aa65f", size = 1774814, upload-time = "2026-07-20T19:50:30.144Z" },
+ { url = "https://files.pythonhosted.org/packages/a5/d6/580f9b2ab4c78d9fbf9d56c85fb7f7d4d22d667b27df8032ab9bf7140e37/aiohttp-3.14.2-cp311-cp311-win32.whl", hash = "sha256:b5ed2c7dacebf4950d6b4a1b22548e4d709bb15e0287e064a7cdb32ada65893a", size = 455968, upload-time = "2026-07-20T19:50:31.722Z" },
+ { url = "https://files.pythonhosted.org/packages/96/76/33665ae48e24e01c6dfa15ed14d9d9eec1349577cef497f3b26210621f0a/aiohttp-3.14.2-cp311-cp311-win_amd64.whl", hash = "sha256:bf7951959a8e89f2d4a1e719e60d3ea4e8fc26f011ee3aed09598ad786b112f7", size = 480978, upload-time = "2026-07-20T19:50:33.299Z" },
+ { url = "https://files.pythonhosted.org/packages/5e/19/00963031da42bd23716032f57b2a8414c5355eb1abc41805b2b41173040c/aiohttp-3.14.2-cp311-cp311-win_arm64.whl", hash = "sha256:c167127a3b6089ef78ac2e33582c38040d51688ee28474b5053acf55f192187b", size = 452900, upload-time = "2026-07-20T19:50:35.049Z" },
+ { url = "https://files.pythonhosted.org/packages/e0/99/8737b10b6fa447371541a3b2cdbf9703c31ecf3afff4998f2f0633646a57/aiohttp-3.14.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:30e41662123806e4590a0440585122ac33c89a2465a8be81cc1b50656ca0e432", size = 754562, upload-time = "2026-07-20T19:50:36.672Z" },
+ { url = "https://files.pythonhosted.org/packages/7c/e5/fd624b8b46d99dfd8f7f75111569b5ee21850539e914eed04ce39e4455ea/aiohttp-3.14.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dbc45e2773c66d14fbd337754e9bf23932beef539bd539716a721f5b5f372034", size = 509386, upload-time = "2026-07-20T19:50:38.268Z" },
+ { url = "https://files.pythonhosted.org/packages/6d/a8/473db85d08b862724c506b51af2b9c6327e9e95cbd297c4c6f33968be1a8/aiohttp-3.14.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:476cf7fac10619ad6d08e1df0225d07b5a8d57c04963a171ad845d5a349d47ef", size = 511905, upload-time = "2026-07-20T19:50:39.862Z" },
+ { url = "https://files.pythonhosted.org/packages/c1/e8/aa5ebff13ac5e39ffae8add143757e936d1c2ceb726b82786e5f5cb9912c/aiohttp-3.14.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40bedff39ea83185f3f98a41155dd9da28b365c432e5bd90e7be140bcef0b7f3", size = 1764968, upload-time = "2026-07-20T19:50:41.559Z" },
+ { url = "https://files.pythonhosted.org/packages/f4/22/23ec6d3d3f24f5961c7be73d5127481c992d6c92ca213f336ed8f0ff1453/aiohttp-3.14.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a26f14006883fc7662e21041b4311eac1acbc977a5c43aacb27ff17f8a4c28b2", size = 1740635, upload-time = "2026-07-20T19:50:43.363Z" },
+ { url = "https://files.pythonhosted.org/packages/a0/7b/f8966d2d08f0582525ef02d5af007d2d2467cb733abf1d1f7849a02a6b98/aiohttp-3.14.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:673217cbc9370ebf8cd048b0889d7cbe922b7bb48f4e4c02d31cfefa140bd946", size = 1810447, upload-time = "2026-07-20T19:50:45.258Z" },
+ { url = "https://files.pythonhosted.org/packages/39/f5/239f2a828b033ac244237074db7b560ad3279bb1e934bb462dbde19f3877/aiohttp-3.14.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b39dbdbe30a44958d63f3f8baa2af68f24ec8a631dcd18a33dd76dfa2a0eb917", size = 1905896, upload-time = "2026-07-20T19:50:47.022Z" },
+ { url = "https://files.pythonhosted.org/packages/6c/6e/fb84b8dafc521026355aadbeed484fc1ec44a05aae927de309f204c1f0af/aiohttp-3.14.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d15f618255fcbe5f54689403aa4c2a90b6f2e6ebc96b295b1cb0e868c1c12384", size = 1792052, upload-time = "2026-07-20T19:50:48.683Z" },
+ { url = "https://files.pythonhosted.org/packages/ba/c4/25b199009f164ee02599b9b0962d22e6533d212418e49df9f4fdb37fe2eb/aiohttp-3.14.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ae767b7dffd316cc2d0abf3e1f90132b4c1a2819a32d8bcb1ba749800ea6273", size = 1590939, upload-time = "2026-07-20T19:50:50.702Z" },
+ { url = "https://files.pythonhosted.org/packages/ad/f5/96d7540a52620433db3822267008a1697fc816979c109a4f535855ac893c/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3ec4b6501a076b2f73844256da17d6b7acb15bb74ee0e908a67feb9412371166", size = 1725039, upload-time = "2026-07-20T19:50:52.506Z" },
+ { url = "https://files.pythonhosted.org/packages/f6/50/1a06abbeec14a2bcb46124ca6e281ed4ccb3e9006542ded6bc89a0ce5224/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7e328d02fb46b9a8dbfa070d98967e8b7eaa1d9ee10ae03fb664bdf30d58ccf0", size = 1764748, upload-time = "2026-07-20T19:50:54.336Z" },
+ { url = "https://files.pythonhosted.org/packages/70/5d/b8821b362306627ea8ca11fe49ec47cba18e7c75d975fa5f6710ad93845c/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c7f2e5fe10910d5ab76438f269cc41bb7e499fd48ded978e926360ab1790c8", size = 1777119, upload-time = "2026-07-20T19:50:56.306Z" },
+ { url = "https://files.pythonhosted.org/packages/81/e5/805d9d49e66c6358574ad70dd731031585d18fe95ae65b857bc378bccc9a/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:66de80888db2176655f8df0b705b817f5ae3834e6566cc2caa89360871d90195", size = 1580047, upload-time = "2026-07-20T19:50:58.316Z" },
+ { url = "https://files.pythonhosted.org/packages/c6/fa/1536f272d5ad93bf8b75043b02b94c24bf4e6b55a849d3287553ad6da97e/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:f2f9950b2dd0fc896ab520ea2366b7df6484d3d164a65d5e9f28f7b0e5742d8a", size = 1796861, upload-time = "2026-07-20T19:51:00.373Z" },
+ { url = "https://files.pythonhosted.org/packages/e6/f3/86dfd6152bb706351cf5c6b45f0f6a1818a4e559d1e88d899c4c673c23a8/aiohttp-3.14.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cc4435b16dc246c5dfa7f2f8ee71b10a30765018a090ee36e99f356b1e9b75cc", size = 1768687, upload-time = "2026-07-20T19:51:02.214Z" },
+ { url = "https://files.pythonhosted.org/packages/57/af/14b98e07fcd1a2b37ebb2f950309821eaa56e0eac3d32fc23dc55227e49b/aiohttp-3.14.2-cp312-cp312-win32.whl", hash = "sha256:4ca802547f1128008addfc21b24959f5cbf30a8952d365e7daa078a0d884b242", size = 451437, upload-time = "2026-07-20T19:51:03.954Z" },
+ { url = "https://files.pythonhosted.org/packages/38/20/8478c05702a369b6d0800e40e0c5f9a289ff482d0921faec1eb17727339d/aiohttp-3.14.2-cp312-cp312-win_amd64.whl", hash = "sha256:e5efff8bfd27c44ce1bfdf92ce838362d9316ed8b2ed2f89f581dbe0bbe05acf", size = 476776, upload-time = "2026-07-20T19:51:05.705Z" },
+ { url = "https://files.pythonhosted.org/packages/d0/d0/e550bb1cb4fc82de3bdbe2add061cc0cedb34f2e7f01ada78fba94493ca1/aiohttp-3.14.2-cp312-cp312-win_arm64.whl", hash = "sha256:0eb1c9fd51f231ac8dc9d5824d5c2efc45337d429db0123fa9d4c20f570fdfc3", size = 447928, upload-time = "2026-07-20T19:51:07.523Z" },
+ { url = "https://files.pythonhosted.org/packages/96/3a/8b8779f8e813d3a33cf16bc836a7ea7bf3c27b6588d42efa36b0c32fcb58/aiohttp-3.14.2-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:17eecd6ee9bfc8e31b6003137d74f349f0ac3797111a2df87e23acb4a7a912ea", size = 506205, upload-time = "2026-07-20T19:51:09.215Z" },
+ { url = "https://files.pythonhosted.org/packages/d1/73/2f45204b37ecc4ce2c54b8b67254d70a8ea3b629c4083d58f3e2d27991cb/aiohttp-3.14.2-cp313-cp313-android_21_x86_64.whl", hash = "sha256:ce8dfb58f012f76258f29951d38935ac928b32ae24a480f30761f2ed5036fa78", size = 515116, upload-time = "2026-07-20T19:51:10.914Z" },
+ { url = "https://files.pythonhosted.org/packages/f0/22/8f4424de1f50df4fbb74ea32006f9cff798ae0d346ffa6be7b6f0caca719/aiohttp-3.14.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:4181d72e0e6d1735c1fae56381193c6ae211d584d06413980c00775b9b2a176a", size = 486244, upload-time = "2026-07-20T19:51:12.878Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/53/60de022260f5d2d31976bc5f50db708e10671f0ac5da515402adcc6b4d4d/aiohttp-3.14.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:0e56babe35076f69ec9327833b71439eeccd10f51fe56c1a533da8f24923f014", size = 492260, upload-time = "2026-07-20T19:51:14.555Z" },
+ { url = "https://files.pythonhosted.org/packages/b2/6f/d3ccc31c15cd33888670b8f1bf1dc06f3239b4edd156fc818078e87ae628/aiohttp-3.14.2-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:6b63709e259e3b3d7922b235606564e91ed4c224e777cc0ca4cae04f5f559206", size = 502174, upload-time = "2026-07-20T19:51:16.3Z" },
+ { url = "https://files.pythonhosted.org/packages/40/20/52d21e485652f4708015ce27dd3029e63140e0bdb0dcc7bf72dc0bc3f4ad/aiohttp-3.14.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f7c10c4d0b33888a68c192d883d1390d4596c116a59bf689e6d352c6739b7940", size = 750878, upload-time = "2026-07-20T19:51:18.013Z" },
+ { url = "https://files.pythonhosted.org/packages/2e/49/1220bdc73d568431cc3856667405d78c2e95eb57fed2b9ffa5e825932ab2/aiohttp-3.14.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f7b19e27b78a3a927b1932af93af7645806153e8f541cee8fe856426142503f", size = 508459, upload-time = "2026-07-20T19:51:19.876Z" },
+ { url = "https://files.pythonhosted.org/packages/ed/f1/39177406ce0ae5cb2782b35e848c0edf6e09d6e082df636eeacdbdfa70bd/aiohttp-3.14.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:18fcc3a5cc7dde1d8f7903e309055294c28894c9434588645817e374f3b83d03", size = 509179, upload-time = "2026-07-20T19:51:21.719Z" },
+ { url = "https://files.pythonhosted.org/packages/87/f7/6d081c2ee838458492c7ae1062399bdd68f149811d257d4502e79a25b306/aiohttp-3.14.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09d1b0deec698d1198eb0b8f910dd9432d856985abbfea3f06be8b296a6619b4", size = 1761346, upload-time = "2026-07-20T19:51:23.437Z" },
+ { url = "https://files.pythonhosted.org/packages/1d/ed/0befea4ae533f09c3a60f0d10b923cd4a90027a1bf49dfafaa24eeee08b8/aiohttp-3.14.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cabaaecb4c6888bd9abafac151051377534dad4c3859a386b6325f39d3732f99", size = 1735057, upload-time = "2026-07-20T19:51:25.512Z" },
+ { url = "https://files.pythonhosted.org/packages/de/03/c1d89fcd94907f93a08d4aadbb4e1d9bd3d7d6c9f94bc9c17689de38107b/aiohttp-3.14.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:114299c08cce8ad4ebb21fafe766378864109e88ad8cf63cf6acb384ff844a57", size = 1800389, upload-time = "2026-07-20T19:51:27.585Z" },
+ { url = "https://files.pythonhosted.org/packages/3a/8b/edbac4d1a1cde3571588a1e5b40637df5acee43158efdf3ae9a161fde8ab/aiohttp-3.14.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6bea8451e26cd67645d9b2ee18232e438ddfc36cea35feecb4537f2359fc7030", size = 1895342, upload-time = "2026-07-20T19:51:29.794Z" },
+ { url = "https://files.pythonhosted.org/packages/0c/31/2e9ca3b21c07ea8a001e2b142cb01401fd34fd07b248a0b95a04c3ebc4ec/aiohttp-3.14.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:46b8887aa303075c1e5b24123f314a1a7bbfa03d0213dff8bb70503b2148c853", size = 1789175, upload-time = "2026-07-20T19:51:31.744Z" },
+ { url = "https://files.pythonhosted.org/packages/6f/91/b57d3d13a80fbf765b19ae0c38d783a3a23f35b1cb82ae3b22f91abe6c24/aiohttp-3.14.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:de3b04a3f7b40ad7f1bcd3540dd447cf9bd93d57a49969bca522cbcf01290f08", size = 1586845, upload-time = "2026-07-20T19:51:33.571Z" },
+ { url = "https://files.pythonhosted.org/packages/69/e8/a2f5f9f6219cd21190e9b50e2cbc978d12a2aab748d0aa7c6ee930db15c3/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42372e1f1a8dca0dcd5daf922849004ec1120042d0e24f14c926f97d2275ca79", size = 1724839, upload-time = "2026-07-20T19:51:35.518Z" },
+ { url = "https://files.pythonhosted.org/packages/de/d4/a2b9442336051714dd8dbd419b9f4a1003c45bb850ee0f3af87f2743e867/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:7871c94f3400358530ac4906dd7a526c5a24099cd5c48f53ffc4b1cb5037d7d7", size = 1756306, upload-time = "2026-07-20T19:51:37.459Z" },
+ { url = "https://files.pythonhosted.org/packages/ab/93/22c94a599b2c4ea6ab88f1b912d90883f1fba5235b587ea9f13b148e9a0f/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f8f371794319a8185e61e15ba5e1be8407b986ebce1ade11856c02d24e090577", size = 1769133, upload-time = "2026-07-20T19:51:39.9Z" },
+ { url = "https://files.pythonhosted.org/packages/fe/db/a4e4c207f7023e83c281a7cf3579f227bade48f1899cb6588c0ed6ae54de/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:af63ac06bad85191e6a0c4a733cb3c55adb99f8105bc7ce9913391561159a49a", size = 1578671, upload-time = "2026-07-20T19:51:42.418Z" },
+ { url = "https://files.pythonhosted.org/packages/8d/6f/33746ba4947b8193652fc7ed0533e09f93b118e39777228f3029e5677c17/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:8c2cdb684c153f377157e856257ee8535c75d8478343e4bb1e83ca73bdfa3d31", size = 1791778, upload-time = "2026-07-20T19:51:44.298Z" },
+ { url = "https://files.pythonhosted.org/packages/06/41/323856cb0ec9076b1f9a135eb0684f5f984dd97989a087873768aa34ca2f/aiohttp-3.14.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ceff4f84c1d928654faa6bcb0437ed095b279baae2a35fcfe5a3cbe0d8b9725d", size = 1768490, upload-time = "2026-07-20T19:51:46.279Z" },
+ { url = "https://files.pythonhosted.org/packages/39/f0/09e29e457b6fb49253cbb61354ed2541fdf23ac192bddbb57bb34bc93d9c/aiohttp-3.14.2-cp313-cp313-win32.whl", hash = "sha256:15292b08ce7dd45e268fce542228894b4735102e8ee77163bd665b35fc2b5598", size = 451064, upload-time = "2026-07-20T19:51:48.194Z" },
+ { url = "https://files.pythonhosted.org/packages/0b/76/b44703eafcfe1446f4f975be1ef2406042955425eaf56450e71b50506c49/aiohttp-3.14.2-cp313-cp313-win_amd64.whl", hash = "sha256:fc2d8e7373ceba7e1c7e9dc00adac854c2701a6d443fd21d4af2e49342d727bd", size = 476140, upload-time = "2026-07-20T19:51:50.285Z" },
+ { url = "https://files.pythonhosted.org/packages/72/48/b095935c9e72a253439f80ec757b91d4733e0a9a98b63e108d84aaf39b08/aiohttp-3.14.2-cp313-cp313-win_arm64.whl", hash = "sha256:70570f50bda5037b416db8fcba595cf808ecf0fdce12d64e850b5ae1db7f64d4", size = 447585, upload-time = "2026-07-20T19:51:52.333Z" },
+ { url = "https://files.pythonhosted.org/packages/4f/ca/716f720dccc3032e40dc80d0ab2d87a7365270a714976a85bdff73bc7254/aiohttp-3.14.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7719cef2a9dc5e10cd5f476ec1744b25c5ac4da733a9a687d91c42de7d4afe30", size = 508899, upload-time = "2026-07-20T19:51:54.165Z" },
+ { url = "https://files.pythonhosted.org/packages/f5/80/786166589e71b3f3cfce56b414170fe5008462d0bff100bd8837285632f6/aiohttp-3.14.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:3523ec0cc524a413699f25ec8340f3da368484bc9d5f2a1bf87f233ac20599bf", size = 514722, upload-time = "2026-07-20T19:51:56.208Z" },
+ { url = "https://files.pythonhosted.org/packages/eb/b7/539961cf3e3d3f179ea4b20d456cbdb67d1163c68f2e95bf220438a5afd5/aiohttp-3.14.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:c8ab295ee58332ef8fbd62727df90540836dfcf7a61f545d0f2771223b80bf25", size = 488082, upload-time = "2026-07-20T19:51:58.293Z" },
+ { url = "https://files.pythonhosted.org/packages/60/34/c7708eac8edacca9c049a0d6f5fa610005ac3c5634c9ea4751134263bf4e/aiohttp-3.14.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:71501bc03ede681401269c569e6f9306c761c1c7d4296675e8e78dd07147070f", size = 494140, upload-time = "2026-07-20T19:52:00.158Z" },
+ { url = "https://files.pythonhosted.org/packages/d8/e1/076b88de36b4ebea62d1c0b225e32bc8a452ee71b2aded82878fa5fa7c9e/aiohttp-3.14.2-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:052478c7d01035d805302db50c2ef626b1c1ba0fe2f6d4a22ae6eaeb43bf2316", size = 502670, upload-time = "2026-07-20T19:52:02.097Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/71/7b7720ffe7e521aaa79a853ebff4c17937f4b5a3a586e9d13b0f38050b35/aiohttp-3.14.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b0d49be9d9a210b2c993bf32b1eda03f949f7bcda68fc4f718ae8085ae3fb4b8", size = 756406, upload-time = "2026-07-20T19:52:04.082Z" },
+ { url = "https://files.pythonhosted.org/packages/b9/9a/c67c7e22fff7d7b17387e718451b30eb89f55df6b8d13d2d7f91daba6505/aiohttp-3.14.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:5fe25c4c44ea5b56fd4512e2065e09384987fc8cc98e41bc8749efe12f653abb", size = 510106, upload-time = "2026-07-20T19:52:06.001Z" },
+ { url = "https://files.pythonhosted.org/packages/27/2a/3caebd640229663263585d4d31898331a3937752f2e1f5ec0af509fa31be/aiohttp-3.14.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7e254b0d636957174a03ca210289e867a62bb9502081e1b44a8c2bb1f6266ecd", size = 512876, upload-time = "2026-07-20T19:52:08.036Z" },
+ { url = "https://files.pythonhosted.org/packages/27/04/86945210e491493f5cd025efe5e6d8fc8a9e8aaf36f943c40f52c34eda7e/aiohttp-3.14.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6b0ce033d49dd3c6a2566b387e322a9f9029110d67902f0d64571c0fd4b73d8", size = 1750050, upload-time = "2026-07-20T19:52:09.998Z" },
+ { url = "https://files.pythonhosted.org/packages/11/d8/356c62552b4db60af5ad8cddeafa6f837788918201f1b5f2466565c986b5/aiohttp-3.14.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:41b5b66b1ac2c48b61e420691eb9741d17d9068f2bc23b5ee3e750faa564bc8f", size = 1707177, upload-time = "2026-07-20T19:52:12.39Z" },
+ { url = "https://files.pythonhosted.org/packages/77/2d/41bb20bed3df1d6dc7fc231ca4ffb72177fd151bf4205a4ade7a93e03501/aiohttp-3.14.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:30a5ed81f752f182961237414a3cd0af209c0f74f06d66f66f9fcb8964f4978d", size = 1803795, upload-time = "2026-07-20T19:52:14.705Z" },
+ { url = "https://files.pythonhosted.org/packages/63/21/ad9fe6786a1d2758bcfdae4dbc1d6869ffc7b1e0571530a508de3cdde09b/aiohttp-3.14.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b9251f43d78ff675c0ddfcd53ba61abecc1f74eedc6287bb6657f6c6a033fe7", size = 1876539, upload-time = "2026-07-20T19:52:16.965Z" },
+ { url = "https://files.pythonhosted.org/packages/0e/cb/d213f4fd7af279d82c4b46d30de22db93a01296d77a8d8e535289637da54/aiohttp-3.14.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf7930e83a12801b2e253d41cc8bf5553f61c0cfabef182a72ae13472cc81803", size = 1761130, upload-time = "2026-07-20T19:52:19.127Z" },
+ { url = "https://files.pythonhosted.org/packages/46/4f/0792fe1a24c2b4b506d07350e980b0626c149fe73e68dd37dfb30ed89813/aiohttp-3.14.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:abb33120daba5e5643a757790ece44d638a5a11eb0598312e6e7ec2f1bd1a5a3", size = 1583576, upload-time = "2026-07-20T19:52:21.465Z" },
+ { url = "https://files.pythonhosted.org/packages/46/ad/551c302f534f9cd6105bd16902e69dc64c726aa729127203f47ed4bddb2a/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:983a68048a48f35ed08aadfcc1ba55de9a121aa91be48a764965c9ec532b94b5", size = 1714139, upload-time = "2026-07-20T19:52:23.636Z" },
+ { url = "https://files.pythonhosted.org/packages/e3/cf/a3be8601d2e80ccf7bd4f79807629cede5425d72c02636f06b1ad6a8290a/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:fef094bfc2f4e991a998af066fc6e3956a409ef799f5cbad2365175357181f2e", size = 1724352, upload-time = "2026-07-20T19:52:26.043Z" },
+ { url = "https://files.pythonhosted.org/packages/c8/b1/6b55f6448b43a3338749f37fc6a14e7ac7dad121d2d585f22c1dd3d324fe/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:2f7ca81d936d820ae479971a6b6214b1b867420b5b58e54a1e7157716a943754", size = 1770749, upload-time = "2026-07-20T19:52:28.467Z" },
+ { url = "https://files.pythonhosted.org/packages/39/58/b3f1cf6af47fa0b0d51c6e2b98b2bf0326b44a932d74915f3c0874413ea8/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:da4f142fa078fedbdb3f88d0542ad9315656224e167502ae274cbba818b90c90", size = 1577547, upload-time = "2026-07-20T19:52:30.658Z" },
+ { url = "https://files.pythonhosted.org/packages/d4/e2/1d79f1ab35593d70dabed98936ae842ac90d12847c9a62bba4a19d6005a4/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:3d4238e50a378f5ac69a1e0162715c676bd082dede2e5c4f67ca7fd0014cb09d", size = 1781840, upload-time = "2026-07-20T19:52:33.021Z" },
+ { url = "https://files.pythonhosted.org/packages/01/73/770be856c6fc861563999081a5fe2d44e16b4255f5fd94b2217a2349ca65/aiohttp-3.14.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:03330676d8caa28bb33fa7104b0d542d9aac93350abcd91bf68e64abd531c320", size = 1745757, upload-time = "2026-07-20T19:52:35.541Z" },
+ { url = "https://files.pythonhosted.org/packages/bc/0b/861fdbe3ff90b503a4d0a12276623f4afbe54c237ca876fc560125c270a3/aiohttp-3.14.2-cp314-cp314-win32.whl", hash = "sha256:43387429e4f2ec4047aaf9f935db003d4aa1268ea9021164877fd6b012b6396a", size = 455863, upload-time = "2026-07-20T19:52:37.634Z" },
+ { url = "https://files.pythonhosted.org/packages/f7/03/cc8234d0f06fe4b0e1777c7ed313cc9014f078f72a9a0cbdc144965d1bd7/aiohttp-3.14.2-cp314-cp314-win_amd64.whl", hash = "sha256:e3a6302f47518dbf2ffd3cd518f02a1fbf53f85ffeed41a224fa4a6f6a62673b", size = 480986, upload-time = "2026-07-20T19:52:39.665Z" },
+ { url = "https://files.pythonhosted.org/packages/2e/b0/ae17dd629e22160f453b9041a4aee80a8a917ba2f44d5b3e252cc501ed2c/aiohttp-3.14.2-cp314-cp314-win_arm64.whl", hash = "sha256:8d1f3802887f0e0dc07387a081dca3ad0b5758e32bdf5fb619b12ac22b8e9b56", size = 453588, upload-time = "2026-07-20T19:52:41.634Z" },
+ { url = "https://files.pythonhosted.org/packages/30/54/4bbcc00f04dbc380103ee669a56df30dea127c3686c8dc2ab86b05a1387b/aiohttp-3.14.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9094262ae4f2902c7291c14ba915960db5567276690ef9195cdefe8b7cbb3acb", size = 791337, upload-time = "2026-07-20T19:52:43.821Z" },
+ { url = "https://files.pythonhosted.org/packages/e7/37/4f95edc1488580c63c0b5baaef429afbacadc7ccd9c47431cdcce90d9e5a/aiohttp-3.14.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:165b0dcc65960ffc9c99aa4ba1c3c76dbc7a34845c3c23a0bd3fbf33b3d12569", size = 526335, upload-time = "2026-07-20T19:52:45.903Z" },
+ { url = "https://files.pythonhosted.org/packages/c3/ed/1d7ae73764d135638797a427cb637ae3d98f1fd61208c25891a9f26cdd67/aiohttp-3.14.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f518d75c03cd3f7f125eca1baadb56f8b94db94602278d2d0d19af6e177650a7", size = 532102, upload-time = "2026-07-20T19:52:47.994Z" },
+ { url = "https://files.pythonhosted.org/packages/e3/12/da9816eee0d81506560259e7c0af93a4aa7df98acd0fe276958abd42d7c3/aiohttp-3.14.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9b937d7864ca68f1e8a1c3a4eb2bac1de86a992f86d36492da10a135a482fab6", size = 1922727, upload-time = "2026-07-20T19:52:50.224Z" },
+ { url = "https://files.pythonhosted.org/packages/2f/b9/d7ccbcde223a72c7b8f3458bdb08c2bacf5fc268a1fdd5cc29861eb0e4e2/aiohttp-3.14.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b155df7f572c73c6c4108b67be302c8639b96ae56fb02787eeae8cad0a1baf26", size = 1787202, upload-time = "2026-07-20T19:52:52.825Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/7c/39174069b7df18ea22b23a0fa9abffe4c091f0f86d53af83ddcbb5f44c8f/aiohttp-3.14.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0bfea68a48c8071d49aabdf5cd9a6939dcb246db65730e8dc76295fe02f7c73c", size = 1912574, upload-time = "2026-07-20T19:52:55.007Z" },
+ { url = "https://files.pythonhosted.org/packages/21/ff/bd2b7473510caf352aef3f52a3d4fe10184ec22747df74ab658b4402020f/aiohttp-3.14.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8241ee6c7fff3ebb1e6b237bccc1d90b46d07c06cf978e9f2ecad43e29dac67a", size = 2005478, upload-time = "2026-07-20T19:52:57.401Z" },
+ { url = "https://files.pythonhosted.org/packages/c8/ee/db26af0acc994350b653b3a73dddf9ee9886bf2fdb68b23fc98705e76442/aiohttp-3.14.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ec64d1c4605d689ed537ba1e572138e2d4ff603a0cb2bbbfe61d4552c73d19e1", size = 1879709, upload-time = "2026-07-20T19:52:59.778Z" },
+ { url = "https://files.pythonhosted.org/packages/6a/4d/592451fd40edca73fcb099d8718668cea36dc1dde873dd0f8e91a4081051/aiohttp-3.14.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0fb26fcc5ebf765095fe0c6ab7501574d3108c57fca9a0d462be15a65c9deb8d", size = 1675699, upload-time = "2026-07-20T19:53:02.11Z" },
+ { url = "https://files.pythonhosted.org/packages/2a/3e/c1ce4aa13fd1f910e437684843ea6cf6e0041f91d89a1b0389dce247ee59/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ef710fbb770aefa4def5484eeddb606e70ab3492aa37390def61b35652f6820a", size = 1843542, upload-time = "2026-07-20T19:53:04.385Z" },
+ { url = "https://files.pythonhosted.org/packages/aa/a4/3f9e22fda714cc38ef558166ff3326cd2f6f65c33da92ba00e3641cbea54/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d813f54560b9e5bce170fff7b0adde54d88253928e4add447c36792f27f92125", size = 1827505, upload-time = "2026-07-20T19:53:07.072Z" },
+ { url = "https://files.pythonhosted.org/packages/37/9d/260c7b8a25c7cd74bee63ce957556a2d25839a321e9107a089d4da3a51af/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:1aa4f3b44563a88da4407cef8a13438e9e386967720a826a10a633493f69208f", size = 1853751, upload-time = "2026-07-20T19:53:10.012Z" },
+ { url = "https://files.pythonhosted.org/packages/f8/d6/7c3cfa191e666bf7b48b4346815900b35b85b43ffff783fd0be52e45fe09/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4610638d3135afaefadf179bffd1bbf3434d3dc7a5d0a4c4219b99fa976e944d", size = 1668850, upload-time = "2026-07-20T19:53:12.362Z" },
+ { url = "https://files.pythonhosted.org/packages/c4/af/d9b8353aee9506dace04ca22c3c4e93b7375d9343c4780c8b512972fc6f9/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:6e30743bd3ab6ad98e9abbad6ccb39c52bcf6f11f9e3d4b6df97afffe8df53f3", size = 1883642, upload-time = "2026-07-20T19:53:14.664Z" },
+ { url = "https://files.pythonhosted.org/packages/ed/29/ed64c0a013322570a02e5b0e359df2cfd30ae58ba045748dc78175f15826/aiohttp-3.14.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:68a6f7cd8d2c70869a2a5fe97a16e86a4e13a6ed6f0d9e6029aef7573e344cd6", size = 1844092, upload-time = "2026-07-20T19:53:16.995Z" },
+ { url = "https://files.pythonhosted.org/packages/3c/74/ce6f229510fdd46ee7365fbb759ffaa3004e0bcc59fbd0ec51d8a8efc775/aiohttp-3.14.2-cp314-cp314t-win32.whl", hash = "sha256:205181d896f73436ac60cf6644e545544c759ab1c3ec8c34cc1e044689611361", size = 474098, upload-time = "2026-07-20T19:53:19.645Z" },
+ { url = "https://files.pythonhosted.org/packages/72/4c/877c07a6d97a1a0e5e25a06bab76dd7449b533ff8bb6c281c5af8b09c8d9/aiohttp-3.14.2-cp314-cp314t-win_amd64.whl", hash = "sha256:312d414c294a1e26aa12888e8fd37cd2e1131e9c48ddcf2a4c6b590290d52a49", size = 500480, upload-time = "2026-07-20T19:53:22.227Z" },
+ { url = "https://files.pythonhosted.org/packages/42/d8/d4c74bb7990da2ee6116fe262ace41cf376ebc6b0bda694c77eeaab5a509/aiohttp-3.14.2-cp314-cp314t-win_arm64.whl", hash = "sha256:63b840c03979732ec92e570f0bd6beb6311e2b5d19cacbfcd8cc7f6dd2693900", size = 469248, upload-time = "2026-07-20T19:53:24.622Z" },
+]
+
+[[package]]
+name = "aiosignal"
+version = "1.4.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "frozenlist" },
+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7", size = 25007, upload-time = "2025-07-03T22:54:43.528Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/fb/76/641ae371508676492379f16e2fa48f4e2c11741bd63c48be4b12a6b09cba/aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e", size = 7490, upload-time = "2025-07-03T22:54:42.156Z" },
+]
+
+[[package]]
+name = "attrs"
+version = "26.1.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" },
+]
+
[[package]]
name = "bidict"
version = "0.23.1"
@@ -98,6 +247,111 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/91/36/b32a806dbb7bce308fecc977220c03ca7990831491bebc582b02619ff980/desktop_notifier-6.2.0-py3-none-any.whl", hash = "sha256:193b0885e694a99ae22f72234c91afbac633074295b44183bf9716dd4077b8f3", size = 34406, upload-time = "2025-08-08T18:14:49.497Z" },
]
+[[package]]
+name = "frozenlist"
+version = "1.8.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad", size = 45875, upload-time = "2025-10-06T05:38:17.865Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/bc/03/077f869d540370db12165c0aa51640a873fb661d8b315d1d4d67b284d7ac/frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84", size = 86912, upload-time = "2025-10-06T05:35:45.98Z" },
+ { url = "https://files.pythonhosted.org/packages/df/b5/7610b6bd13e4ae77b96ba85abea1c8cb249683217ef09ac9e0ae93f25a91/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9", size = 50046, upload-time = "2025-10-06T05:35:47.009Z" },
+ { url = "https://files.pythonhosted.org/packages/6e/ef/0e8f1fe32f8a53dd26bdd1f9347efe0778b0fddf62789ea683f4cc7d787d/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93", size = 50119, upload-time = "2025-10-06T05:35:48.38Z" },
+ { url = "https://files.pythonhosted.org/packages/11/b1/71a477adc7c36e5fb628245dfbdea2166feae310757dea848d02bd0689fd/frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f", size = 231067, upload-time = "2025-10-06T05:35:49.97Z" },
+ { url = "https://files.pythonhosted.org/packages/45/7e/afe40eca3a2dc19b9904c0f5d7edfe82b5304cb831391edec0ac04af94c2/frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695", size = 233160, upload-time = "2025-10-06T05:35:51.729Z" },
+ { url = "https://files.pythonhosted.org/packages/a6/aa/7416eac95603ce428679d273255ffc7c998d4132cfae200103f164b108aa/frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52", size = 228544, upload-time = "2025-10-06T05:35:53.246Z" },
+ { url = "https://files.pythonhosted.org/packages/8b/3d/2a2d1f683d55ac7e3875e4263d28410063e738384d3adc294f5ff3d7105e/frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581", size = 243797, upload-time = "2025-10-06T05:35:54.497Z" },
+ { url = "https://files.pythonhosted.org/packages/78/1e/2d5565b589e580c296d3bb54da08d206e797d941a83a6fdea42af23be79c/frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567", size = 247923, upload-time = "2025-10-06T05:35:55.861Z" },
+ { url = "https://files.pythonhosted.org/packages/aa/c3/65872fcf1d326a7f101ad4d86285c403c87be7d832b7470b77f6d2ed5ddc/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b", size = 230886, upload-time = "2025-10-06T05:35:57.399Z" },
+ { url = "https://files.pythonhosted.org/packages/a0/76/ac9ced601d62f6956f03cc794f9e04c81719509f85255abf96e2510f4265/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92", size = 245731, upload-time = "2025-10-06T05:35:58.563Z" },
+ { url = "https://files.pythonhosted.org/packages/b9/49/ecccb5f2598daf0b4a1415497eba4c33c1e8ce07495eb07d2860c731b8d5/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d", size = 241544, upload-time = "2025-10-06T05:35:59.719Z" },
+ { url = "https://files.pythonhosted.org/packages/53/4b/ddf24113323c0bbcc54cb38c8b8916f1da7165e07b8e24a717b4a12cbf10/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd", size = 241806, upload-time = "2025-10-06T05:36:00.959Z" },
+ { url = "https://files.pythonhosted.org/packages/a7/fb/9b9a084d73c67175484ba2789a59f8eebebd0827d186a8102005ce41e1ba/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967", size = 229382, upload-time = "2025-10-06T05:36:02.22Z" },
+ { url = "https://files.pythonhosted.org/packages/95/a3/c8fb25aac55bf5e12dae5c5aa6a98f85d436c1dc658f21c3ac73f9fa95e5/frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25", size = 39647, upload-time = "2025-10-06T05:36:03.409Z" },
+ { url = "https://files.pythonhosted.org/packages/0a/f5/603d0d6a02cfd4c8f2a095a54672b3cf967ad688a60fb9faf04fc4887f65/frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b", size = 44064, upload-time = "2025-10-06T05:36:04.368Z" },
+ { url = "https://files.pythonhosted.org/packages/5d/16/c2c9ab44e181f043a86f9a8f84d5124b62dbcb3a02c0977ec72b9ac1d3e0/frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a", size = 39937, upload-time = "2025-10-06T05:36:05.669Z" },
+ { url = "https://files.pythonhosted.org/packages/69/29/948b9aa87e75820a38650af445d2ef2b6b8a6fab1a23b6bb9e4ef0be2d59/frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1", size = 87782, upload-time = "2025-10-06T05:36:06.649Z" },
+ { url = "https://files.pythonhosted.org/packages/64/80/4f6e318ee2a7c0750ed724fa33a4bdf1eacdc5a39a7a24e818a773cd91af/frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b", size = 50594, upload-time = "2025-10-06T05:36:07.69Z" },
+ { url = "https://files.pythonhosted.org/packages/2b/94/5c8a2b50a496b11dd519f4a24cb5496cf125681dd99e94c604ccdea9419a/frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4", size = 50448, upload-time = "2025-10-06T05:36:08.78Z" },
+ { url = "https://files.pythonhosted.org/packages/6a/bd/d91c5e39f490a49df14320f4e8c80161cfcce09f1e2cde1edd16a551abb3/frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383", size = 242411, upload-time = "2025-10-06T05:36:09.801Z" },
+ { url = "https://files.pythonhosted.org/packages/8f/83/f61505a05109ef3293dfb1ff594d13d64a2324ac3482be2cedc2be818256/frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4", size = 243014, upload-time = "2025-10-06T05:36:11.394Z" },
+ { url = "https://files.pythonhosted.org/packages/d8/cb/cb6c7b0f7d4023ddda30cf56b8b17494eb3a79e3fda666bf735f63118b35/frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8", size = 234909, upload-time = "2025-10-06T05:36:12.598Z" },
+ { url = "https://files.pythonhosted.org/packages/31/c5/cd7a1f3b8b34af009fb17d4123c5a778b44ae2804e3ad6b86204255f9ec5/frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b", size = 250049, upload-time = "2025-10-06T05:36:14.065Z" },
+ { url = "https://files.pythonhosted.org/packages/c0/01/2f95d3b416c584a1e7f0e1d6d31998c4a795f7544069ee2e0962a4b60740/frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52", size = 256485, upload-time = "2025-10-06T05:36:15.39Z" },
+ { url = "https://files.pythonhosted.org/packages/ce/03/024bf7720b3abaebcff6d0793d73c154237b85bdf67b7ed55e5e9596dc9a/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29", size = 237619, upload-time = "2025-10-06T05:36:16.558Z" },
+ { url = "https://files.pythonhosted.org/packages/69/fa/f8abdfe7d76b731f5d8bd217827cf6764d4f1d9763407e42717b4bed50a0/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3", size = 250320, upload-time = "2025-10-06T05:36:17.821Z" },
+ { url = "https://files.pythonhosted.org/packages/f5/3c/b051329f718b463b22613e269ad72138cc256c540f78a6de89452803a47d/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143", size = 246820, upload-time = "2025-10-06T05:36:19.046Z" },
+ { url = "https://files.pythonhosted.org/packages/0f/ae/58282e8f98e444b3f4dd42448ff36fa38bef29e40d40f330b22e7108f565/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608", size = 250518, upload-time = "2025-10-06T05:36:20.763Z" },
+ { url = "https://files.pythonhosted.org/packages/8f/96/007e5944694d66123183845a106547a15944fbbb7154788cbf7272789536/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa", size = 239096, upload-time = "2025-10-06T05:36:22.129Z" },
+ { url = "https://files.pythonhosted.org/packages/66/bb/852b9d6db2fa40be96f29c0d1205c306288f0684df8fd26ca1951d461a56/frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf", size = 39985, upload-time = "2025-10-06T05:36:23.661Z" },
+ { url = "https://files.pythonhosted.org/packages/b8/af/38e51a553dd66eb064cdf193841f16f077585d4d28394c2fa6235cb41765/frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746", size = 44591, upload-time = "2025-10-06T05:36:24.958Z" },
+ { url = "https://files.pythonhosted.org/packages/a7/06/1dc65480ab147339fecc70797e9c2f69d9cea9cf38934ce08df070fdb9cb/frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd", size = 40102, upload-time = "2025-10-06T05:36:26.333Z" },
+ { url = "https://files.pythonhosted.org/packages/2d/40/0832c31a37d60f60ed79e9dfb5a92e1e2af4f40a16a29abcc7992af9edff/frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a", size = 85717, upload-time = "2025-10-06T05:36:27.341Z" },
+ { url = "https://files.pythonhosted.org/packages/30/ba/b0b3de23f40bc55a7057bd38434e25c34fa48e17f20ee273bbde5e0650f3/frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7", size = 49651, upload-time = "2025-10-06T05:36:28.855Z" },
+ { url = "https://files.pythonhosted.org/packages/0c/ab/6e5080ee374f875296c4243c381bbdef97a9ac39c6e3ce1d5f7d42cb78d6/frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40", size = 49417, upload-time = "2025-10-06T05:36:29.877Z" },
+ { url = "https://files.pythonhosted.org/packages/d5/4e/e4691508f9477ce67da2015d8c00acd751e6287739123113a9fca6f1604e/frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027", size = 234391, upload-time = "2025-10-06T05:36:31.301Z" },
+ { url = "https://files.pythonhosted.org/packages/40/76/c202df58e3acdf12969a7895fd6f3bc016c642e6726aa63bd3025e0fc71c/frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822", size = 233048, upload-time = "2025-10-06T05:36:32.531Z" },
+ { url = "https://files.pythonhosted.org/packages/f9/c0/8746afb90f17b73ca5979c7a3958116e105ff796e718575175319b5bb4ce/frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121", size = 226549, upload-time = "2025-10-06T05:36:33.706Z" },
+ { url = "https://files.pythonhosted.org/packages/7e/eb/4c7eefc718ff72f9b6c4893291abaae5fbc0c82226a32dcd8ef4f7a5dbef/frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5", size = 239833, upload-time = "2025-10-06T05:36:34.947Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/4e/e5c02187cf704224f8b21bee886f3d713ca379535f16893233b9d672ea71/frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e", size = 245363, upload-time = "2025-10-06T05:36:36.534Z" },
+ { url = "https://files.pythonhosted.org/packages/1f/96/cb85ec608464472e82ad37a17f844889c36100eed57bea094518bf270692/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11", size = 229314, upload-time = "2025-10-06T05:36:38.582Z" },
+ { url = "https://files.pythonhosted.org/packages/5d/6f/4ae69c550e4cee66b57887daeebe006fe985917c01d0fff9caab9883f6d0/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1", size = 243365, upload-time = "2025-10-06T05:36:40.152Z" },
+ { url = "https://files.pythonhosted.org/packages/7a/58/afd56de246cf11780a40a2c28dc7cbabbf06337cc8ddb1c780a2d97e88d8/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1", size = 237763, upload-time = "2025-10-06T05:36:41.355Z" },
+ { url = "https://files.pythonhosted.org/packages/cb/36/cdfaf6ed42e2644740d4a10452d8e97fa1c062e2a8006e4b09f1b5fd7d63/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8", size = 240110, upload-time = "2025-10-06T05:36:42.716Z" },
+ { url = "https://files.pythonhosted.org/packages/03/a8/9ea226fbefad669f11b52e864c55f0bd57d3c8d7eb07e9f2e9a0b39502e1/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed", size = 233717, upload-time = "2025-10-06T05:36:44.251Z" },
+ { url = "https://files.pythonhosted.org/packages/1e/0b/1b5531611e83ba7d13ccc9988967ea1b51186af64c42b7a7af465dcc9568/frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496", size = 39628, upload-time = "2025-10-06T05:36:45.423Z" },
+ { url = "https://files.pythonhosted.org/packages/d8/cf/174c91dbc9cc49bc7b7aab74d8b734e974d1faa8f191c74af9b7e80848e6/frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231", size = 43882, upload-time = "2025-10-06T05:36:46.796Z" },
+ { url = "https://files.pythonhosted.org/packages/c1/17/502cd212cbfa96eb1388614fe39a3fc9ab87dbbe042b66f97acb57474834/frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62", size = 39676, upload-time = "2025-10-06T05:36:47.8Z" },
+ { url = "https://files.pythonhosted.org/packages/d2/5c/3bbfaa920dfab09e76946a5d2833a7cbdf7b9b4a91c714666ac4855b88b4/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94", size = 89235, upload-time = "2025-10-06T05:36:48.78Z" },
+ { url = "https://files.pythonhosted.org/packages/d2/d6/f03961ef72166cec1687e84e8925838442b615bd0b8854b54923ce5b7b8a/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c", size = 50742, upload-time = "2025-10-06T05:36:49.837Z" },
+ { url = "https://files.pythonhosted.org/packages/1e/bb/a6d12b7ba4c3337667d0e421f7181c82dda448ce4e7ad7ecd249a16fa806/frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52", size = 51725, upload-time = "2025-10-06T05:36:50.851Z" },
+ { url = "https://files.pythonhosted.org/packages/bc/71/d1fed0ffe2c2ccd70b43714c6cab0f4188f09f8a67a7914a6b46ee30f274/frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51", size = 284533, upload-time = "2025-10-06T05:36:51.898Z" },
+ { url = "https://files.pythonhosted.org/packages/c9/1f/fb1685a7b009d89f9bf78a42d94461bc06581f6e718c39344754a5d9bada/frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65", size = 292506, upload-time = "2025-10-06T05:36:53.101Z" },
+ { url = "https://files.pythonhosted.org/packages/e6/3b/b991fe1612703f7e0d05c0cf734c1b77aaf7c7d321df4572e8d36e7048c8/frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82", size = 274161, upload-time = "2025-10-06T05:36:54.309Z" },
+ { url = "https://files.pythonhosted.org/packages/ca/ec/c5c618767bcdf66e88945ec0157d7f6c4a1322f1473392319b7a2501ded7/frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714", size = 294676, upload-time = "2025-10-06T05:36:55.566Z" },
+ { url = "https://files.pythonhosted.org/packages/7c/ce/3934758637d8f8a88d11f0585d6495ef54b2044ed6ec84492a91fa3b27aa/frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d", size = 300638, upload-time = "2025-10-06T05:36:56.758Z" },
+ { url = "https://files.pythonhosted.org/packages/fc/4f/a7e4d0d467298f42de4b41cbc7ddaf19d3cfeabaf9ff97c20c6c7ee409f9/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506", size = 283067, upload-time = "2025-10-06T05:36:57.965Z" },
+ { url = "https://files.pythonhosted.org/packages/dc/48/c7b163063d55a83772b268e6d1affb960771b0e203b632cfe09522d67ea5/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51", size = 292101, upload-time = "2025-10-06T05:36:59.237Z" },
+ { url = "https://files.pythonhosted.org/packages/9f/d0/2366d3c4ecdc2fd391e0afa6e11500bfba0ea772764d631bbf82f0136c9d/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e", size = 289901, upload-time = "2025-10-06T05:37:00.811Z" },
+ { url = "https://files.pythonhosted.org/packages/b8/94/daff920e82c1b70e3618a2ac39fbc01ae3e2ff6124e80739ce5d71c9b920/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0", size = 289395, upload-time = "2025-10-06T05:37:02.115Z" },
+ { url = "https://files.pythonhosted.org/packages/e3/20/bba307ab4235a09fdcd3cc5508dbabd17c4634a1af4b96e0f69bfe551ebd/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41", size = 283659, upload-time = "2025-10-06T05:37:03.711Z" },
+ { url = "https://files.pythonhosted.org/packages/fd/00/04ca1c3a7a124b6de4f8a9a17cc2fcad138b4608e7a3fc5877804b8715d7/frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b", size = 43492, upload-time = "2025-10-06T05:37:04.915Z" },
+ { url = "https://files.pythonhosted.org/packages/59/5e/c69f733a86a94ab10f68e496dc6b7e8bc078ebb415281d5698313e3af3a1/frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888", size = 48034, upload-time = "2025-10-06T05:37:06.343Z" },
+ { url = "https://files.pythonhosted.org/packages/16/6c/be9d79775d8abe79b05fa6d23da99ad6e7763a1d080fbae7290b286093fd/frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042", size = 41749, upload-time = "2025-10-06T05:37:07.431Z" },
+ { url = "https://files.pythonhosted.org/packages/f1/c8/85da824b7e7b9b6e7f7705b2ecaf9591ba6f79c1177f324c2735e41d36a2/frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0", size = 86127, upload-time = "2025-10-06T05:37:08.438Z" },
+ { url = "https://files.pythonhosted.org/packages/8e/e8/a1185e236ec66c20afd72399522f142c3724c785789255202d27ae992818/frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f", size = 49698, upload-time = "2025-10-06T05:37:09.48Z" },
+ { url = "https://files.pythonhosted.org/packages/a1/93/72b1736d68f03fda5fdf0f2180fb6caaae3894f1b854d006ac61ecc727ee/frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c", size = 49749, upload-time = "2025-10-06T05:37:10.569Z" },
+ { url = "https://files.pythonhosted.org/packages/a7/b2/fabede9fafd976b991e9f1b9c8c873ed86f202889b864756f240ce6dd855/frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2", size = 231298, upload-time = "2025-10-06T05:37:11.993Z" },
+ { url = "https://files.pythonhosted.org/packages/3a/3b/d9b1e0b0eed36e70477ffb8360c49c85c8ca8ef9700a4e6711f39a6e8b45/frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8", size = 232015, upload-time = "2025-10-06T05:37:13.194Z" },
+ { url = "https://files.pythonhosted.org/packages/dc/94/be719d2766c1138148564a3960fc2c06eb688da592bdc25adcf856101be7/frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686", size = 225038, upload-time = "2025-10-06T05:37:14.577Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/09/6712b6c5465f083f52f50cf74167b92d4ea2f50e46a9eea0523d658454ae/frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e", size = 240130, upload-time = "2025-10-06T05:37:15.781Z" },
+ { url = "https://files.pythonhosted.org/packages/f8/d4/cd065cdcf21550b54f3ce6a22e143ac9e4836ca42a0de1022da8498eac89/frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a", size = 242845, upload-time = "2025-10-06T05:37:17.037Z" },
+ { url = "https://files.pythonhosted.org/packages/62/c3/f57a5c8c70cd1ead3d5d5f776f89d33110b1addae0ab010ad774d9a44fb9/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128", size = 229131, upload-time = "2025-10-06T05:37:18.221Z" },
+ { url = "https://files.pythonhosted.org/packages/6c/52/232476fe9cb64f0742f3fde2b7d26c1dac18b6d62071c74d4ded55e0ef94/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f", size = 240542, upload-time = "2025-10-06T05:37:19.771Z" },
+ { url = "https://files.pythonhosted.org/packages/5f/85/07bf3f5d0fb5414aee5f47d33c6f5c77bfe49aac680bfece33d4fdf6a246/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7", size = 237308, upload-time = "2025-10-06T05:37:20.969Z" },
+ { url = "https://files.pythonhosted.org/packages/11/99/ae3a33d5befd41ac0ca2cc7fd3aa707c9c324de2e89db0e0f45db9a64c26/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30", size = 238210, upload-time = "2025-10-06T05:37:22.252Z" },
+ { url = "https://files.pythonhosted.org/packages/b2/60/b1d2da22f4970e7a155f0adde9b1435712ece01b3cd45ba63702aea33938/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7", size = 231972, upload-time = "2025-10-06T05:37:23.5Z" },
+ { url = "https://files.pythonhosted.org/packages/3f/ab/945b2f32de889993b9c9133216c068b7fcf257d8595a0ac420ac8677cab0/frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806", size = 40536, upload-time = "2025-10-06T05:37:25.581Z" },
+ { url = "https://files.pythonhosted.org/packages/59/ad/9caa9b9c836d9ad6f067157a531ac48b7d36499f5036d4141ce78c230b1b/frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0", size = 44330, upload-time = "2025-10-06T05:37:26.928Z" },
+ { url = "https://files.pythonhosted.org/packages/82/13/e6950121764f2676f43534c555249f57030150260aee9dcf7d64efda11dd/frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b", size = 40627, upload-time = "2025-10-06T05:37:28.075Z" },
+ { url = "https://files.pythonhosted.org/packages/c0/c7/43200656ecc4e02d3f8bc248df68256cd9572b3f0017f0a0c4e93440ae23/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d", size = 89238, upload-time = "2025-10-06T05:37:29.373Z" },
+ { url = "https://files.pythonhosted.org/packages/d1/29/55c5f0689b9c0fb765055629f472c0de484dcaf0acee2f7707266ae3583c/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed", size = 50738, upload-time = "2025-10-06T05:37:30.792Z" },
+ { url = "https://files.pythonhosted.org/packages/ba/7d/b7282a445956506fa11da8c2db7d276adcbf2b17d8bb8407a47685263f90/frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930", size = 51739, upload-time = "2025-10-06T05:37:32.127Z" },
+ { url = "https://files.pythonhosted.org/packages/62/1c/3d8622e60d0b767a5510d1d3cf21065b9db874696a51ea6d7a43180a259c/frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c", size = 284186, upload-time = "2025-10-06T05:37:33.21Z" },
+ { url = "https://files.pythonhosted.org/packages/2d/14/aa36d5f85a89679a85a1d44cd7a6657e0b1c75f61e7cad987b203d2daca8/frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24", size = 292196, upload-time = "2025-10-06T05:37:36.107Z" },
+ { url = "https://files.pythonhosted.org/packages/05/23/6bde59eb55abd407d34f77d39a5126fb7b4f109a3f611d3929f14b700c66/frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37", size = 273830, upload-time = "2025-10-06T05:37:37.663Z" },
+ { url = "https://files.pythonhosted.org/packages/d2/3f/22cff331bfad7a8afa616289000ba793347fcd7bc275f3b28ecea2a27909/frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a", size = 294289, upload-time = "2025-10-06T05:37:39.261Z" },
+ { url = "https://files.pythonhosted.org/packages/a4/89/5b057c799de4838b6c69aa82b79705f2027615e01be996d2486a69ca99c4/frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2", size = 300318, upload-time = "2025-10-06T05:37:43.213Z" },
+ { url = "https://files.pythonhosted.org/packages/30/de/2c22ab3eb2a8af6d69dc799e48455813bab3690c760de58e1bf43b36da3e/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef", size = 282814, upload-time = "2025-10-06T05:37:45.337Z" },
+ { url = "https://files.pythonhosted.org/packages/59/f7/970141a6a8dbd7f556d94977858cfb36fa9b66e0892c6dd780d2219d8cd8/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe", size = 291762, upload-time = "2025-10-06T05:37:46.657Z" },
+ { url = "https://files.pythonhosted.org/packages/c1/15/ca1adae83a719f82df9116d66f5bb28bb95557b3951903d39135620ef157/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8", size = 289470, upload-time = "2025-10-06T05:37:47.946Z" },
+ { url = "https://files.pythonhosted.org/packages/ac/83/dca6dc53bf657d371fbc88ddeb21b79891e747189c5de990b9dfff2ccba1/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a", size = 289042, upload-time = "2025-10-06T05:37:49.499Z" },
+ { url = "https://files.pythonhosted.org/packages/96/52/abddd34ca99be142f354398700536c5bd315880ed0a213812bc491cff5e4/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e", size = 283148, upload-time = "2025-10-06T05:37:50.745Z" },
+ { url = "https://files.pythonhosted.org/packages/af/d3/76bd4ed4317e7119c2b7f57c3f6934aba26d277acc6309f873341640e21f/frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df", size = 44676, upload-time = "2025-10-06T05:37:52.222Z" },
+ { url = "https://files.pythonhosted.org/packages/89/76/c615883b7b521ead2944bb3480398cbb07e12b7b4e4d073d3752eb721558/frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd", size = 49451, upload-time = "2025-10-06T05:37:53.425Z" },
+ { url = "https://files.pythonhosted.org/packages/e0/a3/5982da14e113d07b325230f95060e2169f5311b1017ea8af2a29b374c289/frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79", size = 42507, upload-time = "2025-10-06T05:37:54.513Z" },
+ { url = "https://files.pythonhosted.org/packages/9a/9a/e35b4a917281c0b8419d4207f4334c8e8c5dbf4f3f5f9ada73958d937dcc/frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d", size = 13409, upload-time = "2025-10-06T05:38:16.721Z" },
+]
+
[[package]]
name = "ghost-downloader-3"
version = "4.0"
@@ -122,6 +376,9 @@ dependencies = [
[package.dev-dependencies]
dev = [
+ { name = "aiohttp" },
+ { name = "pytest" },
+ { name = "pytest-asyncio" },
{ name = "types-libtorrent" },
]
@@ -145,7 +402,30 @@ requires-dist = [
]
[package.metadata.requires-dev]
-dev = [{ name = "types-libtorrent", specifier = ">=2.0.11.20250816" }]
+dev = [
+ { name = "aiohttp", specifier = ">=3.14.2" },
+ { name = "pytest", specifier = ">=9.1.1" },
+ { name = "pytest-asyncio", specifier = ">=1.4.0" },
+ { name = "types-libtorrent", specifier = ">=2.0.11.20250816" },
+]
+
+[[package]]
+name = "idna"
+version = "3.18"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848", size = 196711, upload-time = "2026-06-02T14:34:07.794Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2", size = 65455, upload-time = "2026-06-02T14:34:06.319Z" },
+]
+
+[[package]]
+name = "iniconfig"
+version = "2.3.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
+]
[[package]]
name = "libtorrent"
@@ -224,6 +504,123 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/ca/a0/7a2734a7d734d81b6627ac1c470ce388f5a80e5669d9803a5c3c179ca84f/mpegdash-0.4.1-py3-none-any.whl", hash = "sha256:788e559b73acbf9175422548c58a4c441486c0ce0633fa10f77097bfffeaad4d", size = 11009, upload-time = "2026-01-18T23:57:59.011Z" },
]
+[[package]]
+name = "multidict"
+version = "6.7.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/1a/c2/c2d94cbe6ac1753f3fc980da97b3d930efe1da3af3c9f5125354436c073d/multidict-6.7.1.tar.gz", hash = "sha256:ec6652a1bee61c53a3e5776b6049172c53b6aaba34f18c9ad04f82712bac623d", size = 102010, upload-time = "2026-01-26T02:46:45.979Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/ce/f1/a90635c4f88fb913fbf4ce660b83b7445b7a02615bda034b2f8eb38fd597/multidict-6.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ff981b266af91d7b4b3793ca3382e53229088d193a85dfad6f5f4c27fc73e5d", size = 76626, upload-time = "2026-01-26T02:43:26.485Z" },
+ { url = "https://files.pythonhosted.org/packages/a6/9b/267e64eaf6fc637a15b35f5de31a566634a2740f97d8d094a69d34f524a4/multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:844c5bca0b5444adb44a623fb0a1310c2f4cd41f402126bb269cd44c9b3f3e1e", size = 44706, upload-time = "2026-01-26T02:43:27.607Z" },
+ { url = "https://files.pythonhosted.org/packages/dd/a4/d45caf2b97b035c57267791ecfaafbd59c68212004b3842830954bb4b02e/multidict-6.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f2a0a924d4c2e9afcd7ec64f9de35fcd96915149b2216e1cb2c10a56df483855", size = 44356, upload-time = "2026-01-26T02:43:28.661Z" },
+ { url = "https://files.pythonhosted.org/packages/fd/d2/0a36c8473f0cbaeadd5db6c8b72d15bbceeec275807772bfcd059bef487d/multidict-6.7.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8be1802715a8e892c784c0197c2ace276ea52702a0ede98b6310c8f255a5afb3", size = 244355, upload-time = "2026-01-26T02:43:31.165Z" },
+ { url = "https://files.pythonhosted.org/packages/5d/16/8c65be997fd7dd311b7d39c7b6e71a0cb449bad093761481eccbbe4b42a2/multidict-6.7.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2e2d2ed645ea29f31c4c7ea1552fcfd7cb7ba656e1eafd4134a6620c9f5fdd9e", size = 246433, upload-time = "2026-01-26T02:43:32.581Z" },
+ { url = "https://files.pythonhosted.org/packages/01/fb/4dbd7e848d2799c6a026ec88ad39cf2b8416aa167fcc903baa55ecaa045c/multidict-6.7.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:95922cee9a778659e91db6497596435777bd25ed116701a4c034f8e46544955a", size = 225376, upload-time = "2026-01-26T02:43:34.417Z" },
+ { url = "https://files.pythonhosted.org/packages/b6/8a/4a3a6341eac3830f6053062f8fbc9a9e54407c80755b3f05bc427295c2d0/multidict-6.7.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6b83cabdc375ffaaa15edd97eb7c0c672ad788e2687004990074d7d6c9b140c8", size = 257365, upload-time = "2026-01-26T02:43:35.741Z" },
+ { url = "https://files.pythonhosted.org/packages/f7/a2/dd575a69c1aa206e12d27d0770cdf9b92434b48a9ef0cd0d1afdecaa93c4/multidict-6.7.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:38fb49540705369bab8484db0689d86c0a33a0a9f2c1b197f506b71b4b6c19b0", size = 254747, upload-time = "2026-01-26T02:43:36.976Z" },
+ { url = "https://files.pythonhosted.org/packages/5a/56/21b27c560c13822ed93133f08aa6372c53a8e067f11fbed37b4adcdac922/multidict-6.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:439cbebd499f92e9aa6793016a8acaa161dfa749ae86d20960189f5398a19144", size = 246293, upload-time = "2026-01-26T02:43:38.258Z" },
+ { url = "https://files.pythonhosted.org/packages/5a/a4/23466059dc3854763423d0ad6c0f3683a379d97673b1b89ec33826e46728/multidict-6.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6d3bc717b6fe763b8be3f2bee2701d3c8eb1b2a8ae9f60910f1b2860c82b6c49", size = 242962, upload-time = "2026-01-26T02:43:40.034Z" },
+ { url = "https://files.pythonhosted.org/packages/1f/67/51dd754a3524d685958001e8fa20a0f5f90a6a856e0a9dcabff69be3dbb7/multidict-6.7.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:619e5a1ac57986dbfec9f0b301d865dddf763696435e2962f6d9cf2fdff2bb71", size = 237360, upload-time = "2026-01-26T02:43:41.752Z" },
+ { url = "https://files.pythonhosted.org/packages/64/3f/036dfc8c174934d4b55d86ff4f978e558b0e585cef70cfc1ad01adc6bf18/multidict-6.7.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0b38ebffd9be37c1170d33bc0f36f4f262e0a09bc1aac1c34c7aa51a7293f0b3", size = 245940, upload-time = "2026-01-26T02:43:43.042Z" },
+ { url = "https://files.pythonhosted.org/packages/3d/20/6214d3c105928ebc353a1c644a6ef1408bc5794fcb4f170bb524a3c16311/multidict-6.7.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:10ae39c9cfe6adedcdb764f5e8411d4a92b055e35573a2eaa88d3323289ef93c", size = 253502, upload-time = "2026-01-26T02:43:44.371Z" },
+ { url = "https://files.pythonhosted.org/packages/b1/e2/c653bc4ae1be70a0f836b82172d643fcf1dade042ba2676ab08ec08bff0f/multidict-6.7.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:25167cc263257660290fba06b9318d2026e3c910be240a146e1f66dd114af2b0", size = 247065, upload-time = "2026-01-26T02:43:45.745Z" },
+ { url = "https://files.pythonhosted.org/packages/c8/11/a854b4154cd3bd8b1fd375e8a8ca9d73be37610c361543d56f764109509b/multidict-6.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:128441d052254f42989ef98b7b6a6ecb1e6f708aa962c7984235316db59f50fa", size = 241870, upload-time = "2026-01-26T02:43:47.054Z" },
+ { url = "https://files.pythonhosted.org/packages/13/bf/9676c0392309b5fdae322333d22a829715b570edb9baa8016a517b55b558/multidict-6.7.1-cp311-cp311-win32.whl", hash = "sha256:d62b7f64ffde3b99d06b707a280db04fb3855b55f5a06df387236051d0668f4a", size = 41302, upload-time = "2026-01-26T02:43:48.753Z" },
+ { url = "https://files.pythonhosted.org/packages/c9/68/f16a3a8ba6f7b6dc92a1f19669c0810bd2c43fc5a02da13b1cbf8e253845/multidict-6.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bdbf9f3b332abd0cdb306e7c2113818ab1e922dc84b8f8fd06ec89ed2a19ab8b", size = 45981, upload-time = "2026-01-26T02:43:49.921Z" },
+ { url = "https://files.pythonhosted.org/packages/ac/ad/9dd5305253fa00cd3c7555dbef69d5bf4133debc53b87ab8d6a44d411665/multidict-6.7.1-cp311-cp311-win_arm64.whl", hash = "sha256:b8c990b037d2fff2f4e33d3f21b9b531c5745b33a49a7d6dbe7a177266af44f6", size = 43159, upload-time = "2026-01-26T02:43:51.635Z" },
+ { url = "https://files.pythonhosted.org/packages/8d/9c/f20e0e2cf80e4b2e4b1c365bf5fe104ee633c751a724246262db8f1a0b13/multidict-6.7.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a90f75c956e32891a4eda3639ce6dd86e87105271f43d43442a3aedf3cddf172", size = 76893, upload-time = "2026-01-26T02:43:52.754Z" },
+ { url = "https://files.pythonhosted.org/packages/fe/cf/18ef143a81610136d3da8193da9d80bfe1cb548a1e2d1c775f26b23d024a/multidict-6.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fccb473e87eaa1382689053e4a4618e7ba7b9b9b8d6adf2027ee474597128cd", size = 45456, upload-time = "2026-01-26T02:43:53.893Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/65/1caac9d4cd32e8433908683446eebc953e82d22b03d10d41a5f0fefe991b/multidict-6.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b0fa96985700739c4c7853a43c0b3e169360d6855780021bfc6d0f1ce7c123e7", size = 43872, upload-time = "2026-01-26T02:43:55.041Z" },
+ { url = "https://files.pythonhosted.org/packages/cf/3b/d6bd75dc4f3ff7c73766e04e705b00ed6dbbaccf670d9e05a12b006f5a21/multidict-6.7.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cb2a55f408c3043e42b40cc8eecd575afa27b7e0b956dfb190de0f8499a57a53", size = 251018, upload-time = "2026-01-26T02:43:56.198Z" },
+ { url = "https://files.pythonhosted.org/packages/fd/80/c959c5933adedb9ac15152e4067c702a808ea183a8b64cf8f31af8ad3155/multidict-6.7.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb0ce7b2a32d09892b3dd6cc44877a0d02a33241fafca5f25c8b6b62374f8b75", size = 258883, upload-time = "2026-01-26T02:43:57.499Z" },
+ { url = "https://files.pythonhosted.org/packages/86/85/7ed40adafea3d4f1c8b916e3b5cc3a8e07dfcdcb9cd72800f4ed3ca1b387/multidict-6.7.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c3a32d23520ee37bf327d1e1a656fec76a2edd5c038bf43eddfa0572ec49c60b", size = 242413, upload-time = "2026-01-26T02:43:58.755Z" },
+ { url = "https://files.pythonhosted.org/packages/d2/57/b8565ff533e48595503c785f8361ff9a4fde4d67de25c207cd0ba3befd03/multidict-6.7.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9c90fed18bffc0189ba814749fdcc102b536e83a9f738a9003e569acd540a733", size = 268404, upload-time = "2026-01-26T02:44:00.216Z" },
+ { url = "https://files.pythonhosted.org/packages/e0/50/9810c5c29350f7258180dfdcb2e52783a0632862eb334c4896ac717cebcb/multidict-6.7.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:da62917e6076f512daccfbbde27f46fed1c98fee202f0559adec8ee0de67f71a", size = 269456, upload-time = "2026-01-26T02:44:02.202Z" },
+ { url = "https://files.pythonhosted.org/packages/f3/8d/5e5be3ced1d12966fefb5c4ea3b2a5b480afcea36406559442c6e31d4a48/multidict-6.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bfde23ef6ed9db7eaee6c37dcec08524cb43903c60b285b172b6c094711b3961", size = 256322, upload-time = "2026-01-26T02:44:03.56Z" },
+ { url = "https://files.pythonhosted.org/packages/31/6e/d8a26d81ac166a5592782d208dd90dfdc0a7a218adaa52b45a672b46c122/multidict-6.7.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3758692429e4e32f1ba0df23219cd0b4fc0a52f476726fff9337d1a57676a582", size = 253955, upload-time = "2026-01-26T02:44:04.845Z" },
+ { url = "https://files.pythonhosted.org/packages/59/4c/7c672c8aad41534ba619bcd4ade7a0dc87ed6b8b5c06149b85d3dd03f0cd/multidict-6.7.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:398c1478926eca669f2fd6a5856b6de9c0acf23a2cb59a14c0ba5844fa38077e", size = 251254, upload-time = "2026-01-26T02:44:06.133Z" },
+ { url = "https://files.pythonhosted.org/packages/7b/bd/84c24de512cbafbdbc39439f74e967f19570ce7924e3007174a29c348916/multidict-6.7.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c102791b1c4f3ab36ce4101154549105a53dc828f016356b3e3bcae2e3a039d3", size = 252059, upload-time = "2026-01-26T02:44:07.518Z" },
+ { url = "https://files.pythonhosted.org/packages/fa/ba/f5449385510825b73d01c2d4087bf6d2fccc20a2d42ac34df93191d3dd03/multidict-6.7.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a088b62bd733e2ad12c50dad01b7d0166c30287c166e137433d3b410add807a6", size = 263588, upload-time = "2026-01-26T02:44:09.382Z" },
+ { url = "https://files.pythonhosted.org/packages/d7/11/afc7c677f68f75c84a69fe37184f0f82fce13ce4b92f49f3db280b7e92b3/multidict-6.7.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3d51ff4785d58d3f6c91bdbffcb5e1f7ddfda557727043aa20d20ec4f65e324a", size = 259642, upload-time = "2026-01-26T02:44:10.73Z" },
+ { url = "https://files.pythonhosted.org/packages/2b/17/ebb9644da78c4ab36403739e0e6e0e30ebb135b9caf3440825001a0bddcb/multidict-6.7.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc5907494fccf3e7d3f94f95c91d6336b092b5fc83811720fae5e2765890dfba", size = 251377, upload-time = "2026-01-26T02:44:12.042Z" },
+ { url = "https://files.pythonhosted.org/packages/ca/a4/840f5b97339e27846c46307f2530a2805d9d537d8b8bd416af031cad7fa0/multidict-6.7.1-cp312-cp312-win32.whl", hash = "sha256:28ca5ce2fd9716631133d0e9a9b9a745ad7f60bac2bccafb56aa380fc0b6c511", size = 41887, upload-time = "2026-01-26T02:44:14.245Z" },
+ { url = "https://files.pythonhosted.org/packages/80/31/0b2517913687895f5904325c2069d6a3b78f66cc641a86a2baf75a05dcbb/multidict-6.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcee94dfbd638784645b066074b338bc9cc155d4b4bffa4adce1615c5a426c19", size = 46053, upload-time = "2026-01-26T02:44:15.371Z" },
+ { url = "https://files.pythonhosted.org/packages/0c/5b/aba28e4ee4006ae4c7df8d327d31025d760ffa992ea23812a601d226e682/multidict-6.7.1-cp312-cp312-win_arm64.whl", hash = "sha256:ba0a9fb644d0c1a2194cf7ffb043bd852cea63a57f66fbd33959f7dae18517bf", size = 43307, upload-time = "2026-01-26T02:44:16.852Z" },
+ { url = "https://files.pythonhosted.org/packages/f2/22/929c141d6c0dba87d3e1d38fbdf1ba8baba86b7776469f2bc2d3227a1e67/multidict-6.7.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2b41f5fed0ed563624f1c17630cb9941cf2309d4df00e494b551b5f3e3d67a23", size = 76174, upload-time = "2026-01-26T02:44:18.509Z" },
+ { url = "https://files.pythonhosted.org/packages/c7/75/bc704ae15fee974f8fccd871305e254754167dce5f9e42d88a2def741a1d/multidict-6.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84e61e3af5463c19b67ced91f6c634effb89ef8bfc5ca0267f954451ed4bb6a2", size = 45116, upload-time = "2026-01-26T02:44:19.745Z" },
+ { url = "https://files.pythonhosted.org/packages/79/76/55cd7186f498ed080a18440c9013011eb548f77ae1b297206d030eb1180a/multidict-6.7.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:935434b9853c7c112eee7ac891bc4cb86455aa631269ae35442cb316790c1445", size = 43524, upload-time = "2026-01-26T02:44:21.571Z" },
+ { url = "https://files.pythonhosted.org/packages/e9/3c/414842ef8d5a1628d68edee29ba0e5bcf235dbfb3ccd3ea303a7fe8c72ff/multidict-6.7.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:432feb25a1cb67fe82a9680b4d65fb542e4635cb3166cd9c01560651ad60f177", size = 249368, upload-time = "2026-01-26T02:44:22.803Z" },
+ { url = "https://files.pythonhosted.org/packages/f6/32/befed7f74c458b4a525e60519fe8d87eef72bb1e99924fa2b0f9d97a221e/multidict-6.7.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e82d14e3c948952a1a85503817e038cba5905a3352de76b9a465075d072fba23", size = 256952, upload-time = "2026-01-26T02:44:24.306Z" },
+ { url = "https://files.pythonhosted.org/packages/03/d6/c878a44ba877f366630c860fdf74bfb203c33778f12b6ac274936853c451/multidict-6.7.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4cfb48c6ea66c83bcaaf7e4dfa7ec1b6bbcf751b7db85a328902796dfde4c060", size = 240317, upload-time = "2026-01-26T02:44:25.772Z" },
+ { url = "https://files.pythonhosted.org/packages/68/49/57421b4d7ad2e9e60e25922b08ceb37e077b90444bde6ead629095327a6f/multidict-6.7.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1d540e51b7e8e170174555edecddbd5538105443754539193e3e1061864d444d", size = 267132, upload-time = "2026-01-26T02:44:27.648Z" },
+ { url = "https://files.pythonhosted.org/packages/b7/fe/ec0edd52ddbcea2a2e89e174f0206444a61440b40f39704e64dc807a70bd/multidict-6.7.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:273d23f4b40f3dce4d6c8a821c741a86dec62cded82e1175ba3d99be128147ed", size = 268140, upload-time = "2026-01-26T02:44:29.588Z" },
+ { url = "https://files.pythonhosted.org/packages/b0/73/6e1b01cbeb458807aa0831742232dbdd1fa92bfa33f52a3f176b4ff3dc11/multidict-6.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d624335fd4fa1c08a53f8b4be7676ebde19cd092b3895c421045ca87895b429", size = 254277, upload-time = "2026-01-26T02:44:30.902Z" },
+ { url = "https://files.pythonhosted.org/packages/6a/b2/5fb8c124d7561a4974c342bc8c778b471ebbeb3cc17df696f034a7e9afe7/multidict-6.7.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:12fad252f8b267cc75b66e8fc51b3079604e8d43a75428ffe193cd9e2195dfd6", size = 252291, upload-time = "2026-01-26T02:44:32.31Z" },
+ { url = "https://files.pythonhosted.org/packages/5a/96/51d4e4e06bcce92577fcd488e22600bd38e4fd59c20cb49434d054903bd2/multidict-6.7.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:03ede2a6ffbe8ef936b92cb4529f27f42be7f56afcdab5ab739cd5f27fb1cbf9", size = 250156, upload-time = "2026-01-26T02:44:33.734Z" },
+ { url = "https://files.pythonhosted.org/packages/db/6b/420e173eec5fba721a50e2a9f89eda89d9c98fded1124f8d5c675f7a0c0f/multidict-6.7.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:90efbcf47dbe33dcf643a1e400d67d59abeac5db07dc3f27d6bdeae497a2198c", size = 249742, upload-time = "2026-01-26T02:44:35.222Z" },
+ { url = "https://files.pythonhosted.org/packages/44/a3/ec5b5bd98f306bc2aa297b8c6f11a46714a56b1e6ef5ebda50a4f5d7c5fb/multidict-6.7.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c4b9bfc148f5a91be9244d6264c53035c8a0dcd2f51f1c3c6e30e30ebaa1c84", size = 262221, upload-time = "2026-01-26T02:44:36.604Z" },
+ { url = "https://files.pythonhosted.org/packages/cd/f7/e8c0d0da0cd1e28d10e624604e1a36bcc3353aaebdfdc3a43c72bc683a12/multidict-6.7.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:401c5a650f3add2472d1d288c26deebc540f99e2fb83e9525007a74cd2116f1d", size = 258664, upload-time = "2026-01-26T02:44:38.008Z" },
+ { url = "https://files.pythonhosted.org/packages/52/da/151a44e8016dd33feed44f730bd856a66257c1ee7aed4f44b649fb7edeb3/multidict-6.7.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:97891f3b1b3ffbded884e2916cacf3c6fc87b66bb0dde46f7357404750559f33", size = 249490, upload-time = "2026-01-26T02:44:39.386Z" },
+ { url = "https://files.pythonhosted.org/packages/87/af/a3b86bf9630b732897f6fc3f4c4714b90aa4361983ccbdcd6c0339b21b0c/multidict-6.7.1-cp313-cp313-win32.whl", hash = "sha256:e1c5988359516095535c4301af38d8a8838534158f649c05dd1050222321bcb3", size = 41695, upload-time = "2026-01-26T02:44:41.318Z" },
+ { url = "https://files.pythonhosted.org/packages/b2/35/e994121b0e90e46134673422dd564623f93304614f5d11886b1b3e06f503/multidict-6.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:960c83bf01a95b12b08fd54324a4eb1d5b52c88932b5cba5d6e712bb3ed12eb5", size = 45884, upload-time = "2026-01-26T02:44:42.488Z" },
+ { url = "https://files.pythonhosted.org/packages/ca/61/42d3e5dbf661242a69c97ea363f2d7b46c567da8eadef8890022be6e2ab0/multidict-6.7.1-cp313-cp313-win_arm64.whl", hash = "sha256:563fe25c678aaba333d5399408f5ec3c383ca5b663e7f774dd179a520b8144df", size = 43122, upload-time = "2026-01-26T02:44:43.664Z" },
+ { url = "https://files.pythonhosted.org/packages/6d/b3/e6b21c6c4f314bb956016b0b3ef2162590a529b84cb831c257519e7fde44/multidict-6.7.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:c76c4bec1538375dad9d452d246ca5368ad6e1c9039dadcf007ae59c70619ea1", size = 83175, upload-time = "2026-01-26T02:44:44.894Z" },
+ { url = "https://files.pythonhosted.org/packages/fb/76/23ecd2abfe0957b234f6c960f4ade497f55f2c16aeb684d4ecdbf1c95791/multidict-6.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:57b46b24b5d5ebcc978da4ec23a819a9402b4228b8a90d9c656422b4bdd8a963", size = 48460, upload-time = "2026-01-26T02:44:46.106Z" },
+ { url = "https://files.pythonhosted.org/packages/c4/57/a0ed92b23f3a042c36bc4227b72b97eca803f5f1801c1ab77c8a212d455e/multidict-6.7.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e954b24433c768ce78ab7929e84ccf3422e46deb45a4dc9f93438f8217fa2d34", size = 46930, upload-time = "2026-01-26T02:44:47.278Z" },
+ { url = "https://files.pythonhosted.org/packages/b5/66/02ec7ace29162e447f6382c495dc95826bf931d3818799bbef11e8f7df1a/multidict-6.7.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3bd231490fa7217cc832528e1cd8752a96f0125ddd2b5749390f7c3ec8721b65", size = 242582, upload-time = "2026-01-26T02:44:48.604Z" },
+ { url = "https://files.pythonhosted.org/packages/58/18/64f5a795e7677670e872673aca234162514696274597b3708b2c0d276cce/multidict-6.7.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:253282d70d67885a15c8a7716f3a73edf2d635793ceda8173b9ecc21f2fb8292", size = 250031, upload-time = "2026-01-26T02:44:50.544Z" },
+ { url = "https://files.pythonhosted.org/packages/c8/ed/e192291dbbe51a8290c5686f482084d31bcd9d09af24f63358c3d42fd284/multidict-6.7.1-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0b4c48648d7649c9335cf1927a8b87fa692de3dcb15faa676c6a6f1f1aabda43", size = 228596, upload-time = "2026-01-26T02:44:51.951Z" },
+ { url = "https://files.pythonhosted.org/packages/1e/7e/3562a15a60cf747397e7f2180b0a11dc0c38d9175a650e75fa1b4d325e15/multidict-6.7.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:98bc624954ec4d2c7cb074b8eefc2b5d0ce7d482e410df446414355d158fe4ca", size = 257492, upload-time = "2026-01-26T02:44:53.902Z" },
+ { url = "https://files.pythonhosted.org/packages/24/02/7d0f9eae92b5249bb50ac1595b295f10e263dd0078ebb55115c31e0eaccd/multidict-6.7.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b99af4d9eec0b49927b4402bcbb58dea89d3e0db8806a4086117019939ad3dd", size = 255899, upload-time = "2026-01-26T02:44:55.316Z" },
+ { url = "https://files.pythonhosted.org/packages/00/e3/9b60ed9e23e64c73a5cde95269ef1330678e9c6e34dd4eb6b431b85b5a10/multidict-6.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6aac4f16b472d5b7dc6f66a0d49dd57b0e0902090be16594dc9ebfd3d17c47e7", size = 247970, upload-time = "2026-01-26T02:44:56.783Z" },
+ { url = "https://files.pythonhosted.org/packages/3e/06/538e58a63ed5cfb0bd4517e346b91da32fde409d839720f664e9a4ae4f9d/multidict-6.7.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:21f830fe223215dffd51f538e78c172ed7c7f60c9b96a2bf05c4848ad49921c3", size = 245060, upload-time = "2026-01-26T02:44:58.195Z" },
+ { url = "https://files.pythonhosted.org/packages/b2/2f/d743a3045a97c895d401e9bd29aaa09b94f5cbdf1bd561609e5a6c431c70/multidict-6.7.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f5dd81c45b05518b9aa4da4aa74e1c93d715efa234fd3e8a179df611cc85e5f4", size = 235888, upload-time = "2026-01-26T02:44:59.57Z" },
+ { url = "https://files.pythonhosted.org/packages/38/83/5a325cac191ab28b63c52f14f1131f3b0a55ba3b9aa65a6d0bf2a9b921a0/multidict-6.7.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:eb304767bca2bb92fb9c5bd33cedc95baee5bb5f6c88e63706533a1c06ad08c8", size = 243554, upload-time = "2026-01-26T02:45:01.054Z" },
+ { url = "https://files.pythonhosted.org/packages/20/1f/9d2327086bd15da2725ef6aae624208e2ef828ed99892b17f60c344e57ed/multidict-6.7.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:c9035dde0f916702850ef66460bc4239d89d08df4d02023a5926e7446724212c", size = 252341, upload-time = "2026-01-26T02:45:02.484Z" },
+ { url = "https://files.pythonhosted.org/packages/e8/2c/2a1aa0280cf579d0f6eed8ee5211c4f1730bd7e06c636ba2ee6aafda302e/multidict-6.7.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:af959b9beeb66c822380f222f0e0a1889331597e81f1ded7f374f3ecb0fd6c52", size = 246391, upload-time = "2026-01-26T02:45:03.862Z" },
+ { url = "https://files.pythonhosted.org/packages/e5/03/7ca022ffc36c5a3f6e03b179a5ceb829be9da5783e6fe395f347c0794680/multidict-6.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:41f2952231456154ee479651491e94118229844dd7226541788be783be2b5108", size = 243422, upload-time = "2026-01-26T02:45:05.296Z" },
+ { url = "https://files.pythonhosted.org/packages/dc/1d/b31650eab6c5778aceed46ba735bd97f7c7d2f54b319fa916c0f96e7805b/multidict-6.7.1-cp313-cp313t-win32.whl", hash = "sha256:df9f19c28adcb40b6aae30bbaa1478c389efd50c28d541d76760199fc1037c32", size = 47770, upload-time = "2026-01-26T02:45:06.754Z" },
+ { url = "https://files.pythonhosted.org/packages/ac/5b/2d2d1d522e51285bd61b1e20df8f47ae1a9d80839db0b24ea783b3832832/multidict-6.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:d54ecf9f301853f2c5e802da559604b3e95bb7a3b01a9c295c6ee591b9882de8", size = 53109, upload-time = "2026-01-26T02:45:08.044Z" },
+ { url = "https://files.pythonhosted.org/packages/3d/a3/cc409ba012c83ca024a308516703cf339bdc4b696195644a7215a5164a24/multidict-6.7.1-cp313-cp313t-win_arm64.whl", hash = "sha256:5a37ca18e360377cfda1d62f5f382ff41f2b8c4ccb329ed974cc2e1643440118", size = 45573, upload-time = "2026-01-26T02:45:09.349Z" },
+ { url = "https://files.pythonhosted.org/packages/91/cc/db74228a8be41884a567e88a62fd589a913708fcf180d029898c17a9a371/multidict-6.7.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8f333ec9c5eb1b7105e3b84b53141e66ca05a19a605368c55450b6ba208cb9ee", size = 75190, upload-time = "2026-01-26T02:45:10.651Z" },
+ { url = "https://files.pythonhosted.org/packages/d5/22/492f2246bb5b534abd44804292e81eeaf835388901f0c574bac4eeec73c5/multidict-6.7.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a407f13c188f804c759fc6a9f88286a565c242a76b27626594c133b82883b5c2", size = 44486, upload-time = "2026-01-26T02:45:11.938Z" },
+ { url = "https://files.pythonhosted.org/packages/f1/4f/733c48f270565d78b4544f2baddc2fb2a245e5a8640254b12c36ac7ac68e/multidict-6.7.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0e161ddf326db5577c3a4cc2d8648f81456e8a20d40415541587a71620d7a7d1", size = 43219, upload-time = "2026-01-26T02:45:14.346Z" },
+ { url = "https://files.pythonhosted.org/packages/24/bb/2c0c2287963f4259c85e8bcbba9182ced8d7fca65c780c38e99e61629d11/multidict-6.7.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1e3a8bb24342a8201d178c3b4984c26ba81a577c80d4d525727427460a50c22d", size = 245132, upload-time = "2026-01-26T02:45:15.712Z" },
+ { url = "https://files.pythonhosted.org/packages/a7/f9/44d4b3064c65079d2467888794dea218d1601898ac50222ab8a9a8094460/multidict-6.7.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97231140a50f5d447d3164f994b86a0bed7cd016e2682f8650d6a9158e14fd31", size = 252420, upload-time = "2026-01-26T02:45:17.293Z" },
+ { url = "https://files.pythonhosted.org/packages/8b/13/78f7275e73fa17b24c9a51b0bd9d73ba64bb32d0ed51b02a746eb876abe7/multidict-6.7.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b10359683bd8806a200fd2909e7c8ca3a7b24ec1d8132e483d58e791d881048", size = 233510, upload-time = "2026-01-26T02:45:19.356Z" },
+ { url = "https://files.pythonhosted.org/packages/4b/25/8167187f62ae3cbd52da7893f58cb036b47ea3fb67138787c76800158982/multidict-6.7.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:283ddac99f7ac25a4acadbf004cb5ae34480bbeb063520f70ce397b281859362", size = 264094, upload-time = "2026-01-26T02:45:20.834Z" },
+ { url = "https://files.pythonhosted.org/packages/a1/e7/69a3a83b7b030cf283fb06ce074a05a02322359783424d7edf0f15fe5022/multidict-6.7.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:538cec1e18c067d0e6103aa9a74f9e832904c957adc260e61cd9d8cf0c3b3d37", size = 260786, upload-time = "2026-01-26T02:45:22.818Z" },
+ { url = "https://files.pythonhosted.org/packages/fe/3b/8ec5074bcfc450fe84273713b4b0a0dd47c0249358f5d82eb8104ffe2520/multidict-6.7.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eee46ccb30ff48a1e35bb818cc90846c6be2b68240e42a78599166722cea709", size = 248483, upload-time = "2026-01-26T02:45:24.368Z" },
+ { url = "https://files.pythonhosted.org/packages/48/5a/d5a99e3acbca0e29c5d9cba8f92ceb15dce78bab963b308ae692981e3a5d/multidict-6.7.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa263a02f4f2dd2d11a7b1bb4362aa7cb1049f84a9235d31adf63f30143469a0", size = 248403, upload-time = "2026-01-26T02:45:25.982Z" },
+ { url = "https://files.pythonhosted.org/packages/35/48/e58cd31f6c7d5102f2a4bf89f96b9cf7e00b6c6f3d04ecc44417c00a5a3c/multidict-6.7.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:2e1425e2f99ec5bd36c15a01b690a1a2456209c5deed58f95469ffb46039ccbb", size = 240315, upload-time = "2026-01-26T02:45:27.487Z" },
+ { url = "https://files.pythonhosted.org/packages/94/33/1cd210229559cb90b6786c30676bb0c58249ff42f942765f88793b41fdce/multidict-6.7.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:497394b3239fc6f0e13a78a3e1b61296e72bf1c5f94b4c4eb80b265c37a131cd", size = 245528, upload-time = "2026-01-26T02:45:28.991Z" },
+ { url = "https://files.pythonhosted.org/packages/64/f2/6e1107d226278c876c783056b7db43d800bb64c6131cec9c8dfb6903698e/multidict-6.7.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:233b398c29d3f1b9676b4b6f75c518a06fcb2ea0b925119fb2c1bc35c05e1601", size = 258784, upload-time = "2026-01-26T02:45:30.503Z" },
+ { url = "https://files.pythonhosted.org/packages/4d/c1/11f664f14d525e4a1b5327a82d4de61a1db604ab34c6603bb3c2cc63ad34/multidict-6.7.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:93b1818e4a6e0930454f0f2af7dfce69307ca03cdcfb3739bf4d91241967b6c1", size = 251980, upload-time = "2026-01-26T02:45:32.603Z" },
+ { url = "https://files.pythonhosted.org/packages/e1/9f/75a9ac888121d0c5bbd4ecf4eead45668b1766f6baabfb3b7f66a410e231/multidict-6.7.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f33dc2a3abe9249ea5d8360f969ec7f4142e7ac45ee7014d8f8d5acddf178b7b", size = 243602, upload-time = "2026-01-26T02:45:34.043Z" },
+ { url = "https://files.pythonhosted.org/packages/9a/e7/50bf7b004cc8525d80dbbbedfdc7aed3e4c323810890be4413e589074032/multidict-6.7.1-cp314-cp314-win32.whl", hash = "sha256:3ab8b9d8b75aef9df299595d5388b14530839f6422333357af1339443cff777d", size = 40930, upload-time = "2026-01-26T02:45:36.278Z" },
+ { url = "https://files.pythonhosted.org/packages/e0/bf/52f25716bbe93745595800f36fb17b73711f14da59ed0bb2eba141bc9f0f/multidict-6.7.1-cp314-cp314-win_amd64.whl", hash = "sha256:5e01429a929600e7dab7b166062d9bb54a5eed752384c7384c968c2afab8f50f", size = 45074, upload-time = "2026-01-26T02:45:37.546Z" },
+ { url = "https://files.pythonhosted.org/packages/97/ab/22803b03285fa3a525f48217963da3a65ae40f6a1b6f6cf2768879e208f9/multidict-6.7.1-cp314-cp314-win_arm64.whl", hash = "sha256:4885cb0e817aef5d00a2e8451d4665c1808378dc27c2705f1bf4ef8505c0d2e5", size = 42471, upload-time = "2026-01-26T02:45:38.889Z" },
+ { url = "https://files.pythonhosted.org/packages/e0/6d/f9293baa6146ba9507e360ea0292b6422b016907c393e2f63fc40ab7b7b5/multidict-6.7.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0458c978acd8e6ea53c81eefaddbbee9c6c5e591f41b3f5e8e194780fe026581", size = 82401, upload-time = "2026-01-26T02:45:40.254Z" },
+ { url = "https://files.pythonhosted.org/packages/7a/68/53b5494738d83558d87c3c71a486504d8373421c3e0dbb6d0db48ad42ee0/multidict-6.7.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c0abd12629b0af3cf590982c0b413b1e7395cd4ec026f30986818ab95bfaa94a", size = 48143, upload-time = "2026-01-26T02:45:41.635Z" },
+ { url = "https://files.pythonhosted.org/packages/37/e8/5284c53310dcdc99ce5d66563f6e5773531a9b9fe9ec7a615e9bc306b05f/multidict-6.7.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:14525a5f61d7d0c94b368a42cff4c9a4e7ba2d52e2672a7b23d84dc86fb02b0c", size = 46507, upload-time = "2026-01-26T02:45:42.99Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/fc/6800d0e5b3875568b4083ecf5f310dcf91d86d52573160834fb4bfcf5e4f/multidict-6.7.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17307b22c217b4cf05033dabefe68255a534d637c6c9b0cc8382718f87be4262", size = 239358, upload-time = "2026-01-26T02:45:44.376Z" },
+ { url = "https://files.pythonhosted.org/packages/41/75/4ad0973179361cdf3a113905e6e088173198349131be2b390f9fa4da5fc6/multidict-6.7.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a7e590ff876a3eaf1c02a4dfe0724b6e69a9e9de6d8f556816f29c496046e59", size = 246884, upload-time = "2026-01-26T02:45:47.167Z" },
+ { url = "https://files.pythonhosted.org/packages/c3/9c/095bb28b5da139bd41fb9a5d5caff412584f377914bd8787c2aa98717130/multidict-6.7.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5fa6a95dfee63893d80a34758cd0e0c118a30b8dcb46372bf75106c591b77889", size = 225878, upload-time = "2026-01-26T02:45:48.698Z" },
+ { url = "https://files.pythonhosted.org/packages/07/d0/c0a72000243756e8f5a277b6b514fa005f2c73d481b7d9e47cd4568aa2e4/multidict-6.7.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a0543217a6a017692aa6ae5cc39adb75e587af0f3a82288b1492eb73dd6cc2a4", size = 253542, upload-time = "2026-01-26T02:45:50.164Z" },
+ { url = "https://files.pythonhosted.org/packages/c0/6b/f69da15289e384ecf2a68837ec8b5ad8c33e973aa18b266f50fe55f24b8c/multidict-6.7.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f99fe611c312b3c1c0ace793f92464d8cd263cc3b26b5721950d977b006b6c4d", size = 252403, upload-time = "2026-01-26T02:45:51.779Z" },
+ { url = "https://files.pythonhosted.org/packages/a2/76/b9669547afa5a1a25cd93eaca91c0da1c095b06b6d2d8ec25b713588d3a1/multidict-6.7.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9004d8386d133b7e6135679424c91b0b854d2d164af6ea3f289f8f2761064609", size = 244889, upload-time = "2026-01-26T02:45:53.27Z" },
+ { url = "https://files.pythonhosted.org/packages/7e/a9/a50d2669e506dad33cfc45b5d574a205587b7b8a5f426f2fbb2e90882588/multidict-6.7.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e628ef0e6859ffd8273c69412a2465c4be4a9517d07261b33334b5ec6f3c7489", size = 241982, upload-time = "2026-01-26T02:45:54.919Z" },
+ { url = "https://files.pythonhosted.org/packages/c5/bb/1609558ad8b456b4827d3c5a5b775c93b87878fd3117ed3db3423dfbce1b/multidict-6.7.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:841189848ba629c3552035a6a7f5bf3b02eb304e9fea7492ca220a8eda6b0e5c", size = 232415, upload-time = "2026-01-26T02:45:56.981Z" },
+ { url = "https://files.pythonhosted.org/packages/d8/59/6f61039d2aa9261871e03ab9dc058a550d240f25859b05b67fd70f80d4b3/multidict-6.7.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:ce1bbd7d780bb5a0da032e095c951f7014d6b0a205f8318308140f1a6aba159e", size = 240337, upload-time = "2026-01-26T02:45:58.698Z" },
+ { url = "https://files.pythonhosted.org/packages/a1/29/fdc6a43c203890dc2ae9249971ecd0c41deaedfe00d25cb6564b2edd99eb/multidict-6.7.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b26684587228afed0d50cf804cc71062cc9c1cdf55051c4c6345d372947b268c", size = 248788, upload-time = "2026-01-26T02:46:00.862Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/14/a153a06101323e4cf086ecee3faadba52ff71633d471f9685c42e3736163/multidict-6.7.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9f9af11306994335398293f9958071019e3ab95e9a707dc1383a35613f6abcb9", size = 242842, upload-time = "2026-01-26T02:46:02.824Z" },
+ { url = "https://files.pythonhosted.org/packages/41/5f/604ae839e64a4a6efc80db94465348d3b328ee955e37acb24badbcd24d83/multidict-6.7.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b4938326284c4f1224178a560987b6cf8b4d38458b113d9b8c1db1a836e640a2", size = 240237, upload-time = "2026-01-26T02:46:05.898Z" },
+ { url = "https://files.pythonhosted.org/packages/5f/60/c3a5187bf66f6fb546ff4ab8fb5a077cbdd832d7b1908d4365c7f74a1917/multidict-6.7.1-cp314-cp314t-win32.whl", hash = "sha256:98655c737850c064a65e006a3df7c997cd3b220be4ec8fe26215760b9697d4d7", size = 48008, upload-time = "2026-01-26T02:46:07.468Z" },
+ { url = "https://files.pythonhosted.org/packages/0c/f7/addf1087b860ac60e6f382240f64fb99f8bfb532bb06f7c542b83c29ca61/multidict-6.7.1-cp314-cp314t-win_amd64.whl", hash = "sha256:497bde6223c212ba11d462853cfa4f0ae6ef97465033e7dc9940cdb3ab5b48e5", size = 53542, upload-time = "2026-01-26T02:46:08.809Z" },
+ { url = "https://files.pythonhosted.org/packages/4c/81/4629d0aa32302ef7b2ec65c75a728cc5ff4fa410c50096174c1632e70b3e/multidict-6.7.1-cp314-cp314t-win_arm64.whl", hash = "sha256:2bbd113e0d4af5db41d5ebfe9ccaff89de2120578164f86a5d17d5a576d1e5b2", size = 44719, upload-time = "2026-01-26T02:46:11.146Z" },
+ { url = "https://files.pythonhosted.org/packages/81/08/7036c080d7117f28a4af526d794aab6a84463126db031b007717c1a6676e/multidict-6.7.1-py3-none-any.whl", hash = "sha256:55d97cc6dae627efa6a6e548885712d4864b81110ac76fa4e534c03819fa4a56", size = 12319, upload-time = "2026-01-26T02:46:44.004Z" },
+]
+
[[package]]
name = "nuitka"
version = "4.1.3"
@@ -239,6 +636,126 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" },
]
+[[package]]
+name = "pluggy"
+version = "1.6.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
+]
+
+[[package]]
+name = "propcache"
+version = "0.5.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ec/44/c87281c333769159c50594f22610f77398a47ccbfbbf23074e744e86f87c/propcache-0.5.2.tar.gz", hash = "sha256:01c4fc7480cd0598bb4b57022df55b9ca296da7fc5a8760bd8451a7e63a7d427", size = 50208, upload-time = "2026-05-08T21:02:12.199Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/e7/f1/8a8cc1c2c7e7934ab77e0163414f736fadbc0f5e8dd9673b952355ac175b/propcache-0.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:74b70780220e2dd89175ca24b81b68b67c83db499ae611e7f2313cb329801c78", size = 90744, upload-time = "2026-05-08T20:59:45.799Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/f4/651b1225e976bd1a2ba5cfba0c29d096581c2636b437e3a9a7ab6276270a/propcache-0.5.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4840ab0ae0216d952f4b53dc6d0b992bfc2bedbfe360bdd9b548bc184c08959", size = 52033, upload-time = "2026-05-08T20:59:47.408Z" },
+ { url = "https://files.pythonhosted.org/packages/15/a8/8ede85d6aa1f79fc7dc2f8fd2c8d65920b8272c3892903c8a1affde48cfb/propcache-0.5.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c6844ba6364fb12f403928a82cfd295ab103a2b315c77c747b2dbe4a41894ea7", size = 52754, upload-time = "2026-05-08T20:59:49.202Z" },
+ { url = "https://files.pythonhosted.org/packages/7d/fe/b3551b41bbc2f5b5bb088fc6920567cd43101253e68fbaa261339eb96fe1/propcache-0.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2293949b855ce597f2826452d17c2d545fb5622379c4ea6fdf525e9b8e8a2511", size = 57573, upload-time = "2026-05-08T20:59:50.778Z" },
+ { url = "https://files.pythonhosted.org/packages/83/27/ab851ebd1b7172e3e161f5f8d39e315d54a91bea246f01f4d872d3376aef/propcache-0.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0fd59b5af35f74da48d905dcbad55449ba13be91823cb05a9bd590bbf5b61660", size = 60645, upload-time = "2026-05-08T20:59:52.227Z" },
+ { url = "https://files.pythonhosted.org/packages/95/7d/466b3d18022e9897cbda9c735c493c5bd747d7a4c6f5ea1480b4cec434b6/propcache-0.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29f9309a2e42b0d273be006fdb4be2d6c39a47f6f57d8fb1cf9f81481df81b66", size = 61563, upload-time = "2026-05-08T20:59:53.866Z" },
+ { url = "https://files.pythonhosted.org/packages/27/1b/16ab7f2cf2041da2f60d156ba64c2484eadf9168075b4ff43c3ef60045af/propcache-0.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5aaa2b923c1944ac8febd6609cb373540a5563e7cbcb0fd770f75dace2eb817b", size = 58888, upload-time = "2026-05-08T20:59:55.457Z" },
+ { url = "https://files.pythonhosted.org/packages/0a/67/bb777ffd907633563bf35fd859c4ce97b0512c32f4633cf5d1eb7c33512b/propcache-0.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66ea454f095ddf5b6b14f56c064c0941c4788be11e18d2464cf643bf7203ff67", size = 59253, upload-time = "2026-05-08T20:59:57.075Z" },
+ { url = "https://files.pythonhosted.org/packages/b9/42/64f8d90b73fd9cdc1499b48057ff6d9cd2a98a25734c9bb62ecf07e87061/propcache-0.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:95f1e3f4760d404b13c9976c0229b2b49a3c8e2c62a9ce92efdd2b11ada75e3f", size = 57558, upload-time = "2026-05-08T20:59:58.602Z" },
+ { url = "https://files.pythonhosted.org/packages/eb/02/dba5bc03c9041f2092ea55a449caf5dfe68352c6654511b29ba0654ddb69/propcache-0.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:85341b12b9d55bad0bded24cac341bb34289469e03a11f3f583ea1cc1db0326c", size = 55007, upload-time = "2026-05-08T20:59:59.837Z" },
+ { url = "https://files.pythonhosted.org/packages/14/c0/43f649c7aa2a77a3b100d84e9dea3a483120ecb608bfe36ce49eaff517fe/propcache-0.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:26a4dca084132874e639895c3135dfad5eb20bae209f62d1aeb31b03e601c3c0", size = 60355, upload-time = "2026-05-08T21:00:01.144Z" },
+ { url = "https://files.pythonhosted.org/packages/83/c0/435dafd27f1cb4a495381dae60e25883ccfe4020bb72818e8184c1678092/propcache-0.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:3b199b9b2b3d6a7edf3183ba8a9a137a22b97f7df525feb5ae1eccf026d2a9c6", size = 59057, upload-time = "2026-05-08T21:00:02.401Z" },
+ { url = "https://files.pythonhosted.org/packages/53/ae/6e292df9135d659944e96cb3389258e4a663e5b2b5f6c217ef0ddc8d2f73/propcache-0.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e59bc9e66329185b93dab73f210f1a37f81cb40f321501db8017c9aea15dba27", size = 61938, upload-time = "2026-05-08T21:00:03.638Z" },
+ { url = "https://files.pythonhosted.org/packages/0b/42/314ebc50d8159055411fd6b0bda322ff510e4b1f7d2e4927940ad0f6af20/propcache-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:552ffadf6ad409844bc5919c42a0a83d88314cedddaea0e41e80a8b8fffe881f", size = 59731, upload-time = "2026-05-08T21:00:04.881Z" },
+ { url = "https://files.pythonhosted.org/packages/b8/9b/2da6dee38871c3c8772fabc2758325a5c9077d6d18c597737dc04dd884cd/propcache-0.5.2-cp311-cp311-win32.whl", hash = "sha256:cd416c1de191973c52ff1a12a57446bfc7642797b282d7caf2162d7d1b8aa9a0", size = 38966, upload-time = "2026-05-08T21:00:06.511Z" },
+ { url = "https://files.pythonhosted.org/packages/42/4e/f17363fb58c0afe05b067361cb6d86ed2d29de6506779a27547c4d183075/propcache-0.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:44e488ef40dbb452700b2b1f8188934121f6648f52c295055662d2191959ff82", size = 42135, upload-time = "2026-05-08T21:00:08.088Z" },
+ { url = "https://files.pythonhosted.org/packages/c6/eb/6af6685077d22e8b33358d3c548e3282706a0b3cd85044ffba4e5dd08e3b/propcache-0.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:54adaa85a22078d1e306304a40984dc5be99d599bf3dc0a24dc98f7daeab89ab", size = 38381, upload-time = "2026-05-08T21:00:09.692Z" },
+ { url = "https://files.pythonhosted.org/packages/4a/cb/e27bc2b2737a0bb49962b275efa051e8f1c35a936df7d5139b6b658b7dc9/propcache-0.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:806719138ecd720339a12410fb9614ac9b2b2d3a5fdf8235d56981c36f4039ba", size = 95887, upload-time = "2026-05-08T21:00:11.277Z" },
+ { url = "https://files.pythonhosted.org/packages/e6/13/b8ae04c59392f8d11c6cd9fb4011d1dc7c86b81225c770280300e259ffe1/propcache-0.5.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:db2b80ea58eab4f86b2beec3cc8b39e8ff9276ac20e96b7cce43c8ae84cd6b5a", size = 54654, upload-time = "2026-05-08T21:00:12.604Z" },
+ { url = "https://files.pythonhosted.org/packages/2c/7d/49777a3e20b55863d4794384a38acd460c04157b0a00f8602b0d508b8431/propcache-0.5.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e5cbfac9f61484f7e9f3597775500cd3ebe8274e9b050c38f9525c77c97520bf", size = 55190, upload-time = "2026-05-08T21:00:13.935Z" },
+ { url = "https://files.pythonhosted.org/packages/44/c7/085d0cd63062e84044e3f05797749c3f8e3938ff3aeb0eb2f69d43fafc91/propcache-0.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5dbc581d2814337da56222fab8dc5f161cd798a434e49bac27930aaef798e144", size = 59995, upload-time = "2026-05-08T21:00:15.526Z" },
+ { url = "https://files.pythonhosted.org/packages/9c/42/32cf8e3009e92b2645cf1e944f701e8ea4e924dffde1ee26db860bcbf7e4/propcache-0.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:857187f381f88c8e2fa2fe56ab94879d011b883d5a2ee5a1b60a8cd2a06846d9", size = 63422, upload-time = "2026-05-08T21:00:16.824Z" },
+ { url = "https://files.pythonhosted.org/packages/9e/1b/f112433f99fc979431b87a39ef169e3f8df070d99a72792c56d6937ac48b/propcache-0.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:178b4a2cdaac1818e2bf1c5a99b94383fa73ea5382e032a48dec07dc5668dc42", size = 64342, upload-time = "2026-05-08T21:00:18.362Z" },
+ { url = "https://files.pythonhosted.org/packages/14/15/5574111ae50dd6e879456888c0eadd4c5a869959775854e18e18a6b345f3/propcache-0.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f328175a2cde1f0ff2c4ed8ce968b9dcfb55f3a7153f39e2957ed994da13476", size = 61639, upload-time = "2026-05-08T21:00:19.692Z" },
+ { url = "https://files.pythonhosted.org/packages/cc/da/4d775080b1490c0ae604acda868bd71aabe3a89ed16f2aa4339eb8a283e7/propcache-0.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5671d09a36b06d0fd4a3da0fccbcae360e9b1570924171a15e9e0997f0249fba", size = 61588, upload-time = "2026-05-08T21:00:21.155Z" },
+ { url = "https://files.pythonhosted.org/packages/04/ac/f076982cbe2195ee9cf32de5a1e46951d9fb399fc207f390562dd0fd8fb2/propcache-0.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:80168e2ebe4d3ec6599d10ad8f520304ae1cad9b6c5a95372aef1b66b7bfb53a", size = 60029, upload-time = "2026-05-08T21:00:22.713Z" },
+ { url = "https://files.pythonhosted.org/packages/70/60/189be62e0dd898dce3b331e1b8c7a543cd3a405ac0c81fe8ee8a9d5d77e1/propcache-0.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:45f11346f884bc47444f6e6647131055844134c3175b629f84952e2b5cd62b64", size = 56774, upload-time = "2026-05-08T21:00:24.001Z" },
+ { url = "https://files.pythonhosted.org/packages/ea/9e/93377b9c7939c1ffae98f878dee955efadfd638078bc86dbc21f9d52f651/propcache-0.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8e778ebd44ef4f66ed60a0416b06b489687db264a9c0b3620362f26489492913", size = 63532, upload-time = "2026-05-08T21:00:25.545Z" },
+ { url = "https://files.pythonhosted.org/packages/14/f9/590ef6cfb9b8028d516d287812ece32bb0bc5f11fbb9c8bf6b2e6313fec8/propcache-0.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:c0cb9ed24c8964e172768d455a38254c2dd8a552905729ce006cad3d3dda59b1", size = 61592, upload-time = "2026-05-08T21:00:27.186Z" },
+ { url = "https://files.pythonhosted.org/packages/b4/5e/70958b3034c297a630bba2f17ca7abc2d5f39a803ad7e370ab79d1ecd022/propcache-0.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1d1ad32d9d4355e2be65574fd0bfd3677e7066b009cd5b9b2dee8aa6a6393b33", size = 64788, upload-time = "2026-05-08T21:00:28.8Z" },
+ { url = "https://files.pythonhosted.org/packages/12/fd/77fe5936d8c3086ca9048f7f415f122ed82e53884a9ec193646b42deef06/propcache-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c80f4ba3e8f00189165999a742ee526ebeccedf6c3f7beb0c7df821e9772435a", size = 62514, upload-time = "2026-05-08T21:00:30.098Z" },
+ { url = "https://files.pythonhosted.org/packages/cf/74/66bd798b5b3be70aa1b391f5cc9d6a0a5532d7fd3b19ec0b213e72e6ad9d/propcache-0.5.2-cp312-cp312-win32.whl", hash = "sha256:8c7972d8f193740d9175f0998ab38717e6cd322d5935c5b0fef8c0d323fd9031", size = 39018, upload-time = "2026-05-08T21:00:31.622Z" },
+ { url = "https://files.pythonhosted.org/packages/61/7c/5c0d34aa3024694d6dcb9271cdbdd08c4e47c1c0ad95ec7e7bc74cdea145/propcache-0.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:d9ee8826a7d47863a08ac44e1a5f611a462eefc3a194b492da242128bec75b42", size = 42322, upload-time = "2026-05-08T21:00:32.918Z" },
+ { url = "https://files.pythonhosted.org/packages/4d/91/875812f1a3feb20ceba818ef39fbe4d92f1081e04ac815c822496d0d038b/propcache-0.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:2800a4a8ead6b28cccd1ec54b59346f0def7922ee1c7598e8499c733cfbb7c84", size = 38172, upload-time = "2026-05-08T21:00:35.124Z" },
+ { url = "https://files.pythonhosted.org/packages/c5/09/f049e45385503fe67db75a6b6186a7b9f0c3930366dc960522c312a825b1/propcache-0.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:099aaf4b4d1a02265b92a977edf00b5c4f63b3b17ac6de39b0d637c9cac0188a", size = 94457, upload-time = "2026-05-08T21:00:36.355Z" },
+ { url = "https://files.pythonhosted.org/packages/6b/65/83d1d05655baf63113731bd5a1008435e14f8d1e5a06cbe4ec5b23ad7a31/propcache-0.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:68ce1c44c7a813a7f71ea04315a8c7b330b63db99d059a797a4651bb6f69f117", size = 53835, upload-time = "2026-05-08T21:00:38.072Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/12/a6ba6482bb5ea3260c000c9b20881c95fa11c6b30173715668259f844ed7/propcache-0.5.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fc299c129490f55f254cd90be0deca4764e36e9a7c08b4aa588479a3bbed3098", size = 54545, upload-time = "2026-05-08T21:00:39.319Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/19/7fa086f5764c59ec8a8e157cd93aa8497acc00aba9dcdec56bfffb32602d/propcache-0.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6ae2198be502c10f09b2516e7b5d019816924bc3183a43ce792a7bd6625e6f4", size = 59886, upload-time = "2026-05-08T21:00:40.621Z" },
+ { url = "https://files.pythonhosted.org/packages/a1/e4/5d7663dc8235956c8f5281698a3af1d351d8820341ddd890f59d9a9127f2/propcache-0.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6041d31504dc1779d700e1edcfb08eea334b357620b06681a4eabb57a74e574e", size = 63261, upload-time = "2026-05-08T21:00:41.775Z" },
+ { url = "https://files.pythonhosted.org/packages/4a/4a/15a03adee24d6350da4292caeac44c34c033d2afe5e87eb370f38854560f/propcache-0.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f7eabc04151c78a9f4d5bbb5f1faf571e4defeb4b585e0fe95b60ff2dbe4d3d7", size = 64184, upload-time = "2026-05-08T21:00:43.018Z" },
+ { url = "https://files.pythonhosted.org/packages/8b/c6/979176efdaa3d239e36d503d5af63a0a773b36662ed8f52e5b6a6d9fd40e/propcache-0.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4db0ba63d693afd40d249bd93f842b5f144f8fcbb83de05660373bcf30517b1d", size = 61534, upload-time = "2026-05-08T21:00:44.507Z" },
+ { url = "https://files.pythonhosted.org/packages/c8/22/63e8cd1bae4c2d2be6493b6b7d10566ddafad88137cfbc99964a1119853c/propcache-0.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1dbcf7675229b35d31abb6547d8ebc8c27a830ac3f9a794edff6254873ec7c0a", size = 61500, upload-time = "2026-05-08T21:00:45.796Z" },
+ { url = "https://files.pythonhosted.org/packages/60/5a/28e5d9acbac1cc9ccb67045e8c1b943aa8d79fdf39c93bd73cacd68008ea/propcache-0.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d310c013aad2c72f1c3f2f8dd3279d460a858c551f97aeb8c63e4693cca7b4d2", size = 59994, upload-time = "2026-05-08T21:00:47.093Z" },
+ { url = "https://files.pythonhosted.org/packages/f3/40/db650677f554a95b9c01a7c9d93d629e93a15562f5deb4573c9ee136fed2/propcache-0.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:06187263ddad280d05b4d8a8b3bb7d164cbebd469236544a42e6d9b28ac6a4fa", size = 56884, upload-time = "2026-05-08T21:00:48.376Z" },
+ { url = "https://files.pythonhosted.org/packages/80/45/70b39b89516ff8b96bf732fa6fded8cef20f293cb1508690101c3c07ec51/propcache-0.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3115559b8effafd63b142ea5ed53d63a16ea6469cbc63dce4ee194b42db5d853", size = 63464, upload-time = "2026-05-08T21:00:49.954Z" },
+ { url = "https://files.pythonhosted.org/packages/f9/e2/fa59d3a89eac5534293124af4f1d0d0ada091ce4a0ab4610ce03fd2bdd8d/propcache-0.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c60462af8e6dc30c35407c7237ea908d777b22862bbee27bc4699c0d8bcdc45a", size = 61588, upload-time = "2026-05-08T21:00:51.281Z" },
+ { url = "https://files.pythonhosted.org/packages/0b/97/efb547a55c4bc7381cfb202d6a2239ac621045277bc1ea5dfd3a7f0516c0/propcache-0.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:40314bca9ac559716fe374094fc81c11dcc34b64fd6c585360f5775690505704", size = 64667, upload-time = "2026-05-08T21:00:52.602Z" },
+ { url = "https://files.pythonhosted.org/packages/92/56/f5c7d9b4b7595d5127da38974d791b2153f3d1eae6c674af3583ace92ad3/propcache-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cfa21e036ce1e1db2be04ba3b85d2df1bb1702fa01932d984c5464c665228ff4", size = 62463, upload-time = "2026-05-08T21:00:54.303Z" },
+ { url = "https://files.pythonhosted.org/packages/bd/3b/484a3a65fc9f9f60c41dcd17b428bace5389544e2c680994534a20755066/propcache-0.5.2-cp313-cp313-win32.whl", hash = "sha256:f156a3529f38063b6dbaf356e15602a7f95f8055b1295a438433a6386f10463d", size = 38621, upload-time = "2026-05-08T21:00:55.808Z" },
+ { url = "https://files.pythonhosted.org/packages/1c/fd/3f0f10dba4dabad3bf53102be007abf55481067952bde0fdddff439e7c61/propcache-0.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:dfed59d0a5aeb01e242e66ff0300bc4a265a7c05f612d30016f0b60b1017d757", size = 41649, upload-time = "2026-05-08T21:00:57.061Z" },
+ { url = "https://files.pythonhosted.org/packages/90/ec/6ce619cc32bb500a482f811f9cd509368b4e58e638d13f2c68f370d6b475/propcache-0.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:ba338430e87ceb9c8f0cf754de38a9860560261e56c00376debd628698a7364f", size = 37636, upload-time = "2026-05-08T21:00:58.646Z" },
+ { url = "https://files.pythonhosted.org/packages/1b/82/c1d268bbbf2ef981c5bf0fbbe746db617c66e3bcefe431a1aa8943fbe23a/propcache-0.5.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a592f5f3da71c8691c788c13cb6734b6d17663d2e1cb8caddf0673d01ef8847d", size = 98872, upload-time = "2026-05-08T21:00:59.889Z" },
+ { url = "https://files.pythonhosted.org/packages/f4/d4/52c871e73e864e6b34c0e2d58ac1ec5ccd149497ddc7ad2137ae98323a35/propcache-0.5.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:6a997d0489e9668a384fcfd5061b857aa5361de73191cac204d04b889cfbbafa", size = 56257, upload-time = "2026-05-08T21:01:01.195Z" },
+ { url = "https://files.pythonhosted.org/packages/67/f0/9b90ca2a210b3d09bcfcd96ecd0f55545c091535abce2a45de2775cfd357/propcache-0.5.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:10734b5484ea113152ee25a91dccedf81631791805d2c9ccb054958e51842c94", size = 56696, upload-time = "2026-05-08T21:01:02.941Z" },
+ { url = "https://files.pythonhosted.org/packages/9d/0e/6e9d4ba07c8e56e21ddec1e75f12148142b21ca83a51871babce095334f4/propcache-0.5.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cafca7e56c12bb02ae16d283742bef25a61122e9dab2b5b3f2ccbe589ce32164", size = 62378, upload-time = "2026-05-08T21:01:04.475Z" },
+ { url = "https://files.pythonhosted.org/packages/65/19/c10badaa463dde8a27ce884f8ee2ec37e6035b7c9f5ff0c8f74f06f08dac/propcache-0.5.2-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f064f8d2b59177878b7615df1735cd8fe3462ed6be8c7b217d17a276489c2b7f", size = 65283, upload-time = "2026-05-08T21:01:05.959Z" },
+ { url = "https://files.pythonhosted.org/packages/b0/b6/93bea99ca80e19cef6512a8580e5b7857bbe09422d9daa7fd4ef5723306c/propcache-0.5.2-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f78abfa8dfc32376fd1aacf597b2f2fbbe0ea751419aee718af5d4f82537ef8c", size = 66616, upload-time = "2026-05-08T21:01:07.228Z" },
+ { url = "https://files.pythonhosted.org/packages/83/e4/5c7462e50625f051f37fb38b8224f7639f667184bbd34424ec83819bb1b7/propcache-0.5.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f7467da8a9822bf1a55336f877340c5bcbd3c482afc43a99771169f74a26dedc", size = 63773, upload-time = "2026-05-08T21:01:08.514Z" },
+ { url = "https://files.pythonhosted.org/packages/ca/b6/99238894047b13c823be25027e736626cd414a52a5e30d2c3347c2733529/propcache-0.5.2-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a6ddc6ac9e25de626c1f129c1b467d7ecd33ce2237d3fd0c4e429feef0a7ee1f", size = 63664, upload-time = "2026-05-08T21:01:09.874Z" },
+ { url = "https://files.pythonhosted.org/packages/85/1e/a3a1a63116a2b8edb415a8bb9a6f0c34bd03830b1e18e8ce2904e1dc1cf4/propcache-0.5.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2f22cbbac9e26a8e864c0985ff1268d5d939d53d9d9411a9824279097e03a2cb", size = 62643, upload-time = "2026-05-08T21:01:11.132Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/03/893cf147de2fc6543c5eaa07ad833170e7e2a2385725bbebe8c0503723bb/propcache-0.5.2-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:fc76378c62a0f04d0cd82fbb1a2cd2d7e28fcb40d5873f28a6c44e388aaa2751", size = 59595, upload-time = "2026-05-08T21:01:12.387Z" },
+ { url = "https://files.pythonhosted.org/packages/86/3b/04c1a2e12c57766568ba75ba72b3bf2042818d4c1425fab6fc07155c7cff/propcache-0.5.2-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:acd2c8edba48e31e58a363b8cf4e5c7db3b04b3f9e371f601df30d9b0d244836", size = 65711, upload-time = "2026-05-08T21:01:13.676Z" },
+ { url = "https://files.pythonhosted.org/packages/1c/34/80f8d0099f8d6bacc4de1624c85672681c8cd1149ca2da0e38fd120b817f/propcache-0.5.2-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:452b5065457eb9991ec5eb38ff41d6cd4c991c9ac7c531c4d5849ae473a9a13f", size = 64247, upload-time = "2026-05-08T21:01:14.936Z" },
+ { url = "https://files.pythonhosted.org/packages/f3/1a/8b08f3a5f1037e9e370c55883ceeeee0f6dd0416fb2d2d67b8bfc91f2a79/propcache-0.5.2-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:3430bb2bfe1331885c427745a751e774ee679fd4344f80b97bf879815fe8fa55", size = 67102, upload-time = "2026-05-08T21:01:16.281Z" },
+ { url = "https://files.pythonhosted.org/packages/34/68/8bdb7bb7756d76e005490649d10e4a8369e610c74d619f71e1aedf889e9c/propcache-0.5.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cef6cea3922890dd6c9654971001fa797b526c16ab5e1e46c05fd6f877be7568", size = 64964, upload-time = "2026-05-08T21:01:17.57Z" },
+ { url = "https://files.pythonhosted.org/packages/0a/aa/50fb0b5d3968b61a510926ff8b8465f1d6e976b3ab74496d7a4b9fc42515/propcache-0.5.2-cp313-cp313t-win32.whl", hash = "sha256:72d61e16dd78228b58c5d47be830ff3da7e5f139abdf0aef9d86cde1c5cf2191", size = 42546, upload-time = "2026-05-08T21:01:18.946Z" },
+ { url = "https://files.pythonhosted.org/packages/ae/4c/0ddbae64321bd4a95bcbfc19307238016b5b1fee645c84626c8d539e5b74/propcache-0.5.2-cp313-cp313t-win_amd64.whl", hash = "sha256:0958834041a0166d343b8d2cedcd8bcbaeb4fdbe0cf08320c5379f143c3be6e7", size = 46330, upload-time = "2026-05-08T21:01:20.162Z" },
+ { url = "https://files.pythonhosted.org/packages/00/d9/9cddc8efb78d8af264c5ec9f6d10b62f57c515feda8d321595f56010fb23/propcache-0.5.2-cp313-cp313t-win_arm64.whl", hash = "sha256:6de8bd93ddde9b992cf2b2e0d796d501a19026b5b9fd87356d7d0779531a8d96", size = 40521, upload-time = "2026-05-08T21:01:21.399Z" },
+ { url = "https://files.pythonhosted.org/packages/e2/ea/23ee535d90ce8bcc465a3028eb3cc0ce3bd1005f4bb27710b30587de798d/propcache-0.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:46088abff4cba581dea21ae0467a480526cb25aa5f3c269e909f800328bc3999", size = 94662, upload-time = "2026-05-08T21:01:22.683Z" },
+ { url = "https://files.pythonhosted.org/packages/b5/06/c5a52f419b5d8972f8d46a7577476090d8e3263ff589ce40b5ca4968d5be/propcache-0.5.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fc88b26f08d634f7bc819a7852e5214f5802641ab8d9fd5326892292eee1993e", size = 53928, upload-time = "2026-05-08T21:01:23.986Z" },
+ { url = "https://files.pythonhosted.org/packages/63/b1/4260d67d6bd85e58a66b72d54ce15d5de789b6f3870cc6bedf8ff9667401/propcache-0.5.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:97797ebb098e670a2f92dd66f32897e30d7615b14e7f59711de23e30a9072539", size = 54650, upload-time = "2026-05-08T21:01:25.305Z" },
+ { url = "https://files.pythonhosted.org/packages/70/06/2f46c318e3307cd7a6a7481def374ce838c0fe20084b39dd54b0879d0e99/propcache-0.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba57fffe4ac99c5d30076161b5866336d97600769bad35cc68f7774b15298a4e", size = 59912, upload-time = "2026-05-08T21:01:26.545Z" },
+ { url = "https://files.pythonhosted.org/packages/4c/29/fe1aebec2ce57ab985a9c382bded1124431f85078113aa222c5d278430d4/propcache-0.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:583c19759d9eec1e5b69e2fbef36a7d9c326041be9746cb822d335c8cedc2979", size = 63300, upload-time = "2026-05-08T21:01:27.937Z" },
+ { url = "https://files.pythonhosted.org/packages/b4/18/2334b26768b6c82be8c69e83671b767d5ef426aa09b0cba6c2ea47816774/propcache-0.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d0326e2e5e1f3163fa306c834e48e8d490e5fae607a097a40c0648109b47ba80", size = 64208, upload-time = "2026-05-08T21:01:29.484Z" },
+ { url = "https://files.pythonhosted.org/packages/2b/76/7f1bfd6afff4c5e38e36a3c6d68eb5f4b7311ea80baf693db78d95b603c4/propcache-0.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e00820e192c8dbebcafb383ebbf99030895f09905e7a0eb2e0340a0bcc2bc825", size = 61633, upload-time = "2026-05-08T21:01:31.068Z" },
+ { url = "https://files.pythonhosted.org/packages/c4/46/b3ff8aba2b4953a3e50de2cf72f1b5748b8eca93b15f3dc2c84339084c09/propcache-0.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c66afea89b1e43725731d2004732a046fe6fe955d51f952c3e95a7314a284a39", size = 61724, upload-time = "2026-05-08T21:01:32.374Z" },
+ { url = "https://files.pythonhosted.org/packages/c5/01/814cfcafbcff954f94c01cf30e097ddc88a076b5440fbcf4570753437d40/propcache-0.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d4dc37dec6c6cdad0b57881a5658fd14fbf53e333b1a86cf86559f190e1d9ec4", size = 60069, upload-time = "2026-05-08T21:01:33.67Z" },
+ { url = "https://files.pythonhosted.org/packages/da/68/5c6f7622d510cc666a300687e06fd060c1a43361c0c9b20d284f06d8096a/propcache-0.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:5570dbcc97571c15f68068e529c92715a12f8d54030e272d264b377e22bd17a5", size = 57099, upload-time = "2026-05-08T21:01:34.915Z" },
+ { url = "https://files.pythonhosted.org/packages/55/27/9cb0b4c679124085327957d42521c99dba04c88c90c3e55a6f0b633ebccc/propcache-0.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:f814362777a9f841adddb200ecdf8f5cb1e5a3c4b7a86378edbd6ccb26edd702", size = 63391, upload-time = "2026-05-08T21:01:36.231Z" },
+ { url = "https://files.pythonhosted.org/packages/f0/9d/7258aaa5bdf60fc6f27591eef6fe52768cb0beda7140be477c8b12c9794a/propcache-0.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:196913dea116aeb5a2ba95af4ddcb7ea85559ae07d8eee8751688310d09168c3", size = 61626, upload-time = "2026-05-08T21:01:37.545Z" },
+ { url = "https://files.pythonhosted.org/packages/8e/0d/41c602003e8a9b16fe1e7eadf62c7bfba9d5474370b24200bf48b315f45f/propcache-0.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:6e7b8719005dd1175be4ab1cd25e9b98659a5e0347331506ec6760d2773a7fb5", size = 64781, upload-time = "2026-05-08T21:01:38.83Z" },
+ { url = "https://files.pythonhosted.org/packages/8b/f3/38e66b1856e9bd079deea015bc4a55f7767c0e4db2f7dcf69e7e680ba4ce/propcache-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:51f96d685ab16e88cab128cd37a52c5da540809c8b879fa047731bfcb4ad35a4", size = 62570, upload-time = "2026-05-08T21:01:40.415Z" },
+ { url = "https://files.pythonhosted.org/packages/95/ca/bbfe9b910ce57dde8bb4876b4520fc02a4e89497c10de26be936758a3aaa/propcache-0.5.2-cp314-cp314-win32.whl", hash = "sha256:cc6fc3cc62e8501d3ed62894425040d2728ecddb1ed072737a5c70bd537aa9f0", size = 39436, upload-time = "2026-05-08T21:01:41.654Z" },
+ { url = "https://files.pythonhosted.org/packages/61/d2/45c9defbaa1ea297035d9d4cce9e8f80daafbf19319c6007f157c6256ea9/propcache-0.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:81e3a30b0bb60caa22033dd0f8a3618d1d67356212514f62c57db75cb0ef410c", size = 42373, upload-time = "2026-05-08T21:01:43.041Z" },
+ { url = "https://files.pythonhosted.org/packages/44/68/9ea5103f41d5217d7d6ec24db90018e23aebec070c3f9a6e54d12b841fd8/propcache-0.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:0d2c9bf8528f135dbb805ce027567e09164f7efa51a2be07458a2c0420f292d0", size = 38554, upload-time = "2026-05-08T21:01:44.336Z" },
+ { url = "https://files.pythonhosted.org/packages/8a/81/fadf555f42d3b762eea8a53950b0489fdc0aa9da5f8ed9e10ce0a4e01b48/propcache-0.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:4bc8ff1feffc6a61c7002ffe84634c41b822e104990ae009f44a0834430070bb", size = 99395, upload-time = "2026-05-08T21:01:45.883Z" },
+ { url = "https://files.pythonhosted.org/packages/f5/c9/c61e134a686949cf7971af3a390148b1156f7be81c73bc0cd12c873e2d48/propcache-0.5.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:79aa3ff0a9b566633b642fa9caf7e21ed1c13d6feca718187873f199e1514078", size = 56653, upload-time = "2026-05-08T21:01:47.307Z" },
+ { url = "https://files.pythonhosted.org/packages/cb/73/daf935ea7048ddd7ec8eec5345b4a40b619d2d178b3c0a0900796bc3c794/propcache-0.5.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1b31822f4474c4036bae62de9402710051d431a606d6a0f907fec79935a071aa", size = 56914, upload-time = "2026-05-08T21:01:48.573Z" },
+ { url = "https://files.pythonhosted.org/packages/79/9f/aba959b435ea18617edd7cf0a7ad0b9c574b8fc7e3d2cd55fb59cb255d33/propcache-0.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13fef48778b5a2a756523fdb781326b028ca75e32858b04f2cdd19f394564917", size = 62567, upload-time = "2026-05-08T21:01:49.903Z" },
+ { url = "https://files.pythonhosted.org/packages/6c/a1/859942de9a791ff42f6141736f5b37749b8f53e65edfa49638c67dd67e6a/propcache-0.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8b73ab70f1a3351fbc71f663b3e645af6dd0329100c353081cf69c37433fc6fe", size = 65542, upload-time = "2026-05-08T21:01:51.204Z" },
+ { url = "https://files.pythonhosted.org/packages/b5/61/315bc0fd6c0fc7f80a528b8afd209e5fc4a875ea79571b91b8f50f442907/propcache-0.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5538d2c13d93e4698af7e092b57bc7298fd35d1d58e656ae18f23ee0d0378e03", size = 66845, upload-time = "2026-05-08T21:01:52.539Z" },
+ { url = "https://files.pythonhosted.org/packages/47/f7/9f8122e3132e8e354ac41975ef8f1099be7d5a16bc7ae562734e993665c0/propcache-0.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd645f03898405cabe694fb8bc35241e3a9c332ec85627584fe3de201452b335", size = 63985, upload-time = "2026-05-08T21:01:53.847Z" },
+ { url = "https://files.pythonhosted.org/packages/c8/54/c317819ec157cbf6f35df9df9657a6f82daf34d5faf15948b2f639c2192e/propcache-0.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a473b3440261e0c60706e732b2ed2f517857344fc21bf48fdfe211e2d98eb285", size = 63999, upload-time = "2026-05-08T21:01:55.179Z" },
+ { url = "https://files.pythonhosted.org/packages/5a/56/387e3f7dfce0a9233df41fb888aa1c30222cb4bbbf09537c02dd9bd85fe2/propcache-0.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7afa37062e6650640e932e4cc9297d81f9f42d9944029cc386b8247dea4da837", size = 62779, upload-time = "2026-05-08T21:01:57.489Z" },
+ { url = "https://files.pythonhosted.org/packages/a1/9c/596784cb5824ed61ee960d3f8655a3f0993e107c6e98ab6c818b7fb92ccb/propcache-0.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:8a90efd5777e996e42d568db9ac740b944d691e565cbfd31b2f7832f9184b2b8", size = 59796, upload-time = "2026-05-08T21:01:58.736Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/3d/1a6cfa1726a48542c1e8784a0761421476a5b68e09b7f36bf95eb954aaba/propcache-0.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:f19bb891234d72535764d703bfed1153cc34f4214d5bd7150aee1eec9e8f4366", size = 66023, upload-time = "2026-05-08T21:02:00.228Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/0e/05fd6990369477076e4e280bcb970de760fddf0161a46e988bc95f7940ec/propcache-0.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:32775082acd2d807ee3db715c7770d38767b817870acfa08c29e057f3c4d5b56", size = 64448, upload-time = "2026-05-08T21:02:01.888Z" },
+ { url = "https://files.pythonhosted.org/packages/cd/86/5f8da315a4309c62c10c0b2516b17492d5d3bbe1bb862b96604db67e2a37/propcache-0.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9282fb1a3bccd038da9f768b927b24a0c753e466c086b7c4f3c6982851eefb2d", size = 67329, upload-time = "2026-05-08T21:02:03.484Z" },
+ { url = "https://files.pythonhosted.org/packages/da/d3/3368efe79ab21f0cdf86ef49895811c9cc933131d4cde1f28a624e22e712/propcache-0.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cc49723e2f60d6b32a0f0b08a3fd6d13203c07f1cd9566cfce0f12a917c967a2", size = 65172, upload-time = "2026-05-08T21:02:04.745Z" },
+ { url = "https://files.pythonhosted.org/packages/d5/07/127e8b0bacfb325396196f9d976a22453049b89b9b2b08477cc3145faa44/propcache-0.5.2-cp314-cp314t-win32.whl", hash = "sha256:2d7aa89ebca5acc98cba9d1472d976e394782f587bad6661003602a619fd1821", size = 43813, upload-time = "2026-05-08T21:02:06.025Z" },
+ { url = "https://files.pythonhosted.org/packages/88/fb/46dad6c0ae49ed230ab1b16c890c2b6314e2403e6c412976f4a72d64a527/propcache-0.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:d447bb0b3054be5818458fbb171208b1d9ff11eba14e18ca18b90cbb45767370", size = 47764, upload-time = "2026-05-08T21:02:07.353Z" },
+ { url = "https://files.pythonhosted.org/packages/e7/c4/a47d0a63aa309d10d59ede6e9d4cff03a344a79d1f0f4cd0cd74997b53e0/propcache-0.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:fe67a3d11cd9b4efabfa45c3d00ffba2b26811442a73a581a94b67c2b5faccf6", size = 41140, upload-time = "2026-05-08T21:02:09.065Z" },
+ { url = "https://files.pythonhosted.org/packages/3a/ed/1cdcab6ba3d6ab7feca11fc14f0eeea80755bb53ef4e892079f31b10a25f/propcache-0.5.2-py3-none-any.whl", hash = "sha256:be1ddfcbb376e3de5d2e2db1d58d6d67463e6b4f9f040c000de8e300295465fe", size = 14036, upload-time = "2026-05-08T21:02:10.673Z" },
+]
+
[[package]]
name = "pycocoa"
version = "25.12.4"
@@ -248,6 +765,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/58/f6/0b1b50967c878eae9c84b68dc098ee004cabf57d0d7a449001ddf04b8aaf/pycocoa-25.12.4-py2.py3-none-any.whl", hash = "sha256:189f08be6f3b479bad53711776eec5687a9eddc30e88c1ac24ed458e6053ba1b", size = 227487, upload-time = "2025-12-03T21:11:26.182Z" },
]
+[[package]]
+name = "pygments"
+version = "2.20.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" },
+]
+
[[package]]
name = "pyobjc"
version = "12.1"
@@ -3120,6 +3646,35 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/60/02/13dc76880e9f54102b8d4859a1a14061c6914c12d8c8554dc49ef55ab209/pysidesix_frameless_window-0.8.1-py3-none-any.whl", hash = "sha256:0445e7ce095c3631893ec54edb470a47c2bb05ea64db736f446211550b7c2237", size = 31181, upload-time = "2026-03-21T02:04:35.829Z" },
]
+[[package]]
+name = "pytest"
+version = "9.1.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "iniconfig" },
+ { name = "packaging" },
+ { name = "pluggy" },
+ { name = "pygments" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" },
+]
+
+[[package]]
+name = "pytest-asyncio"
+version = "1.4.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "pytest" },
+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/43/7c/d36d04db312ecf4298932ef77e6e4a9e8ad017906e24e34f0b0c361a2473/pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42", size = 58514, upload-time = "2026-05-26T09:56:04.083Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/03/e2/08a497ef684b88559c9cc5f4ad53a37e7b99e727094a86d6ea32536d5d3c/pytest_asyncio-1.4.0-py3-none-any.whl", hash = "sha256:933ca923a23075a87fb7070c0ec272a6848489824d887c85c812670932835aa1", size = 16930, upload-time = "2026-05-26T09:56:02.576Z" },
+]
+
[[package]]
name = "pywin32"
version = "311"
@@ -3460,3 +4015,102 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/5a/37/43c2fd322ebe53ae34e690f6e8169c5a3fda4a834461e35fb44dee0294d2/wreq-0.12.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b25512142f58bf4c54cc0efc0fa20c4461fbdb295b8cc2a10ca26a42c130e30d", size = 4194715, upload-time = "2026-06-04T15:53:05.507Z" },
{ url = "https://files.pythonhosted.org/packages/40/0f/bceab0b61fa26ef385d5ac5b0f75db2c4f07de05c37b7792bca85f2f06b3/wreq-0.12.0-cp314-cp314t-win_arm64.whl", hash = "sha256:581cf312bb4ec20c450034d38d48b166c0e155e40313ebf3a79c9546d8671b4e", size = 3842391, upload-time = "2026-06-04T15:52:42.874Z" },
]
+
+[[package]]
+name = "yarl"
+version = "1.24.5"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "idna" },
+ { name = "multidict" },
+ { name = "propcache" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/31/33/ebe9e3d1f86c7a0b51094c0a146392045ca1631d2664889539dec8088a33/yarl-1.24.5.tar.gz", hash = "sha256:e81b83143bee16329c23db3c1b2d82b29892fcbcb849186d2f6e98a5abe9a57f", size = 228679, upload-time = "2026-07-20T02:07:45.435Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/fe/db/3cb5df059756a45761cc3dee8fd25ec82b83a6585ea3542b969fda850f99/yarl-1.24.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2c1fe720934a16ea8e7146175cba2126f87f54912c8c5435e7f7c7a51ef808d3", size = 135043, upload-time = "2026-07-20T02:04:52.39Z" },
+ { url = "https://files.pythonhosted.org/packages/44/f8/767d6bd5a03db63bc467df2fb56d6fafeae9667d74aea92cd6af399f828b/yarl-1.24.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c687ed078e145f5fd53a14854beff320e1d2ab76df03e2009c98f39a0f68f39a", size = 96942, upload-time = "2026-07-20T02:04:54.26Z" },
+ { url = "https://files.pythonhosted.org/packages/ce/97/10b939c44d7b28d1dbc389cfc7012306d1ea8dba01eaef44b39fffaee52a/yarl-1.24.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:709f1efed56c4a145793c046cd4939f9959bcd818979a787b77d8e09c57a0840", size = 97046, upload-time = "2026-07-20T02:04:56.638Z" },
+ { url = "https://files.pythonhosted.org/packages/5b/7a/b410dbe39b6255c55fb2a2bcee96eb844d0789235ddc381a889a90dc72d6/yarl-1.24.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:874019bd513008b009f58657134e5d0c5e030b3559bd0553976837adf52fe966", size = 110512, upload-time = "2026-07-20T02:04:58.955Z" },
+ { url = "https://files.pythonhosted.org/packages/83/c7/da591971f78a5617e1f21f5699858ebccd836fe181a6493788ffc91ba69b/yarl-1.24.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a4582acf7ef76482f6f511ebaf1946dae7f2e85ec4728b81a678c01df63bd723", size = 102454, upload-time = "2026-07-20T02:05:00.623Z" },
+ { url = "https://files.pythonhosted.org/packages/c4/8e/73b0ed4de47289a78a96045d76d1cfe5e41848bf0da59ce25b2ec87ee05d/yarl-1.24.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2cabe6546e41dabe439999a23fcb5246e0c3b595b4315b96ef755252be90caeb", size = 117617, upload-time = "2026-07-20T02:05:02.325Z" },
+ { url = "https://files.pythonhosted.org/packages/cf/14/b744747bc4f57a8d55bd744df463457524583e1e9f7538b5ace0346ab92e/yarl-1.24.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:17f57620f5475b3c69109376cc87e42a7af5db13c9398e4292772a706ff10780", size = 116135, upload-time = "2026-07-20T02:05:04.05Z" },
+ { url = "https://files.pythonhosted.org/packages/66/ca/95aa4d0e5b7ea4f20e4d577c42d001ed9df207569fdb063cc5ed4ebb496b/yarl-1.24.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:570fec8fbd22b032733625f03f10b7ff023bc399213db15e72a7acaef28c2f4e", size = 111935, upload-time = "2026-07-20T02:05:05.738Z" },
+ { url = "https://files.pythonhosted.org/packages/72/0d/d2ad8d6b147832d177a4e720ba1962fe686eb0913b74503b3eca094b8bba/yarl-1.24.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5fede79c6f73ff2c3ef822864cb1ada23196e62756df53bc6231d351a49516a2", size = 110010, upload-time = "2026-07-20T02:05:07.471Z" },
+ { url = "https://files.pythonhosted.org/packages/50/18/eb335e4120903903f4865041355ae46256a2406eb2865bc24827f4f27b61/yarl-1.24.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8ccf9aca873b767977c73df497a85dbedee4ee086ae9ae49dc461333b9b79f58", size = 110058, upload-time = "2026-07-20T02:05:09.246Z" },
+ { url = "https://files.pythonhosted.org/packages/44/70/97353add32c62ad6f206d948ac5a5ee84398225e534dc6ed6433d1b335b6/yarl-1.24.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ad5d8201d310b031e6cd839d9bac2d4e5a01533ce5d3d5b50b7de1ef3af1de61", size = 103308, upload-time = "2026-07-20T02:05:11.31Z" },
+ { url = "https://files.pythonhosted.org/packages/68/39/5e7398d4b6f6b3c9062823ebc60802df5b272e3fe9e788f9734c6ee46c85/yarl-1.24.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:841f0852f48fefea3b12c9dfec00704dfa3aef5215d0e3ce564bb3d7cd8d57c6", size = 116898, upload-time = "2026-07-20T02:05:13.099Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/c9/09e52f2239e8b96357eccca05915382e4ba5405ebfb623b6036040d99654/yarl-1.24.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:9baafc71b04f8f4bb0703b21d6fc9f0c30b346c636a532ff16ec8491a5ea4b1f", size = 109400, upload-time = "2026-07-20T02:05:14.821Z" },
+ { url = "https://files.pythonhosted.org/packages/4b/6a/e94133d4c2d1a14d2384310bf3e79d9cf32c9d1eae1c6f034fb80d098fa1/yarl-1.24.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:d897129df1a22b12aeed2c2c98df0785a2e8e6e0bde87b389491d0025c187077", size = 115934, upload-time = "2026-07-20T02:05:17.78Z" },
+ { url = "https://files.pythonhosted.org/packages/4e/3c/34955ed967b976fc38edcbb6d538dee79dbda4cb7fc7f72a0907a7c78e0f/yarl-1.24.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:dd625535328fd9882374356269227670189adfcc6a2d90284f323c05862eecbd", size = 112178, upload-time = "2026-07-20T02:05:19.675Z" },
+ { url = "https://files.pythonhosted.org/packages/f5/46/d7bd3a8859d47dcfaffd7127af7076032a7da278a9a02e17b5f37bfb6712/yarl-1.24.5-cp311-cp311-win_amd64.whl", hash = "sha256:f4239bbec5a3577ddb49e4b50aeb32d8e5792098262ae2f63723f916a29b1a25", size = 97544, upload-time = "2026-07-20T02:05:21.523Z" },
+ { url = "https://files.pythonhosted.org/packages/01/69/c1bfd21e32c638974ea2c542a0b8c53ef1fa9eff336020f5d014f9503ff2/yarl-1.24.5-cp311-cp311-win_arm64.whl", hash = "sha256:3ac6aff147deb9c09461b2d4bbdf6256831198f5d8a23f5d37138213090b6d8a", size = 93359, upload-time = "2026-07-20T02:05:23.493Z" },
+ { url = "https://files.pythonhosted.org/packages/1b/84/71d051c850b5af41d168c679d9eb67eb7c55283ac4ee131673edf134bc4e/yarl-1.24.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d693396e5aea78db03decd60aec9ece16c9b40ba00a587f089615ff4e718a81d", size = 136035, upload-time = "2026-07-20T02:05:25.489Z" },
+ { url = "https://files.pythonhosted.org/packages/03/4d/8ad27f9a1b7e69313cca5d695b925b48efe51208d3490e0844bae97cabc0/yarl-1.24.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3363fcc96e665878946ad7a106b9a13eac0541766a690ef287c0232ac768b6ec", size = 97642, upload-time = "2026-07-20T02:05:27.429Z" },
+ { url = "https://files.pythonhosted.org/packages/ea/b4/05b4131c407006cd1e410e9c6539f16a0945724677e5364447313c15ea3e/yarl-1.24.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9d399bdcfb4a0f659b9b3788bbc89babe63d9a6a65aacdf4d4e7065ff2e6316c", size = 97323, upload-time = "2026-07-20T02:05:29.441Z" },
+ { url = "https://files.pythonhosted.org/packages/20/16/e618c875c73e0e39611f20a581b3d5e8d59b8857bf001bee3263044c6deb/yarl-1.24.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90333fd89b43c0d08ac85f3f1447593fc2c66de18c3d6378d7125ea118dc7a54", size = 107741, upload-time = "2026-07-20T02:05:31.367Z" },
+ { url = "https://files.pythonhosted.org/packages/d9/9a/c4defeaf3ed33fcb346aacf9c6e971a8d4e2bde04a0310e79abb208e7965/yarl-1.24.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:665b0a2c463cc9423dd647e0bfd9f4ccc9b50f768c55304d5e9f80b177c1de12", size = 103570, upload-time = "2026-07-20T02:05:33.303Z" },
+ { url = "https://files.pythonhosted.org/packages/5f/e7/0e0e0de5865ebd5914537ef486f36c727a59865c3ac0cf5ff1b32aececbf/yarl-1.24.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e006d3a974c4ee19512e5f058abedb6eef36a5e553c14812bdeba1758d812e6d", size = 115815, upload-time = "2026-07-20T02:05:35.292Z" },
+ { url = "https://files.pythonhosted.org/packages/2b/27/ca56b700cb170aba25a3893b75355b213935657dc5714d2383354a270e62/yarl-1.24.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e7d42c531243450ef0d4d9c172e7ed6ef052640f195629065041b5add4e058d1", size = 116025, upload-time = "2026-07-20T02:05:37.503Z" },
+ { url = "https://files.pythonhosted.org/packages/d6/d0/d56c859b8222116f5d68459199f48359e0bf121b6f65a69bf329b3602ba0/yarl-1.24.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f08c7513ecef5aad65687bfdf6bc601ae9fccd04a42904501f8f7141abad9eb9", size = 109835, upload-time = "2026-07-20T02:05:39.506Z" },
+ { url = "https://files.pythonhosted.org/packages/70/a2/3a35557e4d1a79425040eba202ccaf08bdc8717680fc77e2498a1ad2e0a5/yarl-1.24.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6c95b17fe34ed802f17e205112e6e10db92275c34fee290aa9bdc55a9c724027", size = 108884, upload-time = "2026-07-20T02:05:41.584Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/35/ef4c26356b7913c68983bac2d72a4212b3347af551cb8d250b99b5ed7b7f/yarl-1.24.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:56b149b22de33b23b0c6077ab9518c6dcb538ad462e1830e68d06591ccf6e38b", size = 107308, upload-time = "2026-07-20T02:05:43.697Z" },
+ { url = "https://files.pythonhosted.org/packages/d5/91/ff0dc66c2ccf3e0153ab97ff61eabab4400e6a5264af427ab30cd69f1857/yarl-1.24.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:a8fe66b8f300da93798025a785a5b90b42f3810dc2b72283ff84a41aaaebc293", size = 103646, upload-time = "2026-07-20T02:05:45.895Z" },
+ { url = "https://files.pythonhosted.org/packages/74/f0/33b9271c7f881766359d58266fa0811d2e5210ed860e28da7dc6d7786344/yarl-1.24.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:377fe3732edbaf78ee74efdf2c9f49f6e99f20e7f9d2649fda3eb4badd77d76e", size = 115305, upload-time = "2026-07-20T02:05:47.832Z" },
+ { url = "https://files.pythonhosted.org/packages/ef/65/fd79fb1868c4a80db8661091de525bf430f63c3bea1b20e8b6a84fc7d359/yarl-1.24.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e8ffa78582120024f476a611d7befc123cee59e47e8309d470cf667d806e613b", size = 108404, upload-time = "2026-07-20T02:05:49.604Z" },
+ { url = "https://files.pythonhosted.org/packages/ff/ba/dbabe6b262f17a816c70cfc09558dbf03ece3ec76684d02f911a3d3a189c/yarl-1.24.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:daba5e594f06114e37db186efd2dd916609071e59daca901a0a2e71f02b142ce", size = 115940, upload-time = "2026-07-20T02:05:51.741Z" },
+ { url = "https://files.pythonhosted.org/packages/a5/43/fab2d1dad9d340a268cdde63756a123d069723efff6a372d123fa74a9517/yarl-1.24.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:65be18ec59496c13908f02a2472751d9ef840b4f3fb5726f129306bf6a2a7bba", size = 110006, upload-time = "2026-07-20T02:05:53.554Z" },
+ { url = "https://files.pythonhosted.org/packages/c4/27/41eb51bbd1b8d89546b83897cfb0164f1e109304fd408dbb151b639eec0f/yarl-1.24.5-cp312-cp312-win_amd64.whl", hash = "sha256:a929d878fec099030c292803b31e5d5540a7b6a31e6a3cc76cb4685fc2a2f51b", size = 97618, upload-time = "2026-07-20T02:05:55.57Z" },
+ { url = "https://files.pythonhosted.org/packages/3c/25/b2553764b3d65db711d8f45416351ec4f420847558eb669edcbcaadf5780/yarl-1.24.5-cp312-cp312-win_arm64.whl", hash = "sha256:7ce27823052e2013b597e0c738b13e7e36b8ccb9400df8959417b052ab0fd92c", size = 93018, upload-time = "2026-07-20T02:05:57.554Z" },
+ { url = "https://files.pythonhosted.org/packages/e1/63/64ef361967cc983573149dc1515d531db5da8a4c92d22bb833d59e01b313/yarl-1.24.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:79af890482fc94648e8cde4c68620378f7fef60932710fa17a66abc039244da2", size = 135075, upload-time = "2026-07-20T02:05:59.671Z" },
+ { url = "https://files.pythonhosted.org/packages/bb/89/55920fd853ce43e608adbc3962456f0d649d6bb15250dc2988321da0fe1c/yarl-1.24.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:46c2f213e23a04b93a392942d782eb9e413e6ef6bf7c8c53884e599a5c174dcb", size = 97225, upload-time = "2026-07-20T02:06:01.769Z" },
+ { url = "https://files.pythonhosted.org/packages/15/f0/7688d3f2cfff7590df2af38ec46d969f4281a4dddb08a9ad2eafbcdddf98/yarl-1.24.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92ab3e11448f2ff7bf53c5a26eff0edc086898ec8b21fb154b85839ce1d88075", size = 96751, upload-time = "2026-07-20T02:06:03.676Z" },
+ { url = "https://files.pythonhosted.org/packages/05/1a/a851a0f94aaaf379dd4f901bfc80f634280bec51eb260b47363e2a4cd62e/yarl-1.24.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ebb0ec7f17803063d5aeb982f3b1bd2b2f4e4fae6751226cbd6ba1fcfe9e63ff", size = 107960, upload-time = "2026-07-20T02:06:05.699Z" },
+ { url = "https://files.pythonhosted.org/packages/6c/a8/faea066c12f9c77ca0de90641f1655f9dd7b412477bf28c76d692f3aecff/yarl-1.24.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:82632daed195dcc8ea664e8556dc9bdbd671960fb3776bd92806ce05792c2448", size = 103500, upload-time = "2026-07-20T02:06:07.556Z" },
+ { url = "https://files.pythonhosted.org/packages/fb/9c/1e67084c2a6e2f2db0e3be798328cb3be42c0119b621d25461479a224d21/yarl-1.24.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:53e549287ef628fecba270045c9701b0c564563a9b0577d24a4ec75b8ab8040f", size = 115780, upload-time = "2026-07-20T02:06:09.599Z" },
+ { url = "https://files.pythonhosted.org/packages/58/86/1f94664e147474337e3359f52012cf3d02f825f694317b178bfba1078c62/yarl-1.24.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fcd3b77e2f17bbe4ca56ec7bcb07992647d19d0b9c05d84886dcd6f9eb810afd", size = 115308, upload-time = "2026-07-20T02:06:11.352Z" },
+ { url = "https://files.pythonhosted.org/packages/0a/43/8e55ae7538ba5f28ccb3c845c6dd4549cf7016d5992e5326512519107cdd/yarl-1.24.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d46b86567dd4e248c6c159fcbcdcce01e0a5c8a7cd2334a0fff759d0fa075b16", size = 110574, upload-time = "2026-07-20T02:06:13.129Z" },
+ { url = "https://files.pythonhosted.org/packages/ce/ba/a889ec8765cedcf2ac44dcb02d6a21e4861399b243b263c5f2dde27ee740/yarl-1.24.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7f72c74aa99359e27a2ee8d6613fefa28b5f76a983c083074dfc2aaa4ab46213", size = 109914, upload-time = "2026-07-20T02:06:15.243Z" },
+ { url = "https://files.pythonhosted.org/packages/9c/c3/e45f821af67b791c2dbbe4a9f4137a1d33f8d386654a05a0c3f47bdfa25d/yarl-1.24.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3f45789ce415a7ec0820dc4f82925f9b5f7732070be1dec1f5f23ec381435a24", size = 107712, upload-time = "2026-07-20T02:06:17.443Z" },
+ { url = "https://files.pythonhosted.org/packages/02/00/2ab0f42c9857fcb490bfaa6647b14540b53d241ab209f23220b958cc5832/yarl-1.24.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6e73e7fe93f17a7b191f52ec9da9dd8c06a8fe735a1ecbd13b97d1c723bff385", size = 104251, upload-time = "2026-07-20T02:06:19.259Z" },
+ { url = "https://files.pythonhosted.org/packages/7a/70/709d9a286e98af2c7fd8e4e6cada658b5c0e30d87dd7e2a63c2fb5767217/yarl-1.24.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4a36f9becdd4c5c52a20c3e9484128b070b1dcfc8944c006f3a528295a359a9c", size = 115319, upload-time = "2026-07-20T02:06:21.207Z" },
+ { url = "https://files.pythonhosted.org/packages/5c/6c/3eaa515142991fe84cfc483ff986492211f1978f90161ccefdbec919d09b/yarl-1.24.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:7bcbe0fcf850eae67b6b01749815a4f7161c560a844c769ad7b48fcd99f791c4", size = 109163, upload-time = "2026-07-20T02:06:23.006Z" },
+ { url = "https://files.pythonhosted.org/packages/bb/64/711dafce66c323a3144d470547a71c5384c57623308ac8bb5e4b903ac148/yarl-1.24.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:24e861e9630e0daddcb9191fb187f60f034e17a4426f8101279f0c475cd74144", size = 115435, upload-time = "2026-07-20T02:06:24.923Z" },
+ { url = "https://files.pythonhosted.org/packages/cf/f3/9b9d0e6d84bea851eb1ba99e4bdc755b86fd813e49ec86dfe42f26befdef/yarl-1.24.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9335a099ad87287c37fe5d1a982ff392fa5efe5d14b40a730b1ec1d6a41382b4", size = 110691, upload-time = "2026-07-20T02:06:26.973Z" },
+ { url = "https://files.pythonhosted.org/packages/86/e4/62a06b7e87c4246ac76b7c2da136f972eb4a3a1fc94abb07e7022d6fdb0a/yarl-1.24.5-cp313-cp313-win_amd64.whl", hash = "sha256:2dbe06fc16bc91502bca713704022182e5729861ae00277c3a23354b40929740", size = 97454, upload-time = "2026-07-20T02:06:29.163Z" },
+ { url = "https://files.pythonhosted.org/packages/9e/c9/5fc8025b318ab10db413b61056bd0d95c557a70e8df4210c7511f866329c/yarl-1.24.5-cp313-cp313-win_arm64.whl", hash = "sha256:6b8536851f9f65e7f00c7a1d49ba7f2be0ffe2c11555367fc9f50d9f842410a1", size = 92813, upload-time = "2026-07-20T02:06:31.113Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/08/5f3085fef9564217074db9dd8573de1795bc82cde61a7ad10b6a7234a569/yarl-1.24.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:2729fcfc4f6a596fb0c50f32090400aa9367774ac296a00387e65098c0befa76", size = 135680, upload-time = "2026-07-20T02:06:33.273Z" },
+ { url = "https://files.pythonhosted.org/packages/98/35/ba9436e579bd48a8801f2021d842d9ab4994c26e4c7dd3a4c1f1bcb57a9e/yarl-1.24.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ff330d3c30db4eb6b01d79e29d2d0b407a7ecad39cfd9ec993ece57396a2ec0d", size = 97395, upload-time = "2026-07-20T02:06:35.259Z" },
+ { url = "https://files.pythonhosted.org/packages/18/a9/a07f76f3c44e02b25cc743af5ef93eef27f7013eadca770451b6a6ccb5db/yarl-1.24.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e42d75862735da90e7fc5a7b23db0c976f737113a54b3c9777a9b665e9cbff75", size = 97223, upload-time = "2026-07-20T02:06:37.216Z" },
+ { url = "https://files.pythonhosted.org/packages/77/f7/a9a1d6fa7dd9e388f95b30f6ad3ec4e285f6c8f61f44ce16070c3fcfe414/yarl-1.24.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a3732e66413163e72508da9eff9ce9d2846fde51fae45d3605393d3e6cd303e9", size = 108777, upload-time = "2026-07-20T02:06:39.292Z" },
+ { url = "https://files.pythonhosted.org/packages/2f/44/e0b86c302471fabd6f02808ecf2ac52b8412b624787849d4bf2cdb466f6f/yarl-1.24.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5b8ee53be440a0cffc991a27be3057e0530122548dbe7c0892df08822fce5ede", size = 103119, upload-time = "2026-07-20T02:06:41.456Z" },
+ { url = "https://files.pythonhosted.org/packages/d1/16/9c16d180bf8faaf223225eb50e1245870ff1ae0e302a27153988e65c51fd/yarl-1.24.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:af3aefa655adb5869491fa907e652290386800ae99cc50095cba71e2c6aefdca", size = 116471, upload-time = "2026-07-20T02:06:43.696Z" },
+ { url = "https://files.pythonhosted.org/packages/d2/8d/b219b9df28a02ce95cfbdd41d2f7caa5669d0ff979c1c9975697145e33c5/yarl-1.24.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2120b96872df4a117cde97d270bac96aea7cc52205d305cf4611df694a487027", size = 115974, upload-time = "2026-07-20T02:06:45.874Z" },
+ { url = "https://files.pythonhosted.org/packages/9b/e8/f20557aca240d88e69850ad1ee91756821d094bb1310565c04d25c6682a2/yarl-1.24.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:66410eb6345d467151934b49bfa70fb32f5b35a6140baa40ad97d6436abea2e9", size = 110830, upload-time = "2026-07-20T02:06:47.852Z" },
+ { url = "https://files.pythonhosted.org/packages/db/18/199b85109a53eeca64ee19c9cca228287e8e4ab0cc1a09b28f530e65cce0/yarl-1.24.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4af7b7e1be0a69bee8210735fe6dcfc38879adfac6d62e789d53ba432d1ffa41", size = 110054, upload-time = "2026-07-20T02:06:49.84Z" },
+ { url = "https://files.pythonhosted.org/packages/aa/2f/ed28147f8cd7f48c49367c90713b30a555284b6105a6a56f3a05568da795/yarl-1.24.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa139875ff98ab97da323cfadfaff08900d1ad42f1b5087b0b812a55c5a06373", size = 108312, upload-time = "2026-07-20T02:06:51.835Z" },
+ { url = "https://files.pythonhosted.org/packages/c5/c5/55e16ae0a5c227cea8df1c6871ba57d614a34243146c05729caf2a1bd9c5/yarl-1.24.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:0055afc45e864b92729ac7600e2d102c17bef060647e74bca75fa84d66b9ff36", size = 103662, upload-time = "2026-07-20T02:06:54.061Z" },
+ { url = "https://files.pythonhosted.org/packages/8d/ea/dbd7c2caec459c9a426f18b02688ecbfb58620d0f6a3422d24769fbaf8ab/yarl-1.24.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:f0e466ed7511fe9d459a819edbc6c2585c0b6eabde9fa8a8947552468a7a6ef0", size = 116090, upload-time = "2026-07-20T02:06:56.015Z" },
+ { url = "https://files.pythonhosted.org/packages/06/84/39ce4ce3059e07fece5fbdbee8c4053406af9aca911ce9fa5f8548aab6af/yarl-1.24.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:f141474e85b7e54998ec5180530a7cda99ab29e282fa50e0756d89981a9b43c5", size = 109523, upload-time = "2026-07-20T02:06:57.926Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/8b/71ff44137b405c64a7788075669c24010019f57a7464b78c3a6cbee539d9/yarl-1.24.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:e2935f8c39e3b03e83519292d78f075189978f3f4adc15a78144c7c8e2a1cba5", size = 116084, upload-time = "2026-07-20T02:06:59.868Z" },
+ { url = "https://files.pythonhosted.org/packages/62/c0/423078fdd4042e1862c11f0ffd977a0ffa393783c12bee94685923bc189e/yarl-1.24.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9d1216a7f6f77836617dba35687c5b78a4170afc3c3f18fc788f785ba26565c4", size = 111006, upload-time = "2026-07-20T02:07:01.907Z" },
+ { url = "https://files.pythonhosted.org/packages/cf/52/6daa2ee9d95e5c98b8128f8df91eb692eb423ab274b8cf08db52152fad26/yarl-1.24.5-cp314-cp314-win_amd64.whl", hash = "sha256:5ba4f78df2bcc19f764a4b26a8a4f5049c110090ad5825993aacb052bf8003ad", size = 99215, upload-time = "2026-07-20T02:07:03.852Z" },
+ { url = "https://files.pythonhosted.org/packages/ec/0e/464a847d7359e0da75dd9fc5c1d1aa35d0159ea31e5f8e66a3c1c29ff3d0/yarl-1.24.5-cp314-cp314-win_arm64.whl", hash = "sha256:9e4e16c73d717c5cf27626c524d0a2e261ad20e46932b2670f64ad5dde23e26f", size = 94566, upload-time = "2026-07-20T02:07:06.074Z" },
+ { url = "https://files.pythonhosted.org/packages/e2/55/e03acc4446772660bc335e86e41ef31e4d0d838fd641531a11a5ee33b493/yarl-1.24.5-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e1ae548a9d901adca07899a4147a7c826bbcc06239d3ce9a59f57886a28a4c88", size = 142533, upload-time = "2026-07-20T02:07:08.284Z" },
+ { url = "https://files.pythonhosted.org/packages/ae/71/4acd3a1fc7cf14345cdb302665ecd2097f62c365b4f14ca17d4f37775cf9/yarl-1.24.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ff405d91509d88e8d44129cd87b18d70acd1f0c1aeabd7bc3c46792b1fe2acba", size = 100776, upload-time = "2026-07-20T02:07:10.197Z" },
+ { url = "https://files.pythonhosted.org/packages/ff/0b/cfb76b7fe99686db264bff829779a539d923e7564ffd7ef18da6c54c3774/yarl-1.24.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:47e98aab9d8d82ff682e7b0b5dded33bf138a32b817fcf7fa3b27b2d7c412928", size = 100913, upload-time = "2026-07-20T02:07:12.357Z" },
+ { url = "https://files.pythonhosted.org/packages/8b/3f/7116e782992abbd4fb6948488aec72078895e929a23078290739e8396fce/yarl-1.24.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a658a6d3fafee5c6f63c58f3e785c8c43c93fbc02bf9f2b6663f8185e0971f", size = 106507, upload-time = "2026-07-20T02:07:14.173Z" },
+ { url = "https://files.pythonhosted.org/packages/33/90/d4d2d73ee78229cc889872eb8e085d8f5c6f51abdb178409fd9b23cf74fd/yarl-1.24.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4377407001ca3c057773f44d8ddd6358fa5f691407c1ba92210bd3cf8d9e4c95", size = 99219, upload-time = "2026-07-20T02:07:16.019Z" },
+ { url = "https://files.pythonhosted.org/packages/3e/fa/a6df1a9bccd644eec00abee0dff4277416222cec435330fd1f2858523ec1/yarl-1.24.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7c0494a31a1ac5461a226e7947a9c9b78c44e1dc7185164fa7e9651557a5d9bc", size = 111804, upload-time = "2026-07-20T02:07:18.141Z" },
+ { url = "https://files.pythonhosted.org/packages/8a/9e/7b2a1f4bcc20e9447156dd2b1c4d01f70d9df0759025ee7d09a84ffae134/yarl-1.24.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a7cff474ab7cd149765bb784cf6d78b32e18e20473fb7bda860bce98ab58e9da", size = 110943, upload-time = "2026-07-20T02:07:20.06Z" },
+ { url = "https://files.pythonhosted.org/packages/08/ff/22c92affb0f9b623ca753d27d968b5625b868f12c6378d049d55ae247643/yarl-1.24.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cbb833ccacdb5519eff9b8b71ee618cc2801c878e77e288775d77c3a2ced858a", size = 108251, upload-time = "2026-07-20T02:07:22.217Z" },
+ { url = "https://files.pythonhosted.org/packages/45/44/5769b96298c1e195fb412997b6090af2a84105cf59c17613558a2d011d1f/yarl-1.24.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:82f75e05912e84b7a0fe57075d9c59de3cb352b928330f2eb69b2e1f54c3e1f0", size = 106025, upload-time = "2026-07-20T02:07:24.083Z" },
+ { url = "https://files.pythonhosted.org/packages/4c/40/009e8e791fd9762c0e1567e69248acb4f49064597e1680874c16dd8bb798/yarl-1.24.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:16a2f5010280020e90f5330257e6944bc33e73593b136cc5a241e6c1dc292498", size = 106573, upload-time = "2026-07-20T02:07:26.248Z" },
+ { url = "https://files.pythonhosted.org/packages/20/c6/b7480578f8a0a80946f36ad6df547ecec704f9ba69d2de60f8aa6f1c1cbf/yarl-1.24.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:ffcd54362564dc1a30fb74d8b8a6e5a6b11ebd5e27266adc3b7427a21a6c9104", size = 100751, upload-time = "2026-07-20T02:07:28.098Z" },
+ { url = "https://files.pythonhosted.org/packages/d4/27/4476f3360b91a48c5cf125e91f59a3bd35299d84a431a258d57f5977bb11/yarl-1.24.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:0465ec8cedc2349b97a6b595ace64084a50c6e839eca40aa0626f38b8350e331", size = 111643, upload-time = "2026-07-20T02:07:30.88Z" },
+ { url = "https://files.pythonhosted.org/packages/4c/4b/5cdd3e5ee944e8af31e52f6cd3d3af5fd7b937e036ccbbba2c9ffebede95/yarl-1.24.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4db9aecb141cb7a5447171b57aa1ed3a8fee06af40b992ffc31206c0b0121550", size = 106312, upload-time = "2026-07-20T02:07:33.06Z" },
+ { url = "https://files.pythonhosted.org/packages/18/86/f406b0c2a6f99575de2da671ef47aa06f89a5be83a27a46971c3b86cecdb/yarl-1.24.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:f540c013589084679a6c7fac07096b10159737918174f5dfc5e11bf5bca4dfe6", size = 110379, upload-time = "2026-07-20T02:07:35.155Z" },
+ { url = "https://files.pythonhosted.org/packages/f0/6c/9f3adfbd3b30b4fa0f7ccb3a83eba2c1152d3fff554d535e640ba0f7ba2b/yarl-1.24.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a61834fb15d81322d872eaafd333838ae7c9cea84067f232656f75965933d047", size = 108497, upload-time = "2026-07-20T02:07:37.35Z" },
+ { url = "https://files.pythonhosted.org/packages/dd/37/91eb2e5ca883a529c1b390348a74cd9fc0512171727f547ce70bfe02be5c/yarl-1.24.5-cp314-cp314t-win_amd64.whl", hash = "sha256:5c88e5815a49d289e599f3513aa7fde0bc2092ff188f99c940f007f90f53d104", size = 102450, upload-time = "2026-07-20T02:07:39.578Z" },
+ { url = "https://files.pythonhosted.org/packages/bf/f4/ed5c402ac8fde4403ed3366c2716bfddc8a6677ebd59f3d62772cc7fe468/yarl-1.24.5-cp314-cp314t-win_arm64.whl", hash = "sha256:cf139c02f5f23ef6532040a30ff662c00a318c952334f211046b8e60b7f17688", size = 97222, upload-time = "2026-07-20T02:07:41.55Z" },
+ { url = "https://files.pythonhosted.org/packages/61/02/962c1cbfc401a30c1d034dc67ff395f64b52302c6d62de556c1fca99acc0/yarl-1.24.5-py3-none-any.whl", hash = "sha256:a33700d13d9b7d84fd10947b09ff69fb9a792e519c8cb9764a3ca70baa6c23a7", size = 58612, upload-time = "2026-07-20T02:07:43.461Z" },
+]