python-lsp / pylsp-mypy

Mypy plugin for the Python LSP Server.
MIT License
129 stars 37 forks source link

Clean up dmypy daemon created in test. #64

Closed tjni closed 1 year ago

tjni commented 1 year ago

There is a sequence of events:

  1. When using dmypy, a daemon process is forked.
  2. When test_dmypy_status_file runs (and dmypy is not in PATH), this daemon is started from the test process.
  3. When pytest is run and completes, there is a dangling pytest process which is running the daemon.
  4. When pytest is run by the nix package manager, I observe the package manager waiting forever for this dangling process to complete.

This commit does a best effort cleanup of the dmypy daemon before the test is completed.

Richardk2n commented 1 year ago

Sorry, forgot about this.

Richardk2n commented 1 year ago

Not sure why 3.7 does not work, but given mypy just dropped support for 3.7, we will as well.

tjni commented 1 year ago

No apology needed. I tried reproducing the failure on Python 3.7 (granted, on macOS) and couldn't, so I am also not sure what happened during that run. Since we are dropping Python 3.7 support, I'll let it be for now. Thank you!