fix: 支持 Windows Python 3.14t 运行依赖 (#6492)

* fix(runtime): support Windows free-threaded dependencies

* fix(runtime): close Windows profile validation gaps

* chore(architecture): refresh runtime dependency baseline
This commit is contained in:
InfinityPacer
2026-08-29 03:04:07 +08:00
committed by GitHub
parent 92066dfad4
commit 8cd2141b6d
12 changed files with 482 additions and 35 deletions

View File

@@ -7,9 +7,11 @@ on:
paths:
- 'pyproject.toml'
- 'uv.lock'
- 'app/__init__.py'
- 'app/doctor/dependencies.py'
- 'app/foundation/environment.py'
- 'app/runtime/dependencies.py'
- 'scripts/verify_runtime_profile.py'
- 'docker/Dockerfile'
- 'docker/**'
- '.github/workflows/dependency-compat.yml'
@@ -19,9 +21,11 @@ on:
paths:
- 'pyproject.toml'
- 'uv.lock'
- 'app/__init__.py'
- 'app/doctor/dependencies.py'
- 'app/foundation/environment.py'
- 'app/runtime/dependencies.py'
- 'scripts/verify_runtime_profile.py'
- 'docker/Dockerfile'
- 'docker/**'
- '.github/workflows/dependency-compat.yml'
@@ -46,26 +50,43 @@ jobs:
- name: Linux x64
runner: ubuntu-24.04
python-version: '3.14'
runtime-group: runtime-standard
expected-profile: standard
expected-system: Linux
expected-machine: x86_64
- name: Linux ARM64
runner: ubuntu-24.04-arm
python-version: '3.14'
runtime-group: runtime-standard
expected-profile: standard
expected-system: Linux
expected-machine: aarch64
- name: macOS Intel
runner: macos-15-intel
python-version: '3.14'
runtime-group: runtime-standard
expected-profile: standard
expected-system: Darwin
expected-machine: x86_64
- name: macOS ARM
runner: macos-15
python-version: '3.14'
runtime-group: runtime-standard
expected-profile: standard
expected-system: Darwin
expected-machine: arm64
- name: Windows x64
runner: windows-2025
python-version: '3.14'
runtime-group: runtime-standard
expected-profile: standard
expected-system: Windows
expected-machine: AMD64
- name: Windows x64 free-threaded
runner: windows-2025
python-version: '3.14t'
runtime-group: runtime-free-threaded
expected-profile: free-threaded
expected-system: Windows
expected-machine: AMD64
@@ -82,22 +103,41 @@ jobs:
pyproject.toml
uv.lock
- name: Install locked runtime dependencies
run: uv sync --locked --inexact --no-dev --python ${{ matrix.python-version }}
- name: Expose PostgreSQL build tools
if: matrix.expected-profile == 'free-threaded'
shell: pwsh
run: |
if (-not $env:PGBIN -or -not (Test-Path -LiteralPath $env:PGBIN -PathType Container)) {
throw 'Windows free-threaded profile requires a valid PGBIN directory'
}
"$env:PGBIN" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Verify environment and core imports
- name: Install locked runtime dependencies
run: >-
uv sync --locked --inexact --no-default-groups
--group ${{ matrix.runtime-group }}
--python ${{ matrix.python-version }}
- name: Verify runtime profile
env:
AUTO_UPDATE_RESOURCE: 'false'
EXPECTED_SYSTEM: ${{ matrix.expected-system }}
EXPECTED_MACHINE: ${{ matrix.expected-machine }}
EXPECTED_PROFILE: ${{ matrix.expected-profile }}
CONFIG_DIR: ${{ runner.temp }}/moviepilot-runtime-smoke
MOVIEPILOT_SAFE_MODE: 'true'
SUPERUSER_PASSWORD: moviepilot-ci-only
run: >-
uv run --locked --no-sync python -c
"import os, platform;
assert platform.system() == os.environ['EXPECTED_SYSTEM'], (platform.system(), os.environ['EXPECTED_SYSTEM']);
assert platform.machine() == os.environ['EXPECTED_MACHINE'], (platform.machine(), os.environ['EXPECTED_MACHINE']);
import alembic, fastapi, pydantic, pydantic_settings, sqlalchemy, starlette, uvicorn"
uv run --locked --no-sync python -m scripts.verify_runtime_profile
--expected-profile ${{ matrix.expected-profile }}
--expected-system ${{ matrix.expected-system }}
--expected-machine ${{ matrix.expected-machine }}
- name: Verify locked project consistency
run: uv sync --locked --offline --inexact --no-dev --check --python ${{ matrix.python-version }}
run: >-
uv sync --locked --offline --inexact --no-default-groups
--group ${{ matrix.runtime-group }}
--check --python ${{ matrix.python-version }}
docker-dependencies:
name: Docker dependencies / ${{ matrix.platform }}