fix: 增加插件 V3t 运行时兼容门禁 (#6475)

* fix(plugin): enforce declared runtime compatibility

* chore(ci): record plugin runtime compatibility edges

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
This commit is contained in:
InfinityPacer
2026-08-27 07:06:16 +08:00
committed by GitHub
co-authored by jxxghp
parent 627775c090
commit 3b7f8c357d
8 changed files with 119 additions and 5 deletions
+5
View File
@@ -32,6 +32,7 @@ from importlib.metadata import distributions
from requests import Response
from app.runtime.cache import cached, is_fresh
from app.foundation.environment import is_free_threaded_runtime
from app.runtime.dependencies import (
iter_runtime_profile_requirement_strings,
iter_runtime_requirement_strings,
@@ -369,6 +370,8 @@ class PluginHelper(metaclass=WeakSingleton):
"""
if not isinstance(plugin_info, dict):
return False
if is_free_threaded_runtime() and plugin_info.get("v3t") is False:
return False
if not get_runtime_setting('VERSION_FLAG'):
return True
current_flag = get_runtime_setting('VERSION_FLAG')
@@ -397,6 +400,8 @@ class PluginHelper(metaclass=WeakSingleton):
"""
if not isinstance(plugin_info, dict):
return False
if is_free_threaded_runtime() and plugin_info.get("v3t") is False:
return False
current_flag = get_runtime_setting('VERSION_FLAG')
if not current_flag:
return not package_version