jupyter / nbformat

Reference implementation of the Jupyter Notebook format
http://nbformat.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
267 stars 152 forks source link

With PYTHONWARNDEFAULTENCODING=true, EncodingWarning occurs #366

Closed jaraco closed 1 year ago

jaraco commented 1 year ago

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')