NB Convert 5.5
With many significant improvements, we are pleased to announced nbconvert 5.5.0!
It is available via pypi (pip install nbconvert -U). For conda it should appear in a day or so when the conda-forge feed picks up the new version (conda install nbconvert -c conda-forge).
We had some investment in latex and pdf conversions that have been longstanding in the Miltestone for 5.5. We got template improvements and several bug squashes into the release. However some of the more fundamental improvements like spaces in paths/names and http image references are still in progresss as we work through better approaches. Look for those improvements in the next release.
The following 18 authors contributed 144+ commits – Thank you all!
- Benjamin Ragan-Kelley
- Clayton A Davis
- DInne Bosman
- Doug Blank
- Henrique Silva
- Jeff Hale
- Lukasz Mitusinski
- M Pacer
- Maarten Breddels
- Madhumitha N
- Matthew Seal
- Paul Gowder
- Philipp A
- Rick Lupton
- Rüdiger Busche
- Thomas Kluyver
- Tyler Makaro
The full list of changes they made can be seen on GitHub
Python 3.4 support was dropped. Many of our upstream libraries stopped supporting 3.4 and it was found that serious bugs were being caught during testing against those libraries updating past 3.4.
979 for details.
Now when a notebook executing contains Jupyter Widgets, the state of all the widgets can be stored in the notebook’s metadata. This allows rendering of the live widgets on, for instance nbviewer, or when converting to html.
You can tell nbconvert to not store the state using the store_widget_state argument:
jupyter nbconvert --ExecutePreprocessor.store_widget_state=False --to notebook --execute mynotebook.ipynb
If you can’t view widget results after execution, you may need to select Trust Notebook under the File menu of the UI in question.
Execute Preprocessor Rework
Based on monkey patching required in papermill the run_cell code path in the ExecutePreprocessor was reworked to allow for accessing individual message parses without reimplementing the entire function. Now there is a processs_message function which take a ZeroMQ message and applies all of its side-effect updates on the cell/notebook objects before returning the output it generated, if it generated any such output.
The change required a much more extensive test suite covering cell execution as test coverage on the various, sometimes wonky, code paths made improvements and reworks impossible to prove undamaging. Now changes to kernel message processing has much better coverage, so future additions or changes with specs over time will be easier to add.
Out Of Memory Kernel Failure Catches
When running out of memory on a machine, if the kernel process was killed by the operating system it would result in a timeout error at best and hang indefinitely at worst. Now regardless of timeout configuration, if the underlying kernel process dies before emitting any messages to the effect an exception will be raised notifying the consumer of the lost kernel within a few seconds.
Latex / PDF Template Improvements
The latex template was long overdue for improvements. The default template had a rewrite which makes exports for latex and pdf look a lot better. Code cells in particular render much better with line breaks and styling the more closely matches notebook browser rendering. Thanks t-makaro for the efforts here!
992 for details
Thanks all for the combined efforts. We’ll start working on the next wave of improvements to come.