mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
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:
@@ -1,5 +1,7 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from app.runtime.config import settings
|
||||
from app.adapters.system.resource import (
|
||||
ResourceHelper,
|
||||
@@ -21,6 +23,33 @@ def test_resource_helper_uses_v3_only():
|
||||
assert ResourceHelper._resource_target == Path("app/application/site")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("system", "machine", "gil_disabled", "expected"),
|
||||
[
|
||||
("Linux", "x86_64", 0, "sites.cpython-314-x86_64-linux-gnu.so"),
|
||||
("Linux", "aarch64", 1, "sites.cpython-314t-aarch64-linux-gnu.so"),
|
||||
("Darwin", "arm64", 1, "sites.cpython-314t-darwin.so"),
|
||||
("Windows", "AMD64", 1, "sites.cp314t-win_amd64.pyd"),
|
||||
],
|
||||
)
|
||||
def test_resource_helper_selects_runtime_abi(
|
||||
monkeypatch,
|
||||
system,
|
||||
machine,
|
||||
gil_disabled,
|
||||
expected,
|
||||
):
|
||||
"""资源下载文件名必须区分普通解释器与 free-threaded ABI。"""
|
||||
monkeypatch.setattr("app.adapters.system.resource.platform.system", lambda: system)
|
||||
monkeypatch.setattr("app.adapters.system.resource.platform.machine", lambda: machine)
|
||||
monkeypatch.setattr(
|
||||
"app.adapters.system.resource.sysconfig.get_config_var",
|
||||
lambda name: gil_disabled if name == "Py_GIL_DISABLED" else None,
|
||||
)
|
||||
|
||||
assert ResourceHelper._get_needed_files()[-1] == expected
|
||||
|
||||
|
||||
def test_resource_helper_preserves_no_argument_check_contract(monkeypatch):
|
||||
"""旧插件无参数调用 check 时应使用启动层注入版本,不反向导入站点应用。"""
|
||||
provider_calls = []
|
||||
|
||||
Reference in New Issue
Block a user