feat: 新增 Python 3.14t 自由线程镜像 (#6434)

* fix(resource): select free-threaded extension ABI

* chore(deps): require moviepilot-rust 0.2.9

* perf: add free-threaded runtime comparison

* feat: add free-threaded runtime profile

* chore(deps): require moviepilot-rust 0.3.0

* test: isolate system endpoint import graph

* fix(docker): preserve runtime profile during recovery

* feat(runtime): expose active GIL state

* feat(plugin): log GIL fallback attribution

* test: refresh runtime observability dependency baseline

* fix(plugin): validate the active uv runtime profile

* test(runtime): expand free-threaded benchmark evidence

* docs(runtime): define v3t governance gates

* test(runtime): separate rust benchmark modes

* docs: sync free-threaded architecture baseline

* perf: add PostgreSQL driver comparison

* docs(runtime): record final free-threaded evidence

* fix(runtime): converge dual-profile dependency verification

* fix(runtime): scope Python 3.14 warning filter

* fix(runtime): match actual oss2 syntax warning

* docs(runtime): refresh free-threaded benchmark evidence

* test(architecture): refresh runtime dependency baseline

* ci: skip unused Trivy Java database

* build: exclude local verification artifacts

* docs(runtime): refresh PostgreSQL driver benchmarks

* docs(runtime): record plugin restore acceptance

* docs(runtime): record amd64 candidate acceptance

* ci: pin beta image publisher action

* test(architecture): merge runtime dependency baseline

* feat(runtime): expose Python GIL status

* docs(runtime): document Python runtime status fields
This commit is contained in:
InfinityPacer
2026-08-24 17:48:14 +08:00
committed by GitHub
parent 88dce4ca8e
commit 326b5cf3ad
63 changed files with 5294 additions and 253 deletions
+19
View File
@@ -29,6 +29,7 @@ from app.application.plugin.lifecycle import plugin_lifecycle
from app.application.plugin.runtime import get_plugin_manager
from app.runtime.config import global_vars
from app.runtime.settings import RuntimeSettingsCompat
from app.foundation.environment import is_free_threaded_runtime, is_gil_enabled
settings = RuntimeSettingsCompat()
from app.runtime.health import get_application_health
@@ -88,6 +89,7 @@ async def init_extra():
if settings.MOVIEPILOT_SAFE_MODE:
SystemHelper().set_system_modified()
SystemChain().restart_finish()
_log_runtime_gil_status()
return
plugin_manager = get_plugin_manager()
try:
@@ -102,6 +104,7 @@ async def init_extra():
finally:
plugin_manager.set_plugin_settling(False)
plugin_manager.start_monitor()
_log_runtime_gil_status()
# 设置系统已修改标志
SystemHelper().set_system_modified()
# 重启完成
@@ -110,6 +113,22 @@ async def init_extra():
await MoviePilotServerHelper.async_report_usage()
def _log_runtime_gil_status() -> None:
"""在核心模块和插件完成导入后记录解释器的实际并发模式。"""
free_threaded = is_free_threaded_runtime()
gil_enabled = is_gil_enabled()
if free_threaded and gil_enabled:
logger.warning(
"Python free-threaded 运行时已启用 GIL,请检查此前的原生扩展兼容告警"
)
return
logger.info(
"Python运行时:%sGIL=%s",
"free-threaded" if free_threaded else "standard",
"enabled" if gil_enabled else "disabled",
)
async def run_shutdown_step(
name: str,
callback: Callable[[], object],