jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
13.81k stars 3.12k forks source link

Fix for unable to lock any extension #16213

Open itsmevichu opened 3 weeks ago

itsmevichu commented 3 weeks ago

Fix for https://github.com/jupyterlab/jupyterlab/issues/16203

This issue arises because the page_config lacks context regarding the locked plugins.

jupyterlab-probot[bot] commented 3 weeks ago

Thanks for making a pull request to jupyterlab! To try out this branch on binder, follow this link: Binder

krassowski commented 2 weeks ago

Looks good, but I think we need to add a test here. In particular something directly hitting the get() endpoint of PluginHandler API:

https://github.com/jupyterlab/jupyterlab/blob/f3867b04b57fb1f6f401c6ee36378204099de0ac/jupyterlab/handlers/plugin_manager_handler.py#L21

It would look similar to:

https://github.com/jupyterlab/jupyterlab/blob/f3867b04b57fb1f6f401c6ee36378204099de0ac/jupyterlab/tests/test_custom_css_handler.py#L21-L37

but using lock_extension and unlock_extension to setup the state, similarly to how disable/enable are used in:

https://github.com/jupyterlab/jupyterlab/blob/f3867b04b57fb1f6f401c6ee36378204099de0ac/jupyterlab/tests/test_jupyterlab.py#L553-L571