Skip to content

Test: Native python discovery #23675

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
4 tasks done
karthiknadig opened this issue Jun 24, 2024 · 3 comments
Closed
4 tasks done

Test: Native python discovery #23675

karthiknadig opened this issue Jun 24, 2024 · 3 comments

Comments

@karthiknadig
Copy link
Member

karthiknadig commented Jun 24, 2024

Refs: #23564

Complexity: 3

Create Issue


We switched to platform specific VSIX starting with this release. This test is to ensure that the native code that we have start up.

Requirements

  1. Latest version of python extension pre-release

Verification steps:

  1. Open a python file and ensure that python extension is loaded (basically see the Output > Python Locator logs show up)
    image

  2. Verify there are entries like [info] Discovered env: /Users/donjayamanne/.pyenv/versions/3.10.13/bin/python in the logs

  3. Ensure there are no entries like Environment ... is missing from native locator
    If there are any, please find all such occurrences and paste them into an issue.

Note: In some cases virtual envs from other workspace folders (not opened) will get reported above
Such cases are false positive, however we can identify that in the issue.

@amunger
Copy link

amunger commented Jun 25, 2024

I don't specifically see any [info] Discovered env: logs

but there is a version mismatch logged:

2024-06-25 07:26:48.993 [info] Environments refresh finished (event): 8817 milliseconds
2024-06-25 07:26:49.053 [info] Searching for windows registry interpreters
2024-06-25 07:26:49.057 [info] Environment refresh took 8884 milliseconds
2024-06-25 07:26:49.068 [error] Environment C:\src\test\3\.venv\Scripts\python.exe got the wrong version from native locator (Native = 3.11.1, Actual 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)])

@karthiknadig
Copy link
Member Author

The discovered envs should be in Output > Python Locator .

@amunger amunger removed their assignment Jun 25, 2024
@rebornix
Copy link
Member

rebornix commented Jun 25, 2024

It works great on my macbook m3 max, here is its perf data

2024-06-25 09:48:51.774 [info] Started Refreshing Environments
2024-06-25 09:48:51.782 [info] Discovered env: /usr/local/bin/python3
2024-06-25 09:48:51.782 [info] Discovered env: /opt/homebrew/bin/python3
2024-06-25 09:48:51.782 [info] Discovered env: /opt/homebrew/bin/python3.11
2024-06-25 09:48:51.817 [info] Discovered env: /usr/bin/python3
2024-06-25 09:48:51.927 [info] Discovered env: /Users/penlv/Code/Test/notebook-test-data/.venv/bin/python
2024-06-25 09:48:52.287 [info] Locator PipEnv took 625ns
2024-06-25 09:48:52.329 [info] Locator Poetry took 278.709µs
2024-06-25 09:48:52.333 [info] Locator MacPythonOrg took 8.900458ms
2024-06-25 09:48:52.336 [info] Locator Venv took 458ns
2024-06-25 09:48:52.379 [info] Locator Homebrew took 50.254208ms
2024-06-25 09:48:52.393 [info] Locator PyEnv took 123.221291ms
2024-06-25 09:48:52.499 [info] Locator MacCmdLineTools took 71.411916ms
2024-06-25 09:48:52.516 [info] Locator MacXCode took 250ns
2024-06-25 09:48:52.630 [info] Locator Conda took 151.951792ms
2024-06-25 09:48:52.742 [info] Locator VirtualEnv took 209ns
2024-06-25 09:48:52.757 [info] Locator VirtualEnvWrapper took 166ns
2024-06-25 09:48:52.767 [info] Environments found using locators in 152.101333ms
2024-06-25 09:48:52.772 [info] Environments in PATH found in 353.630875ms
2024-06-25 09:48:52.787 [info] Environments in global virtual env paths found in 109.583µs
2024-06-25 09:48:52.789 [info] Environments in custom search paths found in 214.02275ms

It's fun to see µs, ns and ms. Good work!

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

4 participants