mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
Comprehensive async fix for all shell/process handling modules: - command_executor.py: Made _get_shell_by_type, _get_system_shell, _get_interpreter_path async with asyncio.to_thread for shutil.which. Temp file creation/cleanup now uses aiofiles.os. - logs.py: Added aiofiles for async file reads. Path.exists(), stat(), glob() wrapped in asyncio.to_thread(). Batch async stat operations with asyncio.gather(). - processes.py: Changed cpu_percent(interval=0.1) to interval=None to avoid 100ms blocking per process. Wrapped sync psutil operations in asyncio.to_thread(). - streaming_command.py: Replaced subprocess.run with async subprocess in tail(). stream_to_file now uses aiofiles. All file I/O operations made async throughout. - Legacy modules (run_background.py, npx_background.py, uvx_background.py): Added deprecation warnings pointing to new async implementations in base_process.py and tool-specific modules. Version bump to 0.9.17.