Description
@divyansshhh opened an issue in JupyterLab that is more appropriate for jupyter/nbformat
, so this issue is meant to replace the original in JupyterLab.
Problem
At present, when computing the signature of a notebook, the
compute_signature
function (ref) takes into consideration the kernel info. I believe this shouldn't be done because it has no effect on the safety of the output.Proposed Solution
If there is no reason to include kernel info while computing the notebook signature then it should be stripped out.
Additional context
In our use-case we have a custom contents manager that can be used to access notebooks from a remote host in a read-only mode. Now, if the original notebook was authored with say
kernel1
then opening that in a host which doesn't have a kernel namedkernel1
makes the notebook untrusted.