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

EncodingWarning issued when PYTHONWARNDEFAULTENCODING=true #1107

Closed
jaraco opened this issue Jun 23, 2023 · 1 comment
Closed

EncodingWarning issued when PYTHONWARNDEFAULTENCODING=true #1107

jaraco opened this issue Jun 23, 2023 · 1 comment
Labels
Bug Something doesn't work the way it should.

Comments

@jaraco
Copy link

jaraco commented Jun 23, 2023

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

@jaraco jaraco changed the title EncodingWarning issued when PYTHON_WARN_DEFAULT_ENCODING=true EncodingWarning issued when PYTHONWARNDEFAULTENCODING=true Jun 23, 2023
@Julian
Copy link
Member

Julian commented Jun 23, 2023

Thanks! Fixed (in another repo, as this code has moved for the next release which is already in beta.)

Appreciated.

@Julian Julian added the Bug Something doesn't work the way it should. label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something doesn't work the way it should.
Projects
None yet
Development

No branches or pull requests

2 participants