Skip to content

EncodingWarning issued when PYTHONWARNDEFAULTENCODING=true #1107

@jaraco

Description

@jaraco

When enabling PYTHONWARNDEFAULTENCODING, it triggers a warning in jsonschema (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/jsonschema/validators.py:109: EncodingWarning: 'encoding' argument not specified
    vocabulary = json.loads(path.read_text())

Probably that needs to be path.read_text(encoding='utf-8').

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething doesn't work the way it should.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions