From b14be881b97bc7d887bc72bed4b8f53c7e277b5d Mon Sep 17 00:00:00 2001 From: yoniebans Date: Tue, 21 Jul 2026 10:02:28 +0200 Subject: [PATCH] build: declare pywin32 as a direct win32 dependency hermes_cli/windows_ssh_runtime.py imports win32security/win32file/etc. directly but pywin32 only arrived transitively via concurrent-log-handler -> portalocker. Declare it with a sys_platform gate so the Windows SSH runtime doesn't depend on the logging dep chain. Review follow-up on PR #68130. --- pyproject.toml | 4 ++++ uv.lock | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index faf5b6efcf4e..423314878f78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,10 @@ dependencies = [ "python-multipart>=0.0.9,<1", "ptyprocess>=0.7.0,<1; sys_platform != 'win32'", "pywinpty>=2.0.0,<3; sys_platform == 'win32'", + # Desktop SSH's Windows remote runtime (hermes_cli/windows_ssh_runtime.py) + # imports win32security/win32file/etc. directly — declare pywin32 rather than + # relying on the concurrent-log-handler → portalocker transitive chain. + "pywin32>=306,<312; sys_platform == 'win32'", # Image resize recovery for the vision tools. Pillow shrinks oversized images # (>5 MB or >8000px) at embed time; without it the byte AND pixel-dimension # shrink paths no-op, so an oversized image bakes into immutable history and diff --git a/uv.lock b/uv.lock index 59f9d8e2628b..6665ef1a397e 100644 --- a/uv.lock +++ b/uv.lock @@ -1539,6 +1539,7 @@ dependencies = [ { name = "pyjwt", extra = ["crypto"] }, { name = "python-dotenv" }, { name = "python-multipart" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, { name = "pywinpty", marker = "sys_platform == 'win32'" }, { name = "pyyaml" }, { name = "requests" }, @@ -1823,6 +1824,7 @@ requires-dist = [ { name = "python-multipart", marker = "extra == 'web'", specifier = "==0.0.27" }, { name = "python-telegram-bot", extras = ["webhooks"], marker = "extra == 'messaging'", specifier = "==22.6" }, { name = "python-telegram-bot", extras = ["webhooks"], marker = "extra == 'termux'", specifier = "==22.6" }, + { name = "pywin32", marker = "sys_platform == 'win32'", specifier = ">=306,<312" }, { name = "pywinpty", marker = "sys_platform == 'win32'", specifier = ">=2.0.0,<3" }, { name = "pyyaml", specifier = "==6.0.3" }, { name = "qrcode", marker = "extra == 'dingtalk'", specifier = "==7.4.2" },