Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Proposed changes
nbformat>=5.2.0
Impact
Without these changes, it's possible to get into a situation with incompatible
jupyter_server
andnbformat
versions, which prevents creation of notebooks (at least in Jupyter Lab).Reproducible example
output of 'conda info'
First, create an environment with older versions of
jupyter_server
andnbformat
Start up Jupyter Lab, then create and save notebook.
Exit Jupyter Lab, then update ONLY
jupyter_server
in that conda environment.Next, run JupyterLab and try to create and save a notebook.
On loading, you'll see an error from the existing notebook.
Try to create a new notebook in Jupyter Lab, you'll see a different error.
Exit Jupyter Lab, then update to a newer
nbformat
in the environment.Run Jupyter Lab again...now notebooks load successfully and it's possible to create and save new ones.
Notes
Today, I updated a conda environment with
jupyter_server
in it, and found that I got the newestjupyter_server
(v1.15.6) but that mynbformat
version wasn't upgraded (I had 5.1.3, and the newest is 5.2.0).As a result, I wasn't able to create notebooks in Jupyter Lab...saw the following error when creating a new notebook
After some investigation, I determined that this is because
jupyter_server>=1.15.0
is incompatible withnbformat<5.2.0
.capture_validation_error
through tonbformat.write()
nbformat.write()
didn't accept that keyword argument, and instead passed it through**kwargs
until it eventually got passed tojson.dumps()
, which generates the error abovejupyter_server
's package metadata for PyPI contains a floor ofnbformat>=5.2.0
: https://github.com/jupyter-server/jupyter_server/blob/619fd23aef7064f23e49e36e43b99beff97a7d5b/setup.cfg#L37Notes for Reviewers
Thanks for your time and consideration!