← All tasks
javascriptjupyter/nbformat #406Not a task: already works

Changelog: explanation about normalize in 5.5.0 not clear

envgap__jupyter__nbformat-406

01 / FAILURE SIGNATURE

As reported upstream

...\Lib\site-packages\nbformat\__init__.py:96: MissingIDFieldWarning: Cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
8e973f5a5bd0dffe343eacbedf9cd5fecfc3ae27
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

jupyter/nbformat #406 · read the original issue
The changelog for 5.5.0 suggests that a better alternative to the `normalize` function is available, but does not state what that is.

I got a `MissingIDFieldWarning` warning:

```
...\Lib\site-packages\nbformat\__init__.py:96: MissingIDFieldWarning: Cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
  validate(nb)
```

I understand that the `normalize()` function is a workaround, for example, the discussion in #359 

Specifically, I think the lines here [in CHANGELOG.md](https://github.com/jupyter/nbformat/blob/ba2c6f53afbeb18f6fad0c9b9f67def34e757cb4/CHANGELOG.md?plain=1#L259C1-L262C34) should be clarified:

```
`nbformat` now contain a `normalize` function that will return a
normalized copy of a notebook that is suitable for validation. While
offered as a convenience we discourage its use and suggest library make
sure to generate valid notebooks.
```

I am new to this stuff, but am happy to try and set up a PR; however, I do not know what the preferred approach is!
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]