-
Notifications
You must be signed in to change notification settings - Fork 28
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
dmypy
process remains running
#236
Comments
Do let us know if you can find some repro steps. |
@bersbersbers you can use vscode-mypy/bundled/tool/lsp_server.py Lines 442 to 461 in ee85553
Closing VS Code, Re-load Window, or Close Workspace, etc will trigger exit and shutdown messages. If you do setting changes we manually trigger a server restart where we sent shutdown, exit, then start a new instance. All of these have to come to the above two handlers. |
Understood, thanks! It's the first time I am using the Python debugger to attach to something, and am not able to attach the debugger to the process. (I am trying to attach from one VS Code window, with The debugger log file shows somethings like this:
Debug console says
I tried the Python and the Python Debugger, and also attaching to different targets. I also tried mypy from environment (1.7.1) as well as bundled (1.6.1). Anyway, what I did see now is the following in the Mypy type checker output when switching between
After waiting for a while and switching back, it is more successful:
The good think is that this way, I can quickly reproduce the issue without having to restart VS Code. And it is still true that I see this issue when switching I also tried print debugging. When shutdown is successful, I can print everything I want to the output window using def on_shutdown(_params: Optional[Any] = None) -> None:
"""Handle clean up on shutdown."""
log_to_output("on_shutdown")
... |
Final bit for today: I can reproduce the problem even without a large code base, just by having a very simple Python file in C:\Temp and opening that, and then switching between two |
I just quit VSCode and four I had only one workspace open and one process is using system python while the other one is using the one from my virtual environment, and I have the options set to use my environment's |
Oh, looks like I've posted dupe: Very annoying issue nonetheless. |
Disable daemon mode. This happens because the daemon itself sometimes does not handle stop command correctly. |
Sure, but I found better solution for now |
@karthiknadig For the record -- disabling daemon mode does not help, same issue |
Can you provide the process paths and cli for the strangling mypy processes? |
I have observed several times that some
python.exe
process has been left running after I closed VS Code, the command line of which hinted atdmypy
still running.At least once, I have also observed that replacing the current
.venv
hung until I manually killed thesedmypy
process(es). (I did notice that VS Code tried to temporarily change the interpreter when deleting the.venv
first failed, but it did not continue until I killed the process.)VS Code 1.85.0, extension version v2023.6.0, mypy 1.7.1 in a .venv, Python 3.12.1
I will add more details to this issue it happens again.
The text was updated successfully, but these errors were encountered: