Require Python 3.12 for workflow automation
This commit is contained in:
@@ -6,7 +6,9 @@ archive workflow. Planning lives in `INTEGRATED_PIPELINE_CONCEPT.md` and
|
||||
|
||||
## Agent workflow helper
|
||||
|
||||
Requirements: Python 3.11+, Git, and an authenticated `tea` login named `domverse`.
|
||||
Requirements: Python 3.12+, Git, and an authenticated `tea` login named `domverse`.
|
||||
`scripts/python` prefers Conda base when it satisfies this version, otherwise it uses
|
||||
an installed Python 3.12+ interpreter.
|
||||
|
||||
```bash
|
||||
scripts/work-item next
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "photoanalyzer"
|
||||
version = "0.1.0"
|
||||
requires-python = ">=3.11"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
for python in python3.13 python3.12 python3.11; do
|
||||
if command -v conda >/dev/null 2>&1; then
|
||||
conda_version=$(conda run -n base python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")' 2>/dev/null || true)
|
||||
case "$conda_version" in
|
||||
3.1[2-9]|3.[2-9][0-9]) exec conda run --no-capture-output -n base python "$@" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for python in python3.13 python3.12; do
|
||||
if command -v "$python" >/dev/null 2>&1; then
|
||||
exec "$python" "$@"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "photoanalyzer: Python 3.11 or newer is required" >&2
|
||||
echo "photoanalyzer: Python 3.12 or newer is required" >&2
|
||||
exit 2
|
||||
|
||||
@@ -227,7 +227,7 @@ class InterpreterWrapperTests(unittest.TestCase):
|
||||
)
|
||||
major, minor = eval(result.stdout.strip(), {"__builtins__": {}})
|
||||
self.assertEqual(major, 3)
|
||||
self.assertGreaterEqual(minor, 11)
|
||||
self.assertGreaterEqual(minor, 12)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -14,7 +14,7 @@ from typing import Any, Iterable, Sequence
|
||||
|
||||
try:
|
||||
import tomllib
|
||||
except ModuleNotFoundError: # pragma: no cover - Python < 3.11 is unsupported
|
||||
except ModuleNotFoundError: # pragma: no cover - Python < 3.12 is unsupported
|
||||
tomllib = None
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class Config:
|
||||
@classmethod
|
||||
def load(cls, path: Path) -> "Config":
|
||||
if tomllib is None:
|
||||
raise WorkItemError("Python 3.11 or newer is required")
|
||||
raise WorkItemError("Python 3.12 or newer is required")
|
||||
if not path.is_file():
|
||||
raise WorkItemError(f"Missing workflow configuration: {path}")
|
||||
with path.open("rb") as handle:
|
||||
|
||||
Reference in New Issue
Block a user