Fix Python 3.10 compatibility (StrEnum requires 3.11)

enum.StrEnum was added in Python 3.11, but the documented minimum is
  3.10. Add a compatibility shim in backend/app/core/compat.py that falls
  back to (str, Enum) on older versions. Updated all 5 import sites and
  lowered pyproject.toml target-version to py310.
This commit is contained in:
maziggy
2026-03-05 10:44:24 +01:00
parent aa39f6c866
commit 0faf03ecb3
9 changed files with 25 additions and 8 deletions
+1 -1
View File
@@ -242,7 +242,7 @@ detect_python() {
minor=$(echo "$version" | cut -d'.' -f2)
if [[ "$major" -lt 3 ]] || { [[ "$major" -eq 3 ]] && [[ "$minor" -lt 10 ]]; }; then
log_warn "Python $version found, but 3.10+ is required"
log_warn "Python $version found, but 3.10 or newer is required"
return 1
fi