mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
feat: 升级 V3 默认运行时至 Python 3.14 与 Debian Trixie (#6382)
This commit is contained in:
@@ -5,7 +5,7 @@ import app
|
||||
|
||||
def test_app_installs_known_oss2_invalid_escape_warning_filter():
|
||||
"""
|
||||
app 初始化过滤器应覆盖 oss2 在 Python 3.12 下产生的无害转义警告。
|
||||
app 初始化过滤器应覆盖 oss2 的无效转义警告。
|
||||
"""
|
||||
app._filter_third_party_startup_warnings()
|
||||
action, message, category, module, lineno = warnings.filters[0]
|
||||
@@ -15,3 +15,18 @@ def test_app_installs_known_oss2_invalid_escape_warning_filter():
|
||||
assert category is SyntaxWarning
|
||||
assert module is None
|
||||
assert lineno == 0
|
||||
|
||||
|
||||
def test_app_installs_google_genai_python314_warning_filter():
|
||||
"""app 初始化过滤器应覆盖 Google GenAI SDK 的 Python 3.14 弃用警告。"""
|
||||
app._filter_third_party_startup_warnings()
|
||||
|
||||
assert any(
|
||||
action == "ignore"
|
||||
and message.match("'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17")
|
||||
and category is DeprecationWarning
|
||||
and module is not None
|
||||
and module.match("google.genai.types")
|
||||
and lineno == 0
|
||||
for action, message, category, module, lineno in warnings.filters
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user