Skip to content

Test language servers with Python 2.7 #17541

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

Closed
3 tasks done
kimadeline opened this issue Sep 27, 2021 · 5 comments
Closed
3 tasks done

Test language servers with Python 2.7 #17541

kimadeline opened this issue Sep 27, 2021 · 5 comments

Comments

@kimadeline
Copy link

kimadeline commented Sep 27, 2021

Refs: #17225

Complexity: 3

Create Issue


Requirements

  1. You will need Python 2.7.16. Options are:
    • You can install it from python.org
    • On Mac/Linux, you can install it using your local package manager
    • For a managed solution that will allow you to install multiple versions of Python you can use pyenv on Mac/Linux, or pyenv-win on Windows, and call pyenv install 2.7.16
  2. Install virtualenv with python 2.7: path/to/python2 -m pip install virtualenv
  3. Make sure you have "python.experiments.optInto": ["All"], in your user settings. If not, add it and reload VS Code.
  4. Make sure the python.defaultInterpreterPath entries in your user and workspace settings are at their default value python
  5. Use the latests Insiders build of the Python extension (set python.insidersChannel to daily, wait for the download and installation to happen and reload VS Code)

Scenario 1: Jedi

  1. Create a folder with a Python file, and add the following .vscode/settings.json:
{
   "python.languageServer": "Jedi"
}
  1. Create a Python 2.7 virtual environment in that folder: /path/to/python2 -m virtualenv .venv
  2. Open the folder in VS Code, wait for the extension to load and the virtual environment to get auto-selected
  3. In the Python output panel, verify that Editor support is inactive since language server is set to None. is printed, and that language server capabilities are disabled

Scenario 2: Default

  1. Create a folder with a Python file, and add the following .vscode/settings.json:
{
   "python.languageServer": "Default"
}
  1. Create a Python 2.7 virtual environment in that folder: /path/to/python2 -m virtualenv .venv
  2. Open the folder in VS Code, wait for the extension to load and the virtual environment to get auto-selected
  3. In the Python output panel, verify that Starting Pylance language server. is printed, and that language server capabilities are working

Scenario 3: Pylance

  1. Create a folder with a Python file, and add the following .vscode/settings.json:
{
   "python.languageServer": "Pylance"
}
  1. Create a Python 2.7 virtual environment in that folder: /path/to/python2 -m virtualenv .venv
  2. Open the folder in VS Code, wait for the extension to load and the virtual environment to get auto-selected
  3. In the Python output panel, verify that Starting Pylance language server. is printed, and that language server capabilities are working
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 27, 2021
@kimadeline kimadeline removed the triage-needed Needs assignment to the proper sub-team label Sep 27, 2021
@ghost ghost assigned mjbvz, brettcannon and isidorn Sep 28, 2021
@isidorn
Copy link

isidorn commented Sep 28, 2021

I do not have Python setup on my Linux, thus I have swapped platform assignments with @mjbvz . I hope that is fine.

@miguelsolorio
Copy link

  • Scenario 1: Jedi
  • Scenario 2: Default
  • Scenario 3: Pylance

These were all pretty straight forward with no issues, let me know if you need any additional/thorough testing

@brettcannon
Copy link
Member

@isidorn if you need help setting Python up then please let me or anyone on the team know and we can help you out.

@isidorn
Copy link

isidorn commented Sep 28, 2021

@brettcannon thanks for the offer, I already have it setup on my Mac and works nicely.

@brettcannon
Copy link
Member

@mjbvz I took you off as I accidentally verified under Linux out of habit from launching VS Code under WSL. 😄 I also went ahead and verified under Windows as well.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants