Skip to content
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

Pylance integration #5210

Closed
qubitron opened this issue Apr 3, 2019 · 25 comments
Closed

Pylance integration #5210

qubitron opened this issue Apr 3, 2019 · 25 comments
Labels

Comments

@qubitron
Copy link

qubitron commented Apr 3, 2019

Replace the old out-of-proc custom analyzer with LSP compliant Pylance language server that is now available in preview for VS Code.

Replace the old custom implementation of editor functionality like IntelliSense, Find All References, Goto Definition, Outlining, Refactor Rename, etc with the Visual Studio "Language Client" implementation, which is a reusable adapter that implements those features for LSP compliant language servers.

@huguesv
Copy link
Contributor

huguesv commented Sep 23, 2019

These requests were all implemented in the old analyzer, which can be found in the ptvs branch of language server repo.

https://github.com/microsoft/python-language-server/blob/ptvs/src/PTVS/Microsoft.PythonTools.Analyzer/Impl/Intellisense/OutOfProcProjectAnalyzer.cs#L122

@MikhailArkhipov
Copy link

MikhailArkhipov commented Oct 8, 2019

microsoft/python-language-server#10 is now closed. LS will not be implementing document or selection formatting.

Since 90% of the code is actually managing UI - formatter selection and installation + packaging, there is very little to do in the LS. VS Code extension already implements formatting with formatter selection and we suggest PTVS should be doing something similar. The remaining code is basically save file to temp, call formatter, read the result back.

@huguesv huguesv changed the title Move IntelliSense to Language Server Protocol EPIC LSC: Move to Language Server Client Oct 10, 2019
@grossag
Copy link

grossag commented Feb 18, 2020

I saw a Visual Studio bug (Microsoft.PythonTools.Analyzer.Exe pegging one CPU) link to this epic and say that it won't be resolved until this epic is implements; is that true?

That issue is causing my fan to run overnight every night if I forget to close Visual Studio and I'm trying to figure out whether I should file another bug with Visual Studio or whether this is indeed tracking it.

@zhouwangyang
Copy link
Contributor

@grossag
Copy link

grossag commented Apr 23, 2020

Is this issue the blocker to fixing the issue causing Microsoft.PythonTools.Analyzer.exe to peg a CPU? Despite all Visual Studio instances being closed, last night I had 4 instances of this process still running, each pegging 1 CPU.

@mat100payette
Copy link

What's the current state of this ?

@breathe67
Copy link

breathe67 commented May 27, 2020

I got here looking for a solution to my slow, less than responsive editing using Visual Studio 2019's Python editor. I'm also running a fairly powerful machine. Is this still a known issue ?

@huguesv
Copy link
Contributor

huguesv commented May 28, 2020

Yes, we're still working on this.

@huguesv
Copy link
Contributor

huguesv commented Jun 30, 2020

We've just released a preview of Pylance, our new Python language server. It is now available for VS Code.
https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/

Our team's focus for the past 6 months has been on releasing Pylance for VS Code. Now that we've reached this milestone, we'll have more cycles to resume the language server client / language server integration work (using Pylance in VS).

@warrenbocphet
Copy link

Can you guys notify me when there will be a solution for Visual Studio 2019? Currently, there is a memory leak with my Python background analyzer. See the link below for photo (imgur).

I quite enjoy MSVS, but since the project I'm working on has 90% of them being Python, I can't possibly use it.

memory_leak

@huguesv huguesv changed the title EPIC LSC: Move to Language Server Client Pylance integration Jul 17, 2020
@bschnurr
Copy link
Member

bschnurr commented Aug 7, 2020

This will also add python 3.8 support

@soroshsabz
Copy link

This will also add python 3.8 support

Thanks for it, this feature is very useful and python 3.8 features are necessary for modern enterprise projects

@ferdnyc
Copy link

ferdnyc commented Aug 10, 2020

I mean, it sounds like the new language server was written for both products, but it was built and integrated first on VS Code because... well, I'm sure we can all easily imagine 100 reasons that would be easier than going in the other direction, and building it first into VS itself.

@huguesv :

Now that we've reached this milestone, we'll have more cycles to resume the language server client / language server integration work (using Pylance in VS).

Now that Pylance exists (which was presumably a prerequisite for complete Python 3.8 support in either IDE), it can be used in VS as well. Yeah, that means VS Code "gets it first", but I'm not sure "VS was neglected for VS Code" is the right take there.

If they had gone in and built Pylance for-and-in the towering monolith that is VS, we could be hearing a release date of 2023. ¯\_(ツ)_/¯ (Of course, I'm assuming it won't still be 2023 before Pylance comes to VS.)

@axelande
Copy link

axelande commented Nov 6, 2020

Any date set for when this will be available for VS 2019 Community edition? @huguesv Is there any news when the integration to VS might occur?

@aw2003
Copy link

aw2003 commented Nov 17, 2020

Wow. I guess debugging native binary interfaces between python and a C interface DLL is going to have to be done in VSCode, and I'll just have to divine what's going on under the python. When will you actually get VS into some kind of usable shape? VS2017 current version is utterly, utterly unusable - I mean it's just dead in the water - type something, look at the screen for 10s, then it types a couple of characters...

Hope Pylance can get into VS releases sometime in the near future. I do have VS2019 professional available as well.

@huguesv huguesv removed their assignment Dec 9, 2020
@BrunoBlanes
Copy link

Our team's focus for the past 6 months has been on releasing Pylance for VS Code. Now that we've reached this milestone, we'll have more cycles to resume the language server client / language server integration work (using Pylance in VS).

Hey @huguesv, it's been eight months, Python 3.9.1 is now the current version, 3.10 is in alpha stage and we are still stuck at 3.7. Could you update us on this, please?

@soroshsabz
Copy link

related to #6496

@aw2003
Copy link

aw2003 commented Apr 26, 2021

@BrunoBlanes - seeing as @huguesv has removed his assignment from this, I'm guessing this fallen right to the bottom of the pile, as currently nobody is assigned to look at it.

I guess Visual Studio is no longer the place to attempt to debug Python / native interactions. I did find a workaround: If VS is configured with paths to python pdbs, I can attach to python running inside VS Code and breakpoints in native code will be hit. Have the right project loaded for the binaries, and all is well... but that's just so... clunky.

@savannahostrowski
Copy link

Our team is currently working on shipping improved IntelliSense via Pylance in VS 2022. The next version of Visual Studio will also add support for Python 3.5 and above. Stay tuned 😊!

@BrunoBlanes
Copy link

Honestly after I started using VSCode with Pylance for Python development I really don't mind the fact that VStudio doesn't support it anymore. I won't change my main IDE from VStudio to VSCode, but for scripting VStudio is a bit overkill, so I am okay with it the way it is for now.

@soroshsabz
Copy link

@savannahostrowski But I think Visual Studio 2019 need attention too.

@AgribotGit
Copy link

I am also experiencing bad problems trying to de-bug python code because of this Intellisense / Visual studio 2019 defect.
I'm using a recent version of VS 2019, Version 16.9.5. I ask that this be prioritised and resolved ASAP

@alexolog
Copy link

Our team is currently working on shipping improved IntelliSense via Pylance in VS 2022.

What about VS2019? When will it get real support for current versions of Python.

The next version of Visual Studio will also add support for Python 3.5 and above. Stay tuned 😊!

I really hope you meant 3.9 (hopefully 3.10)

@greazer greazer closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests