python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 187 forks source link

Fix progress reporting with autoimport plugin #530

Closed last-partizan closed 3 months ago

last-partizan commented 4 months ago

This is temporary fix, until someone can make proper fix by resolving issue with thread, seems like it just hungs indefinitely instead of reporting progress.

Also, this thread does not exit properly, and pylsp does not exit after editor is closed.

Fixes #529. Refs #374

last-partizan commented 4 months ago

@tkrabel i'm tagging you, maybe you have better idea how to fix this.

Was it working when you tested it?

Right now seems like thread just hangs indefinitely and not exit.

tkrabel commented 4 months ago

@last-partizan thanks for the git bisect and for tagging me. I did a unit an manual test to make sure everything worked, but I might have missed something. Making the progress report single threaded seems to be a good tactical fix. I will investigate how I can solve the issue without losing the non-blocking feature.

ccordoba12 commented 4 months ago

@tkrabel, are you ok with merging this one and release 1.10.1 while you try to find a better solution?

tkrabel commented 4 months ago

@ccordoba12 yes that LGTM

rodda-kyusu commented 3 months ago

Was able to test this PR locally and confirmed that the issue present in https://github.com/python-lsp/python-lsp-server/issues/529 stopped occurring 🙌