You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose API for when the list of interpreters have changed #17004
Originally posted by DonJayamanne July 13, 2021
Currently there's no way for Jupyter to know when user creates a new Python environment (conda, or the like).
Is it possible to get an event so we know that new interpreters have been created.
Note: Once thats done, how would we get these new interpreters. Not sure the GetInterrpeters is the best API for this, as that will return all interpreters all over again. Personally it would be nice to have something we can subscribe to, like an observable, this way we only get whats new).
ersonally it would be nice to have something we can subscribe to, like an observable, this way we only get whats new).
Yup, that was my original plan for how the interpreters could be exposed. #3023
Having an observable is a very efficient way for Jupyter as well. E.g. we don't need to wait till we get all interpreters just to know that the user has an interpreter, similarly when we search for kernels we don't need to wait for all when we can start searching incrementally. (these were some of the perf improvements we discussed when looking at the delays in Jupyter extension)
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 5 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.
Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future.
We do encourage people to continue 👍 this issue as it helps us prioritize our work based on what the community seems to want the most.
Activity
DonJayamanne commentedon Aug 17, 2021
Yup, that was my original plan for how the interpreters could be exposed.
#3023
Having an observable is a very efficient way for Jupyter as well. E.g. we don't need to wait till we get all interpreters just to know that the user has
an interpreter, similarly when we search for kernels we don't need to wait for all when we can start searching incrementally. (these were some of the perf improvements we discussed when looking at the delays in Jupyter extension)brettcannon commentedon Sep 1, 2021
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 5 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.
brettcannon commentedon Oct 15, 2021
Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future.
We do encourage people to continue 👍 this issue as it helps us prioritize our work based on what the community seems to want the most.
karthiknadig commentedon Jan 19, 2022
This is now available via the proposed API for the python extension, please try this out and let us know.
Event for when the interpreter list changes:
vscode-python/src/client/apiTypes.ts
Line 172 in 65c22e4
API to get currently know interpreters:
vscode-python/src/client/apiTypes.ts
Line 145 in 65c22e4
API to get details for a given interpreter path:
vscode-python/src/client/apiTypes.ts
Line 135 in 65c22e4
API to get the refresh promise, this will return a promise for the current ongoing discovery:
vscode-python/src/client/apiTypes.ts
Line 167 in 65c22e4
API to trigger refresh of environments:
vscode-python/src/client/apiTypes.ts
Line 162 in 65c22e4
brettcannon commentedon Dec 14, 2022
I believe the API supports notification of when the interpreter list has changed, so closing as done.