-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Open
Labels
Milestone
Description
There are many issues with the current mechanism with server and notebook extensions, which caused a lot of pain.
One of the main issues is with package management since extension enabling consists in modifying a configuration file, which is not a thing package managers do well - and we would like switch to a configuration mechanism where each extension would simply add a file into a directory to be picked up by the application. The conf.d approach. But here, I would like to keep this aspect of the problem aside to tackle other issues with the current mechanism which I think are causing a lot of confusion too.
I am proposing the following changes in the mechanism
sys-prefixinstall should be the default instead of system for both enabling and installing. People are confused when enabling/installing an nbextension requires different privileges from the pip install. Doing anything else than--sys-prefixshould be a conscious decision. It is also important to note that--useris global to all the python installs that the user may use. (Hence--useris almost always evil).- When installing an extension, the
--overrideoption should beTrueby default. Otherwise people don't know that they may have an older version of the js installed. - Uninstalling an extension should also remove the line corresponding to the extension in the notebook.json configuration file (which is a bit different from disabling it as we see in the following).
- A major change that I want to put in place is that if an extension is loaded because it is enabled in e.g.
sys-prefix, the assets should only looked for in thesys-prefixdata directory. If it is loaded because enabled in theuserconfiguration directory, it should only load the assets in theuserdata directory etc... - At the moment, disabling an extension with
--user(i.e. setting it toFalsein the user nbconfig) will cause the extension to not be enabled even if it is enabled e.g. in sys-prefix because the user configuration has the priority - which is really silly. This problem will go when I fix the previous one.
NarekA