fix: require Python 3.10+ and add version check

The codebase uses Python 3.10+ type hint syntax (e.g., `str | list[str]`)
which causes TypeError on Python 3.9 and earlier.

Changes:
- Update README.md to document Python 3.10+ requirement
- Add runtime version check in run.py and spec_runner.py
- Provides clear error message with upgrade instructions

Fixes #5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
AndyMik90
2025-12-18 23:00:42 +01:00
parent 63a1d3c138
commit 9a5ca8c78f
3 changed files with 23 additions and 3 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ The Desktop UI is the recommended way to use Auto Claude. It provides visual tas
### Prerequisites
1. **Node.js 18+** - [Download Node.js](https://nodejs.org/)
2. **Python 3.9+** - [Download Python](https://www.python.org/downloads/)
2. **Python 3.10+** - [Download Python](https://www.python.org/downloads/)
3. **Docker Desktop** - Required for the Memory Layer
4. **Claude Code CLI** - `npm install -g @anthropic-ai/claude-code`
5. **Claude Subscription** - Requires [Claude Pro or Max](https://claude.ai/upgrade) for Claude Code access
+11 -1
View File
@@ -28,9 +28,19 @@ Prerequisites:
- Claude Code CLI installed
"""
import io
import sys
# Python version check - must be before any imports using 3.10+ syntax
if sys.version_info < (3, 10):
sys.exit(
f"Error: Auto Claude requires Python 3.10 or higher.\n"
f"You are running Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}\n"
f"\n"
f"Please upgrade Python: https://www.python.org/downloads/"
)
import io
# Configure safe encoding on Windows BEFORE any imports that might print
# This handles both TTY and piped output (e.g., from Electron)
if sys.platform == "win32":
+11 -1
View File
@@ -33,10 +33,20 @@ Usage:
python auto-claude/spec_runner.py --task "Simple fix" --no-ai-assessment
"""
import sys
# Python version check - must be before any imports using 3.10+ syntax
if sys.version_info < (3, 10):
sys.exit(
f"Error: Auto Claude requires Python 3.10 or higher.\n"
f"You are running Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}\n"
f"\n"
f"Please upgrade Python: https://www.python.org/downloads/"
)
import asyncio
import io
import os
import sys
from pathlib import Path
# Configure safe encoding on Windows BEFORE any imports that might print