Skip to content

python3 runtests.py fails if python version == 3.11 #14487

@aless10

Description

@aless10

Bug Report

Following the contributor guide I run the command python3 runtests.py and I got an error, based on the python version that I use in my virtualenv vs the one listed in the ini file (3.7).

To Reproduce

python3 runtests.py

Expected Behavior

No errors

Actual Behavior

run self: ['/Users/alessioizzo/alessio/mypy/venv/bin/python3', '-m', 'mypy', '--config-file', 'mypy_self_check.ini', '-p', 'mypy']
mypy/config_parser.py:16: error: Cannot find implementation or library stub for module named "tomli"  [import]
        import tomli as tomllib
    ^
mypy/config_parser.py:16: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
mypy/modulefinder.py:22: error: Cannot find implementation or library stub for module named "tomli"  [import]
        import tomli as tomllib
    ^
Found 2 errors in 2 files (checked 169 source files)

FAILED: self

Your Environment

  • Mypy version used: latest from git clone
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files): mypy_self_check.ini
  • Python version used: 3.11
  • OS: macos Apple M1 Pro, Ventura 13.1

I guess that the solution can be to remove the python version from the ini file. I'm going to open a pull request for this one if this happens to be a bug.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions