-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix mypy v1 plugin for mypy 1.11 release #10139
Conversation
please review |
Great work! Happy to merge, but we need to fix CI - could you please look into these failures? |
"build" jobs seemed to have connection errors, retrial of those hopefully works, found this in the job logs:
The lint step, twine check, I hunted down to pypa/twine#1125. Pinning |
Oh, wait, I missed that there was a |
Awesome, thanks for digging around for the fix! |
Change Summary
Repairs the mypy plugin for pydantic v1 by passing a
namespace
when defining aTypeVarId
formypy>=1.11
. This is a continuation on the changes in #9586 which missed the newnamespace
argument from python/mypy#17311I arrived at these changes by bisecting mypy, via my own project that got stuck at the issue in #10000, and ending up at python/mypy#17311.
python/mypy#17311 includes similar changes to the one found in here for mypy's
attrs
plugin:https://github.com/python/mypy/blob/8332c6e7992fa9655b79ef55c410a805ad1e6d34/mypy/plugins/attrs.py#L841-L843
I know this is part of
1.10.x
but I found the quite recent #10000 (comment) that you could consider a PR with a fix. I hope this is still OK. I'm also hoping I'm doing the right thing here by opening a PR towards1.10.x-fixes
instead ofmain
.Related issue number
fix #10000
Checklist
skip change file check
Selected Reviewer: @hramezani