Changes in nbconvert#
7.16.6#
Bugs fixed#
Prevent leading whitespace in markdown code blocks from being stripped #2203 (@peytondmurray)
Fix bullet list parsing in markdown #2177 (@douglas-raillard-arm)
Maintenance and upkeep improvements#
Update base.tex.j2 for macro compatibility with newer versions of Pandoc #2196 (@PetalAdrift)
Contributors to this release#
(GitHub contributors page for this release)
@Carreau | @douglas-raillard-arm | @gabemorris12 | @krassowski | @PetalAdrift | @peytondmurray | @QuLogic
7.16.5#
Enhancements made#
Add support for mistune 3.1.0 #2199 (@fcollonval)
Allow including
text/x-rst
outputs in rst conversion, transition away fromtext/restructuredtext
#2167 (@takluyver)
Bugs fixed#
Do not display mathjax overlay #2181 (@timkpaine)
Work around pip 24.1 bug which prevents installing pandocfilters 1.4.1 #2168 (@takluyver)
Fix markdown2asciidoc function for pandoc >= 3.0 (closes #2017) #2152 (@thomasjm)
Maintenance and upkeep improvements#
enhancement dep-chain: directly depend on bleach[css], instead of pulling in tinycss2. #2166 (@xiacunshun)
chore: update pre-commit hooks #2146 (@pre-commit-ci)
Contributors to this release#
(GitHub contributors page for this release)
@bollwyvl | @fcollonval | @krassowski | @pre-commit-ci | @stuaxo | @t-makaro | @takluyver | @thomasjm | @timkpaine | @xiacunshun
7.16.4#
Bugs fixed#
Maintenance and upkeep improvements#
Revert “Set all min deps” #2138 (@blink1073)
Set all min deps #2136 (@blink1073)
chore: update pre-commit hooks #2134 (@pre-commit-ci)
Contributors to this release#
7.16.3#
Maintenance and upkeep improvements#
Remove pytest pin #2129 (@blink1073)
Add Compatibility with Pandoc 2.9.2 #2128 (@blink1073)
Pin to Pytest 7 #2124 (@blink1073)
Contributors to this release#
7.16.2#
Bugs fixed#
[HTMLExporter] Initialize resources before widget filtering #2118 (@yuvipanda)
Contributors to this release#
7.16.1#
Maintenance and upkeep improvements#
Fix permissions for prep release workflow #2112 (@blink1073)
Update publish workflow #2111 (@blink1073)
fix for tests/ dir not in sys.path, closes #2066 #2108 (@ivanov)
Documentation improvements#
Contributors to this release#
7.16.0#
Enhancements made#
Contributors to this release#
7.15.0#
Enhancements made#
Support configurable width and height of reveal presentations #2104 (@franzhaas)
Maintenance and upkeep improvements#
chore: update pre-commit hooks #2105 (@pre-commit-ci)
handle xhtml void elements in mermaid diagrams #2103 (@bollwyvl)
Contributors to this release#
7.14.2#
Maintenance and upkeep improvements#
Contributors to this release#
7.14.1#
Bugs fixed#
Maintenance and upkeep improvements#
Allow pre-fetch of css files without attempting download #2095 (@AlexanderRichert-NOAA)
Bump the actions group with 1 update #2091 (@dependabot)
Contributors to this release#
7.14.0#
Enhancements made#
Convert
coalescese_streams
function toCoalesceStreamsPreprocessor
#2089 (@ryan-williams)
Maintenance and upkeep improvements#
chore: update pre-commit hooks #2090 (@pre-commit-ci)
Fix webpdf test on Python 3.12 #2088 (@blink1073)
Clean up import #2087 (@blink1073)
Contributors to this release#
7.13.1#
Bugs fixed#
Restore removed import #2086 (@blink1073)
Contributors to this release#
7.13.0#
Enhancements made#
Add table, td, tr to allowed list of tags #2083 (@yuvipanda)
Maintenance and upkeep improvements#
Remove twitter links that cause linkcheck to fail #2084 (@yuvipanda)
Update ruff config #2079 (@blink1073)
chore: update pre-commit hooks #2076 (@pre-commit-ci)
Contributors to this release#
7.12.0#
Enhancements made#
Maintenance and upkeep improvements#
Use ruff on notebooks and update typings #2068 (@blink1073)
Documentation improvements#
Contributors to this release#
(GitHub contributors page for this release)
@blink1073 | @Carreau | @gnestor | @minrk | @mpacer
7.11.0#
Enhancements made#
Support es modules in js includes #2063 (@timkpaine)
Maintenance and upkeep improvements#
Clean up lint handling and list generics #2065 (@blink1073)
Remove not needed pytest-dependency test requirement #2062 (@danigm)
Contributors to this release#
7.10.0#
Enhancements made#
Maintenance and upkeep improvements#
Fix typing for traitlets 5.13 #2060 (@blink1073)
Adopt ruff format #2059 (@blink1073)
Update typings and remove dead link #2056 (@blink1073)
Documentation improvements#
Contributors to this release#
7.9.2#
Bugs fixed#
Restore ResourcesDict to the public API #2055 (@blink1073)
Contributors to this release#
7.9.1#
Maintenance and upkeep improvements#
Include tests in sdist #2053 (@blink1073)
Contributors to this release#
7.9.0#
Maintenance and upkeep improvements#
Update typing for traitlets 5.11 #2050 (@blink1073)
chore: update pre-commit hooks #2049 (@pre-commit-ci)
Fixup typings #2048 (@blink1073)
Remove redundant link check in CI #2044 (@blink1073)
Bump actions/checkout from 3 to 4 #2042 (@dependabot)
Adopt sp-repo-review #2040 (@blink1073)
Contributors to this release#
7.8.0#
Enhancements made#
Bugs fixed#
Fix: Prevent error from all whitespace lang string #2036 (@Adamtaranto)
Contributors to this release#
7.7.4#
Bugs fixed#
Maintenance and upkeep improvements#
Contributors to this release#
7.7.3#
Bugs fixed#
Contributors to this release#
7.7.2#
Bugs fixed#
Contributors to this release#
7.7.1#
Bugs fixed#
Contributors to this release#
7.7.0#
Enhancements made#
Bugs fixed#
Maintenance and upkeep improvements#
Fix lint error #2010 (@blink1073)
Support Python 3.8-3.12 #2008 (@blink1073)
Contributors to this release#
(GitHub contributors page for this release)
@blink1073 | @brichet | @jstorrs | @maartenbreddels | @manzt | @martinRenou | @pre-commit-ci
7.6.0#
Maintenance and upkeep improvements#
Update to Mistune v3 #1820 (@TiagodePAlves)
Contributors to this release#
7.5.0#
Enhancements made#
Bugs fixed#
Fix pdf conversion with explicitly relative paths #2005 (@tuncbkose)
Ensure TEXINPUTS is an absolute path #2002 (@tuncbkose)
Maintenance and upkeep improvements#
bump pandoc max version #1997 (@tuncbkose)
exclude bleach 5.0.0 from dependencies resolution #1990 (@karlicoss)
Contributors to this release#
(GitHub contributors page for this release)
@blink1073 | @bollwyvl | @karlicoss | @pre-commit-ci | @tuncbkose
7.4.0#
Enhancements made#
Add ExtractAttachmentsPreprocessor #1978 (@tuncbkose)
Bugs fixed#
Moved ensure_dir_exists to FilesWriter #1987 (@tuncbkose)
Tweak exporter default_config merging behavior #1981 (@tuncbkose)
Revert unintended effects of #1966 #1974 (@tuncbkose)
Maintenance and upkeep improvements#
Fix test_errors_print_traceback test #1985 (@blink1073)
Ensure toml support in coverage reporting #1984 (@blink1073)
Use local coverage #1976 (@blink1073)
Contributors to this release#
7.3.1#
Bugs fixed#
Remove overwriting of default KernelManager #1972 (@tuncbkose)
Maintenance and upkeep improvements#
Contributors to this release#
7.3.0#
Enhancements made#
Allow pattern in output_base #1967 (@JeppeKlitgaard)
Make date configurable in latex/PDF #1963 (@achimgaedke)
Update jupyterlab CSS #1960 (@martinRenou)
Maintenance and upkeep improvements#
Update ci badge #1968 (@blink1073)
Contributors to this release#
(GitHub contributors page for this release)
@achimgaedke | @blink1073 | @Carreau | @JeppeKlitgaard | @martinRenou
7.2.10#
Enhancements made#
Add cell-id anchor for cell identification #1897 (@krassowski)
Bugs fixed#
Do not import pyppeteer for installation check #1947 (@krassowski)
Maintenance and upkeep improvements#
Add more linting #1943 (@blink1073)
Contributors to this release#
7.2.9#
Bugs fixed#
Fix handling of css sanitizer #1940 (@blink1073)
Contributors to this release#
7.2.8#
Bugs fixed#
Maintenance and upkeep improvements#
Update codecov link #1935 (@blink1073)
Fix types and add lint to automerge #1932 (@blink1073)
Add type checking #1930 (@blink1073)
Add spelling and docstring enforcement #1929 (@blink1073)
Add scheduled ci run #1926 (@blink1073)
Contributors to this release#
(GitHub contributors page for this release)
@blink1073 | @maartenbreddels | @martinRenou | @minrk | @pre-commit-ci
7.2.7#
Bugs fixed#
Fix Hanging Tests on Linux #1924 (@blink1073)
Maintenance and upkeep improvements#
Adopt ruff and handle lint #1925 (@blink1073)
Contributors to this release#
7.2.6#
Maintenance and upkeep improvements#
Include all templates in sdist #1916 (@blink1073)
clean up workflows #1911 (@blink1073)
CI Cleanup #1910 (@blink1073)
Documentation improvements#
Fix docs build and switch to PyData Sphinx Theme #1912 (@blink1073)
Contributors to this release#
7.2.5#
Bugs fixed#
Maintenance and upkeep improvements#
Bump actions/upload-artifact from 2 to 3 #1904 (@dependabot)
Bump actions/checkout from 2 to 3 #1903 (@dependabot)
Contributors to this release#
7.2.4#
Maintenance and upkeep improvements#
Handle jupyter core warning #1905 (@blink1073)
Add dependabot #1902 (@blink1073)
Contributors to this release#
7.2.3#
Bugs fixed#
Maintenance and upkeep improvements#
Contributors to this release#
7.2.2#
Bugs fixed#
Fix default config test #1885 (@blink1073)
Maintenance and upkeep improvements#
Add ensure label workflow #1884 (@blink1073)
Add release workflows #1883 (@blink1073)
Maintenance cleanup #1881 (@blink1073)
Contributors to this release#
7.2.1#
Bugs fixed#
Fix version handling #1878 (@blink1073)
Contributors to this release#
7.2.0#
Maintenance and upkeep improvements#
Prep for jupyter releaser #1877 (@blink1073)
Add support for jupyter_client 8 #1867 (@blink1073)
Contributors to this release#
7.1.0#
7.0.0#
Update to Mistune 2.0.2 by @TiagodePAlves in #1764
Add qtpdf and qtpng exporters by @davidbrochart in #1611
Add recursive flag for glob notebook search by @paoloalba in #1785
Encode SVG image data as UTF-8 before calling lxml cleaner by @emarsden in #1837
Fix lab template output alignment by @dakoop in #1795
Handle nbformat 5.5 by @blink1073 #1841
Remove downloaded CSS from repository by @martinRenou #1827
Switch from entrypoints to importlib-metadata by @konstin in #1782
Updates for sphinx 5.0 support by @blink1073 in #1788
Fixed unique div ids in lab template, fixed #1759 by @veghdev in #1761
WebPDFExporter: Emulate media print by @martinRenou in #1791
Fix fonts overridden by user stylesheet by inheriting styles by @dakoop in #1793
Fix lab template output alignment by @dakoop in #1795
Clean up markdown parsing by @blink1073 in #1774
Switch to hatch build backend by @blink1073 in #1777
6.5.0#
Support bleach 5, add packaging and tinycss2 dependencies by @bollwyvl in #1755
Drop dependency on testpath. by @anntzer in #1723
Adopt pre-commit by @blink1073 in #1744, #1746, #1748, #1749, #1757
Add pytest settings and handle warnings by @blink1073 in #1745
Update cli example by @leahecole in #1753
Clean up workflows by @blink1073 in #1750
6.4.4#
HTMLExporter: Respect the embed_images flag for HTML blocks #1721
6.4.3#
6.4.2#
6.4.1#
6.4.0#
The full list of changes can be seen on the 6.4.0 milestone
6.3.0#
The full list of changes can be seen on the 6.3.0 milestone
6.2.0#
The full list of changes can be seen on the 6.2.0 milestone
6.1.0#
This release is mostly a long list of bug fixes and capability additions. Thanks to the many contributors for helping Improve nbconvert!
The following 31 authors contributed 81 commits.
Adolph
Alessandro Finamore
Angus Hollands
Atsuo Ishimoto
Bo
David Brochart
Frédéric Collonval
Jeremy Howard
Jim Zwartveld
José Ignacio Romero
Joyce Er
joyceerhl
Kyle Cutler
Leah E. Cole
Leah Wasser
Nihiue
Matthew Seal
Michael Adolph
Mohammad Mostafa Farzan
Okky Mabruri
Pill-GZ
ptcane
Raniere Silva
Ryan Moe
Stefan Lang
Sylvain Corlay
Tobin Jones
txoof
Yuvi Panda
Significant Changes#
Comprehensive notes#
Feature: support static widgets in Reveal.js slides #1553
Feature: add speaker notes to Reveal.js template #1543
Add correct output mimetype to WebPDF exporter #1534
Set mimetype for webpdf correctly #1514
Fix docstring issue and a broken link #1576
Add CLI example for removing cell tag syntax #1504
Include output of stdin stream in lab template #1454
Don’t use a shell to call inkscape #1512
JupyterLab export as HTML with widgets fails to load widgets #1474
Move note inside Reveal.js HTML slideshow #1510
fix issue 1507: broken command line option –CSSHTMLHeaderPreprocessor.style= #1548
Fix order of template paths #1496
Changed documentation of external_exporters #1582
Fix template precedence when using a custom template (#1558) #1577
add pip to docs envt #1571
Fix CI By Adding PIP to conda envt for docs build #1570
Explicitly install pip in docs environment.yml #1569
small update to docs hide cell #1567
Allow child templates to override mathjax #1551
Allow get_export_names to skip configuration check #1471
Update docs: Tex Live package on Ubuntu #1555
Test jupyter_client #1545
Update jupyterlab css #1539
Webpdf: Use a temporary file instead of an URL #1489
Applied patch for marking network changes #1527
Change webpdf display name #1515
Allow disabling pyppeteer sandbox #1516
Make pagination configurable in webpdf #1513
Fix Reveal.js version in documentation #1509
Fix dangling reference to get_template_paths() #1463
Solved svg2pdf conversion error if Inkscape is installed into the default path on a windows machine #1469
fix typo #1499
Update version dependency of traitlets #1498
Update execute.py #1457
Fix code output indentation when running nbconvert –no-input #1444
fix issue (i’d call it a BUG) #1167 #1450
#1428 add docstring #1433
Update nbconvert_library.ipynb #1438
Supports isolated iframe when converting to HTML #1593
6.0.7#
Primarily a release addressing template extensions issues reported since 6.0 launched.
Comprehensive notes#
6.0.6#
A range of bug fixes for webpdf exports
Comprehensive notes#
Removed CSS preprocessor from default proprocessor list (fixes classic rendering) #1411
Fixed error when pickling TemplateExporter #1399
Support for fractional height html / webpdf exports #1413
Added short wait time for fonts and rendering in webpdf #1414
Updated template documentation
Minor fixes to the webpdf exporter #1419
Fixup use with a running event loop within webpdf #1420
Prevent overflow in input areas in lab template #1422
6.0.5#
Revert networkidle2 change which caused custom cdn-fetched widgets in webpdf
6.0.4#
Comprehensive notes#
Fixing Problems#
6.0.3#
Execute preprocessor no longer add illegal execution counts to markdown cells #1396
6.0.2#
A patch for a few minor issues raised out of the 6.0 release.
Comprehensive notes#
Fixing Problems#
Testing, Docs, and Builds#
6.0.1#
A quick patch to fix an issue with get_exporter #1367
6.0#
The following authors and reviewers contributed the changes for this release – Thanks you all!
Ayaz Salikhov
bnables
Bo
David Brochart
David Cortés
Eric Wieser
Florian Rathgeber
Ian Allison
James Wilshaw
Jeremy Tuloup
Joel Ostblom
Jon Bannister
Jonas Drotleff
Josh Devlin
Karthikeyan Singaravelan
Kerwin.Sun
letmerecall
Luciano Resende
Lumír ‘Frenzy’ Balhar
Maarten A. Breddels
Maarten Breddels
Marcel Stimberg
Matthew Brett
Matthew Seal
Matthias Bussonnier
Matthias Geier
Miro Hrončok
Phil Austin
Praveen Batra
Ruben Di Battista
Ruby Werman
Sang-Yun Oh
Sergey Kizunov
Sundar
Sylvain Corlay
telamonian
Thomas Kluyver
Thomas Ytterdal
Tyler Makaro
Yu-Cheng (Henry) Huang
Significant Changes#
Nbconvert 6.0 is a major release of nbconvert which includes many significant changes.
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_path
has becometemplate_paths
. If referring to a 5.x style.tpl
template use the full path with thetemplate_file
argument to the file. On the command line the pattern is--template-file=<path/to/file.tpl>
.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/templates
and has the form of a directory containing all resources. Templates specify their base template as well as other configuration parameters in aconf.json
at 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
The --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.
Remaining changes#
We merged 105 pull requests! Rather than enumerate all of them we’ll link to the github page which contains the many smaller impact improvements.
The full list can be seen on GitHub
5.6.1#
The following authors and reviewers contributed the changes for this release – Thanks you all!
Charles Frye
Chris Holdgraf
Felipe Rodrigues
Gregor Sturm
Jim
Kerwin Sun
Ryan Beesley
Matthew Seal
Matthias Geier
thuy-van
Tyler Makaro
Significant Changes#
RegExRemove applies to all cells#
RegExRemove preprocessor now removes cells regardless of cell outputs. Before this only cells that had outputs were filtered.
Comprehensive notes#
New Features#
Fixing Problems#
Testing, Docs, and Builds#
5.6#
The following 24 authors and reviewers contributed 224 commits – Thank you all!
00Kai0
Aidan Feldman
Alex Rudy
Alexander Kapshuna
Alexander Rudy
amniskin
Carol Willing
Dustin H
Hsiaoming Yang
imtsuki
Jessica B. Hamrick
KrokodileDandy
Kunal Marwaha
Matthew Seal
Matthias Geier
Miro Hrončok
M Pacer
Nils Japke
njapke
Sebastian Führ
Sylvain Corlay
Tyler Makaro
Valery M
Wayne Witzel
The full list of changes they made can be seen on GitHub
Significant Changes#
Jupter Client Pin#
The jupyter_client
dependency is now pinned to >5.3.1
. This is done
to support the Parallel NBConvert below, and
future versions may require interface changes from that version.
Parallel NBConvert#
NBConvert --execute
can now be run in parallel via threads,
multiprocessing, or async patterns! This means you can now parallelize
nbconvert via a bash loop, or a python concurrency pattern and it should
be able to execute those notebooks in parallel.
Kernels have varying support for safe concurrent execution. The ipython kernel (ipykernel version 1.5.2 and higher) should be safe to run concurrently using Python 3. However, the Python 2 ipykernel does not always provide safe concurrent execution and sometimes fails with a socket bind exception. Unlike ipykernel which is maintained by the project, other community-maintained kernels may have varying support for concurrent execution, and these kernels were not tested heavily.
Execute Loop Rewrite#
This release completely rewrote the execution loop responsible for monitoring kernel messages until cell execution is completed. This removes an error where kernel messages could be dropped if too many were posted too quickly. Furthermore, the change means that messages are not buffered. Now, messages can be logged immediately rather than waiting for the cell to terminate.
See #994 for exact code changes if you’re curious.
Comprehensive notes#
New Features#
Make a default global location for custom user templates #1028
Added
store_history
option topreprocess_cell
andrun_cell
#1055Simplify the function signature for preprocess() #1042
Set flag to not always stop kernel execution on errors #1040
setup_preprocessor
passes kwargs tostart_new_kernel
#1021
Fixing Problems#
Very fast stream outputs no longer drop some messages #994
LaTeX errors now properly raise exceptions #1053
Improve template whitespacing #1076
Fixes for character in LaTeX exports and filters #1068, #1039, #1024, and #1077
Mistune pinned in preparation for 2.0 release #1074
Fix selection of mimetype when converting to HTML #1036
Correct a few typos #1029
Update
export_from_notebook
names #1027Dedenting html in ExtractOutputPreprocessor #1023
Fix backwards incompatibility with markdown2html #1022
Fixed html image tagging #1013
Remove unnecessary css #1010
Testing, Docs, and Builds#
5.5#
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
WrRan
The full list of changes they made can be seen on GitHub
Significant Changes#
Deprecations#
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.
See #979 for details.
IPyWidget Support#
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
This widget rendering is not performed against a browser during
execution, so only widget default states or states manipulated via user
code will be calculated during execution. %%javascript
cells will
execute upon notebook rendering, enabling complex interactions to
function as expected when viewed by a UI.
If you can’t view widget results after execution, you may need to
select File --> Trust Notebook
in the menu.
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 process_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!
See #992 for details
Comprehensive notes#
New Features#
Fixing Problems#
Refactored execute preprocessor to have a process_message function #905:
Fixed latex export for svg data in python 3 #985
Enabled configuration to be shared to exporters from script exporter #993
Make latex errors less verbose #988
Typo in template syntax #984
Improved attachments +fix supporting non-unique names #980
PDFExporter “output_mimetype” traitlet is not longer ‘text/latex’ #972
FIX: respect wait for clear_output #969
address deprecation warning in cgi.escape #963
Correct inaccurate description of available LaTeX template #958
Fixed kernel death detection for executions with timeouts #998:
Fixed export names for various templates #1000, #1001, and #1001:
Deprecations#
Testing, Docs, and Builds#
Added tests for each branch in execute’s run_cell method #982
Mention formats in –to options more clearly #991
Adds ascii output type to command line docs page, mention image folder output #956
Simplify setup.py #949
Use utf-8 encoding in execute_api example #921
Upgrade pytest on Travis #941
Fix LaTeX base template name in docs #940
Updated release instructions based on 5.4 release walk-through #887
Fixed broken link to jinja docs #997
5.4.1#
Thanks to the following 11 authors who contributed 57 commits.
Benjamin Ragan-Kelley
Carol Willing
Clayton A Davis
Daniel Rodriguez
M Pacer
Matthew Seal
Matthias Geier
Matthieu Parizy
Rüdiger Busche
Thomas Kluyver
Tyler Makaro
Comprehensive notes#
New Features#
Fixing Problems#
Testing, Docs, and Builds#
DOC: Add missing language specification to code-block #882
5.4#
Significant Changes#
Deprecations#
Python 3.3 support was dropped. The version of python is no longer common and new versions have many fixes and interface improvements that warrant the change in support.
See #843 for implementation details.
Changes in how we handle metadata#
There were a few new metadata fields which are now respected in nbconvert.
nb.metadata.authors
metadata attribute will be respected in latex
exports. Multiple authors will be added with ,
separation against
their names.
nb.metadata.title
will be respected ahead of nb.metadata.name
for
title assignment. This better matches with the notebook format.
nb.metadata.filename
will override the default
output_filename_template
when extracting notebook resources in the
ExtractOutputPreprocessor
. The attribute is helpful for when you want
to consistently fix to a particular output filename, especially when you
need to set image filenames for your exports.
The raises-exception
cell tag
(nb.cells[].metadata.tags[raises-exception]
) allows for cell
exceptions to not halt execution. The tag is respected in the same way
by nbval and other
notebook interfaces. nb.metadata.allow_errors
will apply this rule for
all cells. This feature is toggleable with the force_raise_errors
configuration option. Errors from executing the notebook can be allowed
with a raises-exception
tag on a single cell, or the allow_errors
configurable option for all cells. An allowed error will be recorded in
notebook output, and execution will continue. If an error occurs when it
is not explicitly allowed, a ‘CellExecutionError’ will be raised. If
force_raise_errors
is True, CellExecutionError
will be raised for
any error that occurs while executing the notebook. This overrides both
the allow_errors
option and the raises-exception
cell tags.
See #867, #703, #685, #672, and #684 for implementation changes.
Configurable kernel managers when executing notebooks#
The kernel manager can now be optionally passed into the
ExecutePreprocessor.preprocess
and the executenb
functions as the
keyword argument km
. This means that the kernel can be configured as
desired before beginning preprocessing.
This is useful for executing in a context where the kernel has external dependencies that need to be set to non-default values. An example of this might be a Spark kernel where you wish to configure the Spark cluster location ahead of time without building a new kernel.
Overall the ExecutePreprocessor has been reworked to make it easier to use. Future releases will continue this trend to make this section of the code more inheritable and reusable by others. We encourage you read the source code for this version if you’re interested in the detailed improvements.
See #852 for implementation changes.
Surfacing exporters in front-ends#
Exporters are now exposed for front-ends to consume, including classic notebook. As an example, this means that latex exporter will be made available for latex ‘text/latex’ media type from the Download As interface.
Raw Templates#
Template exporters can now be assigned raw templates as string
attributes by setting the raw_template
variable.
class AttrExporter(TemplateExporter):
# If the class has a special template and you want it defined within the class
raw_template = """{%- extends 'rst.tpl' -%}
{%- block in_prompt -%}
raw template
{%- endblock in_prompt -%}
"""
exporter_attr = AttrExporter()
output_attr, _ = exporter_attr.from_notebook_node(nb)
assert "raw template" in output_attr
See #675 for implementation changes.
New command line flags#
The --no-input
will hide input cells on export. This is great for
notebooks which generate “reports” where you want the code that was
executed to not appear by default in the extracts.
An alias for notebook
was added to exporter commands. Now --to ipynb
will behave as --to notebook
does.
Comprehensive notes#
New Features#
No input flag (
--no-input
) #825Add alias
--to ipynb
for notebook exporter #873Add
export_from_notebook
#864If set, use
nb.metadata.authors
for LaTeX author line #867Populate language_info metadata when executing #860
Support for
\mathscr
#830Allow the execute preprocessor to make use of an existing kernel #852
Refactor ExecutePreprocessor #816
Update widgets CDN for ipywidgets 7 w/fallback #792
Add support for adding custom exporters to the “Download as” menu. #759
Enable ANSI underline and inverse #696
Update notebook css to 5.4.0 #748
Change default for slides to direct to the reveal cdn rather than locally #732
Use “title” instead of “name” for metadata to match the notebook format #703
Img filename metadata #685
Added MathJax compatibility definitions #687
Per cell exception #684
Set BIBINPUTS and BSTINPUTS environment variables when making PDF #676
If
nb.metadata.title
is set, default to that for notebook #672
Deprecations#
Drop support for python 3.3 #843
Default conversion method on the CLI was removed (
--to html
now required)
Fixing Problems#
Fix api break #872
Don’t remove empty cells by default #784
Handle attached images in html converter #780
No need to check for the channels already running #862
Update
font-awesome
version for slides #793Properly treat JSON data #847
Skip executing empty code cells #739
Ppdate log.warn (deprecated) to log.warning #804
Cleanup notebook.tex during PDF generation #768
Windows unicode error fixed, nosetest added to setup.py #757
Better content hiding; template & testing improvements #734
Fix Jinja syntax in custom template example. #738
Fix for an issue with empty math block #729
Use defusedxml to parse potentially untrusted XML #708
Fixes for traitlets 4.1 deprecation warnings #695
Testing, Docs, and Builds#
A couple of typos #870
Add python_requires metadata. #871
Document
--inplace
command line flag. #839Fix minor typo in
usage.rst
#863Add note about local
reveal_url_prefix
#844Move
onlyif_cmds_exist
decorator to test-specific utils #854Include LICENSE file in wheels #827
Added Ubuntu Linux Instructions #724
Removing more nose remnants via dependencies. #758
Remove offline statement and add some clarifications in slides docs #743
Linkify PR number #710
Added shebang for python #694
Upgrade mistune dependency #705
add feature to improve docs by having links to prs #662
Update notebook CSS from version 4.3.0 to 5.1.0 #682
Explicitly exclude or include all files in Manifest. #670
5.3.1#
MANIFEST.in updated to include
LICENSE
andscripts/
when creating sdist. #666
5.3#
Major features#
Tag Based Element Filtering#
For removing individual elements from notebooks, we need a way to signal to nbconvert that the elements should be removed. With this release, we introduce the use of tags for that purpose.
Tags are user-defined strings attached to cells or outputs. They are stored in cell or output metadata. For more on tags see the nbformat docs on cell metadata.
Usage:
Apply tags to the elements that you want to remove.
For removing an entire cell, the cell input, or all cell outputs apply the tag to the cell.
For removing individual outputs, put the tag in the output metadata
using a call like
display(your_output_element, metadata={tags=[<your_tags_here>]})
.
NB: Use different tags depending on whether you want to remove the entire cell, the input, all outputs, or individual outputs.
Add the tags for removing the different kinds of elements to the following traitlets. Which kind of element you want to remove determines which traitlet you add the tags to.
The following traitlets remove elements of different kinds:
remove_cell_tags
: removes cellsremove_input_tags
: removes inputsremove_all_outputs_tag
: removes all outputsremove_single_output_tag
: removes individual outputs
Comprehensive notes#
new: configurable
browser
in ServePostProcessor #618new:
--clear-output
command line flag to clear output in-place #619new: remove elements based on tags with
TagRemovePreprocessor
. #640, #643new: CellExecutionError can now be imported from
nbconvert.preprocessors
#656new: slides now can enable scrolling and custom transitions #600
docs: Release instructions for nbviewer-deploy
docs: improved instructions for handling errors using the
ExecutePreprocessor
#656tests: better height/width metadata testing for images in rst & html #601 #602
tests: normalise base64 output data to avoid false positives #650
tests: normalise ipython traceback messages to handle old and new style #631
bug: mathjax obeys
\\(\\)
&\\[\\]
(both nbconvert & pandoc) #609 #617bug: specify default templates using extensions #639
bug: fix pandoc version number #638
bug: require recent mistune version #630
bug: catch errors from IPython
execute_reply
anderror
messages #642mathjax processing in mistune now only uses inline grammar #611
removeRegex now enabled by default on all TemplateExporters, does not remove cells with outputs #616
validate notebook after applying each preprocessor (allowing additional attributes) #645
changed COPYING.md to LICENSE for more standard licensing that GitHub knows how to read #654
5.2.1#
Major features#
In this release (along with the usual bugfixes and documentation improvements, which are legion) we have a few new major features that have been requested for a long time:
Global Content Filtering#
You now have the ability to remove input or output from code cells, markdown cells and the input and output prompts. The easiest way to access all of these is by using traitlets like TemplateExporter.exclude_input = True (or, for example HTMLExporter.exclude_markdown = True if you wanted to make it specific to HTML output). On the command line if you just want to not have input or output prompts just use –no-prompt.
Execute notebooks from a function#
You can now use the executenb function to execute notebooks as though you ran the execute preprocessor on the notebooks. It returns the standard notebook and resources options.
Remove cells based on regex pattern#
This removes cells based on their matching a regex pattern (by default, empty cells). This is the RegexRemovePreprocessor.
Script exporter entrypoints for nonpython scripts#
Now there is an entrypoint for having an exporter specific to the type of script that is being exported. While designed for use with the IRkernel in particular (with a script exporter focused on exporting R scripts) other non-python kernels that wish to have a language specific exporter can now surface that directly.
Comprehensive notes#
new: configurable ExecutePreprocessor.startup_timeout configurable #583
new: RemoveCell preprocessor based on cell content (defaults to empty cell) #575
new: function for executing notebooks:
executenb
#573new: global filtering to remove inputs, outputs, markdown cells (&c.), this works on all templates #554
new: script exporter entrypoint #531
new: configurable anchor link text (previously ¶)
HTMLExporter.anchor_link_text
#522improved releases (how-to documentation, version-number generation and checking) #593
language information from cell magics (for highlighting) is now included in more formats #586
better traceback behaviour when execution errs #521
deprecated nose test features removed #519
bug fixed: we now respect width and height metadata on jpeg and png mimetype outputs #588
bug fixed: now we respect the
resolve_references
filter inreport.tplx
#577bug fixed: output metadata now is removed by ClearOutputPreprocessor #569
bug fixed: display id respected in execute preproessor #563
bug fixed: dynamic defaults for optional jupyter_client import #559
bug fixed: don’t self-close non-void HTML tags #548
buf fixed: upgrade jupyter_client dependency to 4.2 #539
bug fixed: LaTeX output through md→LaTeX conversion shouldn’t be touched #535
bug fixed: now we escape
<
inside math formulas when converting to html #514
Credits#
This release has been larger than previous releases. In it 33 authors contributed a total of 546 commits.
Many thanks to the following individuals who contributed to this release (in alphabetical order):
Adam Chainz
Andreas Mueller
Bartosz T
Benjamin Ragan-Kelley
Carol Willing
Damián Avila
Elliot Marsden
Gao, Xiang
Jaeho Shin
Jan Schulz
Jeremy Kun
Jessica B. Hamrick
John B Nelson
juhasch
Livia Barazzetti
M Pacer
Matej Urbas
Matthias Bussonnier
Matthias Geier
Maximilian Albert
Michael Scott Cuthbert
Nicholas Bollweg
Paul Gowder
Paulo Villegas
Peter Parente
Philipp A
Scott Sanderson
Srinivas Reddy Thatiparthy
Sylvain Corlay
Thomas Kluyver
Till Hoffmann
Xiang Gao
YuviPanda
5.1.1#
fix version numbering because of incomplete previous version number
5.1#
5.0#
Use
xelatex
by default for latex export, improving unicode and font support.Use entrypoints internally to access Exporters, allowing for packages to declare custom exporters more easily.
New ASCIIDoc Exporter.
New preprocessor for sanitised html output.
New general
convert_pandoc
filter to reduce the need to hard-code lists of filters in templates.Use pytest, nose dependency to be removed.
Refactored Exporter code to avoid ambiguity and cyclic dependencies.
Update to traitlets 4.2 API.
Fixes for Unicode errors when showing execution errors on Python 2.
Default math font matches default Palatino body text font.
General documentation improvements. For example, testing, installation, custom exporters.
Improved link handling for LaTeX output
Refactored the automatic id generation.
New kernel_manager_class configuration option for allowing systems to be set up to resolve kernels in different ways.
Kernel errors now will be logged for debugging purposes when executing notebooks.
4.3#
added live widget rendering for html output, nbviewer by extension
4.2#
Custom Exporters
can be provided by external packages, and registered with nbconvert via setuptools entrypoints.allow nbconvert reading from stdin with
--stdin
option (write intonotebook
basename)Various ANSI-escape fixes and improvements
Various LaTeX/PDF export fixes
Various fixes and improvements for executing notebooks with
--execute
.
4.1#
setuptools fixes for entrypoints on Windows
various fixes for exporters, including slides, latex, and PDF
fixes for exceptions met during execution
include markdown outputs in markdown/html exports