Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbformat's validate(strip_invalid_metadata=...) and validate(repair_duplicate_cell_ids=...) will be deprecated. #4

Open
Carreau opened this issue Jun 22, 2022 · 4 comments

Comments

@Carreau
Copy link

Carreau commented Jun 22, 2022

See in particular jupyter/nbformat#282.

Validate mutating its argument is the root of a number of hidden bugs and a potential security issue.

@Carreau
Copy link
Author

Carreau commented Jun 22, 2022

cc @nicholaswold

@willingc
Copy link
Contributor

cc @MSeal

@Carreau
Copy link
Author

Carreau commented Jun 22, 2022

Note that you seem to be the only users of these options, so if you are ok with it and like the normalize (that return a fixed copy), then validate, I might be a bit more aggressive to deprecate them.

This is likely to reveal a bunch of other bugs in other frontends show up, as high level apis like nbformat.write/nbformat.writes, did call validate with the default of repair_duplicate_cell_ids=True for example.

@MSeal
Copy link
Member

MSeal commented Jun 27, 2022

@Carreau totally fine to be more aggressive, this library is still a WIP and that pattern was just convenient to resuse at the time. Happy to refactor to new API constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants