diff --git a/nbconvert/exporters/exporter.py b/nbconvert/exporters/exporter.py index 9c7abcc8e..396e30175 100644 --- a/nbconvert/exporters/exporter.py +++ b/nbconvert/exporters/exporter.py @@ -315,10 +315,7 @@ def _init_resources(self, resources): def _validate_preprocessor(self, nbc, preprocessor): try: - if not hasattr(validator, "normalize"): - nbformat.validate(nbc, relax_add_props=True) - else: - nbformat.validate(nbc) + nbformat.validate(nbc, relax_add_props=True) except nbformat.ValidationError: self.log.error("Notebook is invalid after preprocessor %s", preprocessor) raise diff --git a/pyproject.toml b/pyproject.toml index 4e00a11ed..f775c8685 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -153,8 +153,6 @@ testpaths = [ filterwarnings = [ "error", "ignore:nbconvert.utils.lexers is deprecated as of 5.0:UserWarning", - # Pending https://github.com/jupyter/nbformat/pull/256 - "ignore:Passing a schema to Validator.iter_errors is deprecated:DeprecationWarning", # https://github.com/pyppeteer/pyppeteer/issues/342 "ignore:remove loop argument:DeprecationWarning:websockets", # https://github.com/mhammond/pywin32/issues/1802