Skip to content

Importing nexus fails on Windows: agent_detect.py imports fcntl at module level #10

Closed

Description

@simin-yuan

On Windows, importing the package fails: src/nexus_memory/agent_detect.py imports fcntl at module level, and fcntl only exists on POSIX. The autouse fixture in tests/conftest.py imports it for every test, so on Windows the suite stops at collection: 2312 errors, 0 passed on main (GitHub Actions, windows-latest).

I mentioned this when reporting the issue fixed in 69dbac8. A fix follows in a pull request.

Fix: #11

Activity

  1. Neboy72 commented on Nov 1, 2026

    @Neboy72
    Owner

    Fixed and shipped. agent_detect.py (and fuel_chain.py, same pattern) now import fcntl inside a try/except ImportError, so the module loads on Windows with fcntl = None and the lock falls back to msvcrt.locking. The Windows job of the suite is green: 2497 passed, 49 skipped, 0 failed (run 41315197565). The fix is part of v0.22.44, released today: https://github.com/Neboy72/nexus-memory/releases/tag/v0.22.44

    Thank you for the report, it was the first one that made the whole Windows picture visible.

  2. simin-yuan commented on Nov 1, 2026

    @simin-yuan
    ContributorAuthor

    Thanks, Nebojsa. Confirmed on Windows with v0.22.44: the package imports cleanly, and the agent_detect and guardrails tests pass (80 passed, 2 skipped). While running the suite on Python 3.13 I hit one small thing: a test module fails to collect there because it imports os through pathlib; #14 fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions