mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
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:
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user