Skip to content

Improve default interpreter path suggestion in quickpick UI #16971

Closed

Description

  • Move "star" icon next to the suggested interpreter in quickpick list instead of showing it as a new entry
  • Show default Interpreter path suggestion only if user has set python.defaultInterpreterPath entry
  • In the above case show default Interpreter path entry at the top of the list instead, but below "Enter interpreter path" suggestion. Make it the active entry.

https://github.com/microsoft/vscode-python-internalbacklog/issues/277

Activity

  1. kimadeline commented on Aug 20, 2021

    @kimadeline

    ### Verification steps:

    1. Make sure you have "python.experiments.optInto": ["All"], in your user settings. If not, add it and reload.
    2. Create 2 workspaces with Python files in it, and create a virtual environment in one of them (python -m venv .venv). Let's name them with and without

    #### 1. python .defaultInterpreterPath not set, no virtual environment

    1. Make sure that the python.defaultIntepreterPath entries in your user and workspace settings are at their default value python
    2. Open the without workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left:
    image
    3. Make sure that the interpreter that is currently highlighted in the quickpick is the same as the one that is currently selected (same path being shown in Current: ....), that the entry label starts with star ⭐️ , and that its description says "Recommended"
    4. Make sure that there is no "Use Python from python.defaultInterpreterPath setting" entry

    #### 2. python.defaultInterpreterPath set, no virtual environment

    1. Set one of the python.defaultIntepreterPath entries in your user and workspace settings to a valid Python interpreter path that is not python (for example /usr/local/bin/python3)
    2. Open the without workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left
    2. Make sure that the interpreter currently selected has the same path as what's in python.defaultInterpreterPath
    2. Make sure there is a "Use Python from python.defaultInterpreterPath setting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")

    #### 3. python.defaultInterpreterPath not set, with virtual environment

    1. Make sure the python.defaultIntepreterPath entry in your user and workspace settings are at their default value python
    2. Open the with workspace, wait for the extension to load
    3. Make sure that the interpreter in the status bar on the bottom left is the .venv virtual environment you created above, and then click it
    3. Make sure that the interpreter that is currently highlighted in the quickpick is the .venv one, that the entry should be the second one from the top, that its label starts with a star ⭐️, and that its description says "Recommended"
    3. Make sure that there are no duplicate entries with the same interpreter path
    4. Make sure that there is no "Use Python from python.defaultInterpreterPath setting" entry

    #### 4. python.defaultInterpreterPath set, with virtual environment

    1. Set one of the python.defaultIntepreterPath entries in your user and workspace settings to a valid Python interpreter path that is not python (for example /usr/local/bin/python3)
    2. Open the with workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left
    2. Make sure that the interpreter currently selected has the same path as what's in python.defaultInterpreterPath
    2. Make sure there is a "Use Python from python.defaultInterpreterPath setting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")
    3. Make sure that the third entry is the .venv environment, that its label starts with a star ⭐️, and that its description says "Recommended"

  2. karthiknadig commented on Aug 20, 2021

    @karthiknadig
    MemberAuthor

    Kim-Adeline Miguel (@kimadeline) This looks like it has enough steps to be a test plan item on its own. I had to turn one of mine to test-plan item as well.

  3. kimadeline commented on Aug 20, 2021

    @kimadeline

    Sounds good, I'll move it to a test plan. Thanks!

  4. locked as resolved and limited conversation to collaborators on Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionalityon-testplanAdded to test plan

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions