File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ FSM-driven execution · OpenAI-compatible · built for daily use and easy custom
77
88[ ![ CI] ( https://github.com/beacoder/python-agent-harness/actions/workflows/ci.yml/badge.svg )] ( https://github.com/beacoder/python-agent-harness/actions/workflows/ci.yml )
99[ ![ PyPI] ( https://img.shields.io/pypi/v/python-agent-harness.svg )] ( https://pypi.org/project/python-agent-harness/ )
10- [ ![ Python] ( https://img.shields.io/badge/python-3.11 %2B-blue )] ( https://www.python.org/downloads/ )
10+ [ ![ Python] ( https://img.shields.io/badge/python-3.10 %2B-blue )] ( https://www.python.org/downloads/ )
1111[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-green.svg )] ( LICENSE )
1212
1313</div >
@@ -225,7 +225,7 @@ python_agent_harness/
225225
226226## Development
227227
228- Requires Python ≥ 3.11 . CI runs against Python 3.11, 3.12, and 3.13.
228+ Requires Python ≥ 3.10 . CI runs against Python 3.10, 3.11, 3.12, and 3.13.
229229
230230``` sh
231231make test # unit tests
Original file line number Diff line number Diff line change 2323from __future__ import annotations
2424
2525import asyncio
26+ import concurrent .futures
2627import contextlib
2728import threading
2829import time
@@ -102,7 +103,10 @@ def run(
102103 while True :
103104 try :
104105 exc = future .exception (timeout = 0.1 )
105- except TimeoutError :
106+ # concurrent.futures.TimeoutError is the builtin TimeoutError on
107+ # 3.11+ but a distinct class on 3.10 — catch the futures one so
108+ # the poll-timeout branch works on every supported Python.
109+ except concurrent .futures .TimeoutError :
106110 # future still running: enforce deadline / cancellation
107111 if deadline is not None and time .monotonic () >= deadline :
108112 future .cancel ()
You can’t perform that action at this time.
0 commit comments