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

Test absence of "The Python extension will have limited support for 2.7" notification #17478

Closed
3 tasks done
kimadeline opened this issue Sep 21, 2021 · 4 comments
Closed
3 tasks done
Labels
testplan-item Test plan item/assignments for upcoming release

Comments

@kimadeline
Copy link

kimadeline commented Sep 21, 2021

Refs: #17451

Complexity: 2

Create Issue


Context: We need to test that the notification introduced in #17009 doesn't appear anymore.

Requirements

  1. You will need two versions of python for this, Python 3 (doesn't matter which one), and Python 2.7. Options are:
    • You can install them both from python.org
    • On Mac/Linux, you can install one version of python using your local package manager, and use pyenv to install the other one
    • You can also go for a full pyenv solution on Mac/Linux or pyenv-win on Windows and call pyenv install 3.9.4 2.7.16 to get the two versions.
  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: Python 2.7 on load

  1. Create a folder with a Python file
  2. In this folder, create a virtual environment with python 2.7: path/to/python2 -m virtualenv .venv
  3. Open the folder in VS Code
  4. Make sure that the extension loads, and that the virtual environment gets auto-selected
  5. Make sure that the following notification does NOT appear:
    image

Scenario 2: Python 3 on load -> Python 2

  1. Create a folder with a Python file
  2. In this folder, create a virtual environment with python 3: path/to/python3 -m venv .venv
  3. Open the folder in VS Code
  4. Make sure that the extension loads, and that the virtual environment gets auto-selected
  5. Make sure that the notification above does NOT appear
  6. Click on the environment in the status bar, and then select a 2.7 interpreter in the quickpick that appears (search for 2.7)
  7. Make sure that the notification does NOT appear
@kimadeline kimadeline added triage-needed Needs assignment to the proper sub-team testplan-item Test plan item/assignments for upcoming release and removed triage-needed Needs assignment to the proper sub-team labels Sep 21, 2021
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 21, 2021
@kimadeline kimadeline removed the triage-needed Needs assignment to the proper sub-team label Sep 21, 2021
@ziebam
Copy link

ziebam commented Sep 21, 2021

Hi! I'm not sure if that issues is meant for external contributors as well, but if it's not, please kindly ignore this comment. 😃

I've tested both scenarios on Windows 10 per the provided instructions and the notification DIDN'T appear, so that seems to work correctly in my case. I only noticed two behaviors that are probably intended, but it won't hurt to mention them just in case.

  1. The correct interpreter got auto-selected only if I manually opened the folder via the VSCode's toolbar (File -> Open folder...) or the associated shortcut. Opening the folder with code . in the root directory stuck to my system's default, global interpreter regardless of the venvs.
  2. I've had a different notification when using Python 2 or switching from Python 3 to 2, but it's probably unrelated to this issue.
    image

Environment data:

  • VS Code version: 1.60.1
  • Extension version: v2021.10.1255769080-dev
  • OS and version: Windows 10 64-bit 10.0.19043 Build 19043

@kimadeline
Copy link
Author

Hi @ziebam, thank you for reaching out!

This is primarily not meant for external contributors, but instead for the VS Code team to verify issues as a final pass before release (wiki). Glad to hear it works for you nonetheless 🙂

As for the 2 points you raised:

  1. The extension won't activate unless there's a Python file open in the editor, so if running code . did not open any Python files when the folder was opened, that's expected. If not, please file a separate issue so we can investigate it, as it is not related to this one.
  2. That is expected behavior, we are introducing a different notification as part of Remove Jedi 0.17 and ancillary projects #17225, which will be tested in a separate test plan.

@IanMatthewHuff
Copy link
Member

Both scenarios looked good and didn't show a notification.

@IanMatthewHuff IanMatthewHuff removed their assignment Sep 28, 2021
@rzhao271 rzhao271 removed their assignment Sep 28, 2021
@rzhao271
Copy link

LGTM. My system install for Python 2 couldn't get virtualenv for some reason, but pyenv-win got things working.

@joaomoreno joaomoreno removed their assignment Sep 29, 2021
@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.
Labels
testplan-item Test plan item/assignments for upcoming release
Projects
None yet
Development

No branches or pull requests

7 participants