fix: #2938 make agents.sandbox.sandboxes importable on Windows#2937
Open
DhanushKenkiri wants to merge 3 commits intoopenai:mainfrom
Open
fix: #2938 make agents.sandbox.sandboxes importable on Windows#2937DhanushKenkiri wants to merge 3 commits intoopenai:mainfrom
agents.sandbox.sandboxes importable on Windows#2937DhanushKenkiri wants to merge 3 commits intoopenai:mainfrom
Conversation
agents.sandbox.sandboxes importable on Windows
agents.sandbox.sandboxes importable on Windowsagents.sandbox.sandboxes importable on Windows
seratch
requested changes
Apr 18, 2026
Member
seratch
left a comment
There was a problem hiding this comment.
Can you resolve the lint errors?
agents.sandbox.sandboxes importable on Windowsagents.sandbox.sandboxes importable on Windows
Author
|
Working on the lint error, the error is due to ruff format --check says it “would reformat” src/agents/sandbox/sandboxes/init.py. Next I’ll install the pinned Ruff version locally, run ruff format on the touched files, commit the formatting-only change, and push so the GitHub Action passes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
import agents.sandbox.sandboxesfails withModuleNotFoundError: fcntlbecause the package eagerly imports the Unix-onlyunix_localbackend (which depends on Unix-only stdlib likefcntl/termios).unix_localimports in src/agents/sandbox/sandboxes/init.py so thesandboxespackage can be imported on Windows even when the Unix backend is unavailable.ImportErrorin src/agents/sandbox/sandboxes/unix_local.py when imported on Windows (clearer than the currentModuleNotFoundError).unix_localis inherently Unix-only; the SDK should stay importable cross-platform and only fail when a platform-incompatible backend is explicitly imported/used.python -m pytest -q tests/sandbox/test_sandboxes_imports.pyFixes #2938