You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(harness_manager): support Python 3.9 (closes#27)
Fixes the immediate crash @WhoLsJohnGalt reported: every brew user on
macOS-default Python 3.9 hits
File ".../harness_manager/schema.py", line 190, in <module>
def validate(manifest_path: Path | str) -> dict:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
immediately after `brew install agentic-stack`. PEP 604 union syntax
(`Path | str`) requires Python 3.10+ at runtime; the macOS Command Line
Tools default is still 3.9.
There are 25 such annotations across 8 files in `harness_manager/`. Rather
than rewrite each to `Union[Path, str]` / `Optional[X]`, this commit adds
`from __future__ import annotations` (PEP 563) to each affected file so
all annotations are stored as strings and never evaluated at import time.
Works on Python 3.7+, which covers every macOS-shipped Python in the wild.
Files changed (all `harness_manager/`):
schema.py state.py install.py remove.py post_install.py
manage_tui.py doctor.py status.py
Audited the rest of the repo: no PEP 604 syntax in `.agent/`,
`onboard*.py`, or any other Python touchpoint, so no other module needs
the same treatment.
The reporter's suggested fix (declare `python@3.10` as a brew dep + pin
the binary in install.sh) would also work but pulls in ~150 MB on every
brew install and conflicts with users who manage their own python (pyenv,
asdf). The future-annotations approach is zero-cost and benefits non-brew
users (Linux, manual clone) on system Python 3.9 too.
0 commit comments