Skip to content

EncodingWarnings when warn_default_encoding set #152

Description

@jaraco

When running tests with pytest-mypy enabled and PYTHONWARNDEFAULTENCODING=1, I see these warnings:

docs/conf.py::mypy
docs/conf.py::mypy
  /Users/jaraco/code/jaraco/pytest-enabler/.tox/python/lib/python3.11/site-packages/pytest_mypy.py:272: EncodingWarning: 'encoding' argument not specified
    stdout, stderr, status = mypy.api.run(

docs/conf.py::mypy
  /Users/jaraco/code/jaraco/pytest-enabler/.tox/python/lib/python3.11/site-packages/pytest_mypy.py:312: EncodingWarning: 'encoding' argument not specified
    with open(results_path, mode="w") as results_f:

docs/conf.py::mypy-status
pytest_enabler/__init__.py::mypy
tests/test_enabler.py::mypy
  /Users/jaraco/code/jaraco/pytest-enabler/.tox/python/lib/python3.11/site-packages/pytest_mypy.py:306: EncodingWarning: 'encoding' argument not specified
    with open(results_path, mode="r") as results_f:

================================================================================== mypy ===================================================================================
Success: no issues found in 3 source files
======================================================================== warnings summary (final) =========================================================================
.tox/python/lib/python3.11/site-packages/pytest_mypy.py:331
  /Users/jaraco/code/jaraco/pytest-enabler/.tox/python/lib/python3.11/site-packages/pytest_mypy.py:331: EncodingWarning: 'encoding' argument not specified
    with open(config._mypy_results_path, mode="r") as results_f:

See PEP 597 for background.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions