agent-Specialization/web_server.py
JOJO 281be248c2 fix(server): 移除 web_server 兼容入口与验收脚本的 socketio 残留引用
Socket.IO 整体移除后,web_server.py 仍从 server.app 导入已不存在的
socketio 导致兼容入口启动即 ImportError;test/runtime_standalone_checks.py
中 ext.socketio 断言同样失效,一并清理。

Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
2026-09-12 08:42:41 +08:00

40 lines
841 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
兼容入口deprecated转发到 server.app。
保留旧命令 `python web_server.py`,但推荐使用 `python -m server.app` 或 `python server/app.py`。
"""
import warnings
from server.app import (
app,
run_server,
parse_arguments,
resource_busy_page,
DEFAULT_PORT,
)
__all__ = [
"app",
"run_server",
"parse_arguments",
"resource_busy_page",
"DEFAULT_PORT",
]
def _warn_deprecated():
warnings.warn(
"web_server.py 已弃用,建议使用 `python -m server.app` 启动(仍向下兼容)。",
DeprecationWarning,
stacklevel=2,
)
if __name__ == "__main__":
_warn_deprecated()
args = parse_arguments()
run_server(
path=args.path,
thinking_mode=args.thinking_mode,
port=args.port,
debug=args.debug,
)