diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7871e346..0a973ff0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,7 +160,7 @@ jobs: # tractor` must succeed everywhere, and `HAS_UDS` reflects # platform capability (False on Windows, True on POSIX). - name: 'Smoke: import tractor' - run: uv run python -c "import tractor; from tractor.ipc._uds import HAS_UDS; print('import tractor OK | HAS_UDS=', HAS_UDS)" + run: uv run python -c "import sys; import tractor; from tractor.ipc._uds import HAS_UDS; assert sys.platform != 'win32' or not HAS_UDS; print('import tractor OK | HAS_UDS=', HAS_UDS)" - name: Run tests run: > diff --git a/tractor/ipc/_uds.py b/tractor/ipc/_uds.py index 3d5a3c8e..262cc2e1 100644 --- a/tractor/ipc/_uds.py +++ b/tractor/ipc/_uds.py @@ -115,10 +115,12 @@ _SUN_PATH_LIMIT: int = ( # single source of truth for "is the UDS backend usable on this -# host?" — reuse `trio`'s `has_unix` (the same predicate that gates -# `trio.open_unix_socket()`) rather than re-deriving an `AF_UNIX` -# probe in every consumer module. -HAS_UDS: bool = has_unix +# host?" Windows can expose `AF_UNIX`, but this backend remains +# POSIX-only until its credential and lifecycle paths are supported. +HAS_UDS: bool = ( + sys.platform != 'win32' + and has_unix +) def unwrap_sockpath(