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

Consider not showing venvs from other directories #11779

Closed
IanMatthewHuff opened this issue Oct 25, 2022 · 8 comments · Fixed by #11807
Closed

Consider not showing venvs from other directories #11779

IanMatthewHuff opened this issue Oct 25, 2022 · 8 comments · Fixed by #11807
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug upstream-python Blocked on upstream Python Ext verified Verification succeeded
Milestone

Comments

@IanMatthewHuff
Copy link
Member

Testing #11755

I think this work would actually fall on me on the Controller level (so I don't expect you to have to do this), but putting this item here for consideration since the new Python API did expose this. One thing that I always liked about using venvs is that they were restricted to just the folder path that I had open. Now I'm getting way too many non-relevant venvs from all over my system.

image

I'm no python expert so I'm totally fine if folks disagree and we don't do this. It's just a downgrade for how I use Python + VS Code notebooks.

@DonJayamanne
Copy link
Contributor

i like this feature

@DonJayamanne
Copy link
Contributor

Looks like a bug in the Python Extension API

@DonJayamanne
Copy link
Contributor

Upstream issue microsoft/vscode-python#20068

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug kernel-enumeration upstream-python Blocked on upstream Python Ext labels Oct 25, 2022
@DonJayamanne
Copy link
Contributor

Found that this is a change in the Python exension api and we need to filter the environments ourselves.

@roblourens
Copy link
Member

Found that this is a change in the Python exension api and we need to filter the environments ourselves.

Seems surprising that we would have to do it this way- isn't it expensive to collect venvs from all over the disk, just for us to ignore them?

@DonJayamanne
Copy link
Contributor

collect venvs from all over the disk, just for us to ignore them?

i think they're caching them, agreed, could probably be expensive (more disc IO , process validations etc..),, but that's what ive been asked to do , that's to filter them)l

@karrtikr @karthiknadig /cc

@karrtikr
Copy link
Contributor

Yep they're cached from previous session, so it's not expensive. Although as I suggested here what we can probably do is only return environments in the current VSCode context (only for the currently opened workspaces).

Feel free to reopen microsoft/vscode-python#20068 in that case.

@DonJayamanne
Copy link
Contributor

current VSCode context (only for the currently opened workspaces).
Feel free to reopen microsoft/vscode-python#20068 in that case.

@karrtikr . if you think this is what other users of the api need then fine. note this is definitely not something we do not need. please feel free to ignore or change the api accordingly.
im assuming you've made this changes because you've felt other would need it, hence i can't tell you not to do this

@rebornix rebornix added the author-verification-requested Issues potentially verifiable by issue author label Oct 27, 2022
@rzhao271 rzhao271 added the verified Verification succeeded label Oct 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug upstream-python Blocked on upstream Python Ext verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants