Closed
Description
Bug Report
mypy 1.16 fails to analyze code that imports pydantic 2.11.5. Mypy analysis succeeded in mypy 1.15.
To Reproduce
import pydantic # I was using pydantic 2.11.5
Expected Behavior
mypy should successfully analyze the file.
Actual Behavior
[ERROR] Completed: Typecheck using MyPy - mypy - mypy failed (exit code 2).
.cache/pex_root/venvs/1/0e03c948bbef7584e6803ffeda803caff33dd8c6/e78a64e86d7066bde1606f95b893e7cfa75dbda9/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:17: error: Cannot find implementation or library stub for module named "rich.console" [import-not-found]
.cache/pex_root/venvs/1/0e03c948bbef7584e6803ffeda803caff33dd8c6/e78a64e86d7066bde1606f95b893e7cfa75dbda9/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:17: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
packages/package_name/src/file.py: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.16.0
Your Environment
- Mypy version used: 1.16
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini
(and other config files): - Python version used: 3.10.16