Skip to content

Cannot override settings by null value #278

@aidy1991

Description

@aidy1991

Description

Our application uses jupyterlab's settings override feature to change the settings of some extensions.
However, due to an upgrade of jupyterlab_server (v2.5.2 => v2.12.0), the settings are no longer overridden.
From my investigation, settings are not overridden if the value is null, as in { "format": null }. This is probably because recursive_update used in the following location ignores properties with the value None.

recursive_update(overrides.setdefault(plugin_id, {}), config)

Reproduce

I faced this problem when overriding the jupyter-archive configuration. Therefore, below I describe how to reproduce the problem in the case of jupyter-archive. However, the same should be true for other settings as well.

  1. Install jupyter-archive extension
  2. Check the default setting of format is zip on Advanced Settings Editor
  3. Add sys.prefix>/local/share/jupyter/lab/settings/overrides.json and see below for the contents of this file
  4. Check that the default setting of format is not overridden
    (5. If you set non-null value like tgz, it works well)

Expected behavior

In previous versions of jupyterlab_server, setting values could be overridden with null. Newer versions should be able to do the same, I think.

Context

  • JupyterLab version: 3.0.16
  • jupyterlab_server that worked well: 2.5.2
  • jupyterlab_server that does not work well: 2.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions