jupyter / nbformat

Reference implementation of the Jupyter Notebook format

Home Page:http://nbformat.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

With PYTHONWARNDEFAULTENCODING=true, EncodingWarning occurs

jaraco opened this issue · comments

Running tests for pip-run, I observe an EncodingWarning after setting PYTHONWARNDEFAULTENCODING per PEP 597:

tests/test_scripts.py::TestNotebookDepsReader::test_one_code_block
  /Users/jaraco/code/jaraco/pip-run/.tox/py/lib/python3.11/site-packages/nbformat/validator.py:102: EncodingWarning: 'encoding' argument not specified
    with open(schema_path) as f:

Probably that should be changed to open(schema_path, encoding='utf-8')