Changelog#
5.11.0#
Enhancements made#
Maintenance and upkeep improvements#
Add GitHub Actions security auditing with zizmor #444 (@Carreau, @claude)
Fix validators cache key type annotation #440 (@Carreau, @claude)
Refactor validation to separate deprecated kwarg handling #439 (@Carreau, @claude)
Bump pre-commit hook pins and fix resulting lint/typing fallout #438 (@Carreau, @claude)
Bump actions/checkout from 5 to 6 in the actions group #422 (@Carreau)
Make security deprecated slow to nudge people #418 (@Carreau)
Bump the actions group across 1 directory with 2 updates #414 (@Carreau)
Add security.md #411 (@Carreau, @jasongrout)
chore: update pre-commit hooks #401 (@blink1073)
Documentation improvements#
Other merged PRs#
Contributors to this release#
The following people contributed discussions, new ideas, code and documentation contributions, and review. See our definition of contributors.
(GitHub contributors page for this release)
@blink1073 (activity) | @Carreau (activity) | @claude (activity) | @crypdick (activity) | @jasongrout (activity) | @LecrisUT (activity) | @rgbkrk (activity)
5.10.4#
Maintenance and upkeep improvements#
Set all min deps #399 (@blink1073)
chore: update pre-commit hooks #398 (@pre-commit-ci)
Contributors to this release#
5.10.3#
Bugs fixed#
Revert PR #378 (Simplify NotebookNotary._data_dir_default) #397 (@krassowski)
Contributors to this release#
5.10.2#
Maintenance and upkeep improvements#
Restore usage of npm token #395 (@blink1073)
Contributors to this release#
5.10.1#
No merged PRs
5.10.0#
Maintenance and upkeep improvements#
Update Release Scripts #394 (@blink1073)
chore: update pre-commit hooks #391 (@pre-commit-ci)
chore: update pre-commit hooks #390 (@pre-commit-ci)
Update ruff and typings #388 (@blink1073)
chore: update pre-commit hooks #385 (@pre-commit-ci)
Clean up lint handling #384 (@blink1073)
Adopt ruff format #383 (@blink1073)
Update typings for mypy 1.6 #381 (@blink1073)
chore: update pre-commit hooks #380 (@pre-commit-ci)
Fix typing error #379 (@blink1073)
Adopt sp-repo-review #377 (@blink1073)
Bump actions/checkout from 3 to 4 #375 (@dependabot)
Documentation improvements#
Contributors to this release#
(GitHub contributors page for this release)
@blink1073 | @Carreau | @cmd-ntrf | @dependabot | @pre-commit-ci | @pydanny
5.9.2#
Bugs fixed#
Fix version handling #372 (@blink1073)
Maintenance and upkeep improvements#
Fix encoding warnings #371 (@blink1073)
Update link to notebook security #370 (@blink1073)
Documentation improvements#
Update link to notebook security #370 (@blink1073)
Contributors to this release#
5.9.1#
Maintenance and upkeep improvements#
Contributors to this release#
5.9.0#
Maintenance and upkeep improvements#
Support Python 3.12 #363 (@blink1073)
Use local coverage #360 (@blink1073)
Bump actions/checkout from 2 to 3 #350 (@dependabot)
Contributors to this release#
5.8.0#
Enhancements made#
Maintenance and upkeep improvements#
Fix codecov badge #352 (@blink1073)
Add more linting #345 (@blink1073)
Only add ellipsis to NotJSONError message if message is truncated #344 (@rschroll)
Documentation improvements#
DOC: README: capitalization, title #346 (@westurner)
Contributors to this release#
(GitHub contributors page for this release)
@blink1073 | @dcsaba89 | @jonabc | @pre-commit-ci | @rschroll | @westurner
5.7.3#
Maintenance and upkeep improvements#
Contributors to this release#
5.7.2#
Bugs fixed#
Maintenance and upkeep improvements#
Fix check release #341 (@blink1073)
Add spell checker and enforce docstrings #339 (@blink1073)
Fix docs build #338 (@blink1073)
Contributors to this release#
5.7.1#
Maintenance and upkeep improvements#
Expose more attributes for typing #337 (@blink1073)
Fix lint #336 (@blink1073)
Adopt ruff and address lint #333 (@blink1073)
Use base setup dependency type #329 (@blink1073)
Switch to using Jupyter Releaser #326 (@blink1073)
More maintenance cleanup #325 (@blink1073)
Handle warning from jupyter client #322 (@blink1073)
Add dependabot #320 (@blink1073)
Clean up docs and maintenance #314 (@blink1073)
Documentation improvements#
Fix changelog target #321 (@chrisjsewell)
Clean up docs and maintenance #314 (@blink1073)
Other merged PRs#
Contributors to this release#
Changes in nbformat#
5.7.0#
Always use jsonschema to handle error reporting.
Fix deprecation warning suggestion.
5.6.1#
Fix handling of
__version__on Python 3.7.
5.6.0#
Fix docs and type annotations for
validator.normalize.Switch to hatch build backend.
5.5.0#
The biggest change in nbformat 5.5.0 is the deprecation of arguments
to validate() that try to fix notebook errors during validation.
validate() is a function that is core to the security model of
Jupyter. Callers rely on it not mutating its argument or trying to fix
the notebook passed to it.
Automatically fixing a notebook during validation can hide subtle bugs. The auto-fixing arguments are therefore deprecated and will be removed in a future release; validation will fail instead of silently modifying an invalid notebook.
Use normalize() explicitly when a notebook from an external source needs
to be repaired before validation. It returns a normalized copy and the
number of changes made:
from nbformat.validator import normalize
changes, normalized = normalize(notebook)
nbformat.validate(normalized)
The preferred approach is still to generate valid notebooks at the source; normalization is a compatibility tool, not a substitute for fixing the producer.
Other changes#
nbformatis now built with flit, and usespyproject.tomlDocumentation and Deprecations have been updated with version number and stack levels.
5.4.0#
Add project URLs to
setup.pyFix import in
nbformat.currentAdd
mypyand typings supportImprove CI
5.3.0#
Use
fastjsonschemaby defaultAdopt
pre-commitand auto-formattersIncrease minimum
jsonschemato 2.6, handle warnings
5.2.0#
Add ability to capture validation errors
Update supported python versions
Ensure nbformat minor version is present when upgrading
Only fix cell ID validation issues if asked
Return the notebook when no conversion is needed
Catch AttributeErrors stemming from ipython_genutils as ValidationErrors on read
Don’t list pytest-cov as a test dependency
Remove dependency on IPython genutils
Include tests in sdist but not wheel
5.1.3#
Change id generation to be hash based to avoid problematic word combinations
Added tests for python 3.9
Fixed setup.py build operations to include package data
5.1.2#
Fixed missing file in manifest
5.1.1#
Changes convert.upgrade to upgrade minor 4.x versions to 4.5
5.1.0#
Implemented CellIds from JEP-62
Fixed a regression introduced when using fastjsonschema, which does not directly support to validate a “reference”/”subschema”
Removed unreachable/unneeded code
Added CI workflow for package release on tag push
5.0.8#
Add optional support for using [fastjsonschema]{.title-ref} as the JSON validation library. To enable fast validation, install [fastjsonschema]{.title-ref} and set the environment variable [NBFORMAT_VALIDATOR]{.title-ref} to the value [fastjsonschema]{.title-ref}.
5.0.7#
Fixed a bug where default values for validator.get_validator() failed with an import error
5.0.6#
nbformat.read() function has a better duck-type interface and will raise more meaningful error messages if it can’t parse a notebook document.
5.0.5#
Allow notebook format 4.0 and 4.1 to have the arbitrary JSON mimebundles from format 4.2 for pragmatic purposes.
Support reading/writing path-like objects has been added to read operations.
5.0.4#
Fixed issue causing python 2 to pick up 5.0.x releases.
5.0.3#
Removed debug print statements from project.
5.0.2#
Added schema validation files for older versions. This was breaking notebook generation.
5.0.1#
5.0#
Starting with 5.0,
nbformatis now Python 3 only (>= 3.5)Add execution timings in code cell metadata for v4 spec.
"metadata": { "execution": {...}}should be populated with kernel-specific timing information.Documentation for how markup is used in notebooks added
Link to json schema docs from format page added
Documented the editable metadata flag
Update description for collapsed field
Documented notebook format versions 4.0-4.3 with accurate json schema specification files
Clarified info about name’s meaning for cells
Added a default execution_count of None for new_output_cell(‘execute_result’)
Added support for handling nbjson kwargs
Wheels now correctly have a LICENSE file
Travis builds now have a few more execution environments
4.4#
Explicitly state that metadata fields can be ignored.
Introduce official jupyter namespace inside metadata (
metadata.jupyter).Introduce
source_hiddenandoutputs_hiddenas official front-end metadata fields to indicate hiding source and outputs areas. NB: These fields should not be used to hide elements in exported formats.Fix ending the redundant storage of signatures in the signature database.
nbformat.validatecan be set to not raise a ValidationError if additional properties are included.Fix for errors with connecting and backing up the signature database.
Dict-like objects added to NotebookNode attributes are now transformed to be NotebookNode objects; transformation also works for [.update()]{.title-ref}.
4.3#
A new pluggable
SignatureStoreclass allows specifying different ways to record the signatures of trusted notebooks. The default is still an SQLite database. Seepluggable_signature_storefor more information.nbformat.readandnbformat.writeaccept file paths as bytes as well as unicode.Fix for calling
nbformat.validateon an empty dictionary.Fix for running the tests where the locale makes ASCII the default encoding.
Include nbformat-schema files (v3 and v4) in nbformat-schema npm package.
Include configuration for appveyor’s continuous integration service.
4.2#
4.2.0#
Update nbformat spec version to 4.2, allowing JSON outputs to have any JSONable type, not just
object, and mime-types of the formapplication/anything+json.Define basics of
authorsin notebook metadata.nb.metadata.authorsshall be a list of objects with the propertyname, a string of each author’s full name.Update use of traitlets API to require traitlets 4.1.
Support trusting notebooks on stdin with
cat notebook | jupyter trust
4.1#
4.1.0#
Update nbformat spec version to 4.1, adding support for attachments on markdown and raw cells.
Catch errors opening trust database, falling back on
:memory:if the database cannot be opened.
4.0#
The first release of nbformat as its own package.