From 281be248c296da1a9a4f514df01123c545e7475f Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Sat, 12 Sep 2026 08:42:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(server):=20=E7=A7=BB=E9=99=A4=20web=5Fserve?= =?UTF-8?q?r=20=E5=85=BC=E5=AE=B9=E5=85=A5=E5=8F=A3=E4=B8=8E=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E8=84=9A=E6=9C=AC=E7=9A=84=20socketio=20=E6=AE=8B?= =?UTF-8?q?=E7=95=99=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Socket.IO 整体移除后,web_server.py 仍从 server.app 导入已不存在的 socketio 导致兼容入口启动即 ImportError;test/runtime_standalone_checks.py 中 ext.socketio 断言同样失效,一并清理。 Co-authored-by: Astrion powered by Kimi-K3 --- test/runtime_standalone_checks.py | 5 +---- web_server.py | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/runtime_standalone_checks.py b/test/runtime_standalone_checks.py index 1f5670f5..41e21bc3 100644 --- a/test/runtime_standalone_checks.py +++ b/test/runtime_standalone_checks.py @@ -186,11 +186,8 @@ def check_lifecycle(): assert not is_main_task_gate_busy(terminal), "任务终态后门闸必须释放(否则下一任务无法受理)" - # 全程无 Flask app 初始化(socketio 未绑定 app) + # 全程无 Flask app 初始化 assert not has_app_context(), "验收结束仍应无 Flask app 上下文" - import server.extensions as ext - - assert getattr(ext.socketio, "server", None) is None, "socketio 不应初始化 server(无 Web 应用装配)" def check_chain(): diff --git a/web_server.py b/web_server.py index 684e9a53..a9026939 100644 --- a/web_server.py +++ b/web_server.py @@ -5,7 +5,6 @@ import warnings from server.app import ( app, - socketio, run_server, parse_arguments, resource_busy_page, @@ -14,7 +13,6 @@ from server.app import ( __all__ = [ "app", - "socketio", "run_server", "parse_arguments", "resource_busy_page",