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

Doesn't recognize new Py 3.10 match statement #17745

Closed
YSCohen opened this issue Oct 14, 2021 · 3 comments
Closed

Doesn't recognize new Py 3.10 match statement #17745

YSCohen opened this issue Oct 14, 2021 · 3 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@YSCohen
Copy link

YSCohen commented Oct 14, 2021

Environment data

  • VS Code version: 1.61.0
  • Extension version (available under the Extensions sidebar): 2021.10.1336267007
  • OS and version: Windows 10 Home 21H1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Jedi

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

Intellisense and regular function for new Python 3.10 features

Actual behaviour

Gives red squiggly lines (error lines or whatever they're called) under new features
image

Steps to reproduce:

  1. Enter the following Code into a .py file and wait for the Python extension to analyze(?) it

match x:
    case 1:
        print('1')
    case 2:
        print('2')
    case _:
        print('not one or two')

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

User belongs to experiment group 'pythonaa'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'pythonSurveyNotificationcf'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'pythonDeprecatePythonPath'
User belongs to experiment group 'pythonSortEnvs'
User belongs to experiment group 'pythonRunFailedTestsButtonDisplayed'
User belongs to experiment group 'pythonRefreshTestsButtonDisplayed'
User belongs to experiment group 'pythonRememberDebugConfig'
> conda info --json
> ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1336267007\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python39\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1336267007\pythonFiles\interpreterInfo.py
Python interpreter path: ~\AppData\Local\Programs\Python\Python310\python.exe
Starting Jedi language server.
> conda --version

@YSCohen YSCohen added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Oct 14, 2021
@brettcannon
Copy link
Member

Unfortunately Jedi (and it's underlying parser, parso) has not added support for the match statement yet. Please consider switching your language server to "Default"/"Pylance" as our Pylance language server already has support.

@brettcannon
Copy link
Member

As soon as Jedi makes a new release with match statement support we will take the update, but otherwise this is out of our hands. Since we have a language server that has support I'm a closing this issue.

@YSCohen
Copy link
Author

YSCohen commented Oct 15, 2021

Unfortunately Jedi (and it's underlying parser, parso) has not added support for the match statement yet. Please consider switching your language server to "Default"/"Pylance" as our Pylance language server already has support.

Thank you!

@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Oct 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants