Hello Jupyter Users and Maintainers!
We’re pleased to announce that NBConvert 6.0 released this past week. This is the first non-pre release in almost a year! We merged 105 pull requests contributed by 40 people in that time and improved a large number of interactions and interfaces. We’re announcing a few days after the 6.0.0 release itself as there were a few minor issues (mostly around documentation) that arose right away. For this reason we recommend using >=6.0.2. There may be a few more minor fixes that slipped the 6.0 release, but at this point it’s mostly documentation fixes.
Additionally there are some open minor bugs and improvements we deemed shouldn’t hold up the rest of the changes. We’d love you all to help contribute and get those closed, as there’s always a need for more maintainers on Jupyter core libraries and we’d all love to help guide new contributors to help the overall community. But that aside we didn’t forget about those issues that are still open, we just ran out of time to get them all closed and the mass majority of open bugs in nbconvert 5.6.1 were closed with 6.0.
On to what changed… I’ll post the big ones below, but the full list of issues and PRs resolved can be seen here on GitHub and the changelog has a more complete listing of contributors and ongoing patches.
Nbconvert 6.0 is a major release of nbconvert which includes many significant changes. Overall most existing patterns should continue to work. We worked hard to maintain as much backwards compatibility as we could given the changes, but nbconvert is a complicated beast so some refactors might have affected your inherited class calls. Do reach out if something isn’t working with 6.0 that you expected to / isn’t captured in the release note: see the bottom of this post for where to get help.
- Python 2 support was dropped. Currently Python 3.6-3.8 is supported and tested by nbconvert. However, nbconvert 6.0 provides limited support for Python 3.6. nbconvert 6.1 will drop support for Python 3.6. Limited support means we will test and run CI on Python 3.6.12 or higher. Issues that are found only affecting Python 3.6 are not guaranteed to be fixed. We recommend all users of nbconvert use Python 3.7 and higher.
- Unlike previous versions, nbconvert 6.0 relies on the nbclient package for the execute preprocessor, which allows for asynchronous kernel requests.
template_paths. If referring to a 5.x style
.tpltemplate use the full path with the
template_fileargument to the file. On the command line the pattern is
- Nbconvert 6.0 includes a new “webpdf” exporter, which renders notebooks in pdf format through a headless web browser, so that complex outputs such as HTML tables, or even widgets are rendered in the same way as with the HTML exporter and a web browser.
- The default template applied when exporting to HTML now produces the same DOM structure as JupyterLab, and is styled using JupyterLab’s CSS. The pygments theme in use mimics JupyterLab’s codemirror mode with the same CSS variables, so that custom JupyterLab themes could be applied. The classic notebook styling can still be enabled with
jupyter nbconvert --to html --template classic
- Nbconvert 6.0 includes a new system for creating custom templates, which can now be installed as packages. A custom “foobar” template is installed in Jupyter’s data directory under
nbconvert/templatesand has the form of a directory containing all resources. Templates specify their base template as well as other configuration parameters in a
conf.jsonat the root of the template directory.
- The “slideshow” template now makes use of RevealJS version 4. It can now be used with the HTML exporter with
jupyter nbconvert --to html --template reveal
--to slides exporter is still supported for convenience.
- Inkscape 1.0 is now supported, which had some breaking changes that prevented 5.x versions of nbconvert from converting documents on some systems that updated.
If you run into confusion or problems that are unexpected use the help page to get some guidance, though mainly this calls for making a GitHub Issue on the nbconvert repository. We’re going through and making some documentation updates to help account for changes and confusion that exists in the current docs (hint: this is a great place to make a first contribution). Thanks to @willingc especially with taking on some post documentation updates.