feat!: adopt Python 3.15 and support BattlesnakeArena

- Require Python 3.15 in project metadata, runtime pin, and Docker stages.
- Use lazy imports for database backends and type-only dependencies.
- Defer benchmark dependencies until their code paths are used.
- Rely on deferred annotations and use Path.info for file discovery.
- Accept BattlesnakeArena alongside BattlesnakeEngine on game endpoints.
- Advance quart_common for Python 3.15 and multi-agent validation.
- Add pytest development dependencies and refresh the uv lockfile.
- Test lazy backend loading, import order, and fresh file discovery.
- Document the runtime requirements and locked uv workflow.

BREAKING CHANGE: Python 3.15 or newer is required; earlier runtimes cannot parse the lazy import syntax.
This commit is contained in:
2026-11-03 10:02:40 +01:00
parent f14d780f29
commit 5efab77248
35 changed files with 226 additions and 202 deletions
+3 -6
View File
@@ -1,10 +1,7 @@
#!/usr/bin/env python3
from __future__ import annotations
import argparse
from pathlib import Path
from typing import Iterable
from collections.abc import Iterable
from urllib.parse import urlencode
from urllib.request import urlopen
import shutil
@@ -84,14 +81,14 @@ def prune_output(output_root:Path, wanted_files:set[Path]) -> int:
return 0
for file_path in output_root.rglob("*"):
if not file_path.is_file():
if not file_path.info.is_file():
continue
if file_path not in wanted_files:
file_path.unlink()
removed += 1
for directory in sorted(
(p for p in output_root.rglob("*") if p.is_dir()), reverse=True
(p for p in output_root.rglob("*") if p.info.is_dir()), reverse=True
):
if any(directory.iterdir()):
continue