-
Notifications
You must be signed in to change notification settings - Fork 94
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
Python: Support module objects in the Variables pane #1788
Comments
Unassigning myself, I made a quick PR with an implementation of this but realised we needed to discuss and agree on whether we would like to display Python modules in the environment pane, and whether/how we'd like to group them. The same questions go for all non-data types i.e. classes, functions, etc. |
One other comment here: I find it somewhat odd that if I import a module, it doesn't show up in the Variables pane, but if I import a class, it does. For example, if I do
|
|
Ah, if nothing else we should definitely update the "Delete all objects" modal. I thought the same thing when clearing variables.
++ to this. I think having objects under VALUES and classes elsewhere would be more clear |
My other concern here: In R, "Delete all objects" does not unload packages from the namespace. You have to restart your kernel for that (which is also true in RStudio, so I think that will be familiar to RStudio users). In Python, "Delete all objects" DOES unload all modules and imports. If we maintain this distinct behavior between R and Python, then we'd need to figure out a way to have slightly different language/verbiage on the frontend for these two languages to make it clear to the user whether or not their packages/modules will be cleared, and that seems a bit tricky. Or, we force the two languages to behave the same way, even if that is unintuitive to the respective users of those languages... |
As of Positron Version: 2023.11.0 (Universal) build 1142, we do not show any module objects in the environment pane.
For example, run:
and the environment pane will not update.
I believe this was intentional, since having lots of modules shown could become noisy. However, it was suggested in #1369 (comment) that we could group modules as we've grouped other kinds of variables.
We'll need to add support for module types on the Python side. We may want to still hide it behind a feature flag until we've grouped modules in the Environment pane as suggested above.
The text was updated successfully, but these errors were encountered: