New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create socket file in /tmp #5003

Merged
merged 3 commits into from May 4, 2018

Conversation

Projects
None yet
2 participants
@myjian
Contributor

myjian commented May 4, 2018

When the mypy daemon runs in Windows Subsystem for Linux (WSL) under a DriveFs directory, it would fail to bind to the socket file.

From mypy/dmypy_server.py:

sock = socket.socket(socket.AF_UNIX)
sock.bind(self.sockname)  # <-- stuck here
sock.listen(1)

This pull request changes the path to /tmp, so on Windows it will be always created under the VolFs, which provides full support for Linux file system features.

@msullivan

Just moving the socket to /tmp/dmypy.sock means that mypy-daemon can only be run on one codebase at a time per system. We need to generate a temporary directory using tempfile and put it there.

@msullivan msullivan merged commit 211a654 into python:master May 4, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@msullivan

This comment has been minimized.

Collaborator

msullivan commented May 4, 2018

Thanks!

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