Closed Redoubts closed 3 months ago
Reproducer is needed 🙏
That's strange and concerning
This looks like it's related to an overload with a TypeVar. Do you use custom mypy plugins? Maybe the one for pydantic? The TypeVar.id
was changed this release cycle to only accept TypeVarId
types, no longer ints. If a plugin isn't updated, that might cause the issue / crash. However, to say for sure, we need a reproducer.
For pydantic v1: make sure to run at least >=1.10.16
as that's the "fixed" version.
https://github.com/pydantic/pydantic/releases/tag/v1.10.16
It's definitely a plugin. Looks like this will stop crashing if I turn off trio-typing
. I'll close this as this feels like a 3rd party problem, though I wonder if there's a way for mypy to better blame a plugin for things like this. I think I've been burned by a plugin that doesn't work well with a newer mypy before, and it always feels as inscrutable.
@cdce8p Hello, shouldn't this change be reflected in the "Announcement issue for plugin API changes" #6617 issue?
Currently a plugin I maintain fails after updating the mypy dependency since we use integers in the id
parameter in mypy.types.TypeVarType(...)
.
I guess the change won't be too difficult since we just use -1
as the int value, but it still breaks the plugin.
Thank you!
Bug Report
I pip-installed the 1.11 branch to take a preview of the next release, and I saw a crash when running mypy:
pip install -U git+https://github.com/python/mypy.git@release-1.11
To Reproduce
Hard to share, this happens when running on my company code. Can look more closely by request, if the traceback isn't enough.
Expected Behavior
No traceback from mypy
Actual Behavior
(See traceback)
Your Environment