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
Use is_valid_field
from 1.x for mypy
plugin
#8738
Conversation
CodSpeed Performance ReportMerging #8738 will not alter performanceComparing Summary
|
please review I think the last failing test can be skipped by adding the correct label? It doesn't feel like this requires a changelog? |
In general I think we want to avoid changing the 1.X module code as much as possible. Does it not work to change: from pydantic.utils import is_valid_field to
? |
@dmontagu It should. Added a second commit to fix this, thanks! Edit: For some reason CI fails. I can't really reproduce that environment locally easily. David would you mind rerunning CI and seeing if that fixes it? I don't see why PyPy3.10 should fail on this.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful, thanks!
@sydney-runkle Any reason why this fix is not included in the latest releases? The backport to |
This should be included in 2.7! Thanks for the ping :). |
Change Summary
pydantic/pydantic/utils.py
Lines 696 to 699 in 3ddb509
This brings the
mypy
plugin in thev1
namespace in line with how1.x
actually behaved.Importing this from the
pydantic
namespace created warnings in our v1/v2 codebase.Related issue number
No issue, couldn't find one and this seems like a simple enough change.
Checklist
Selected Reviewer: @sydney-runkle
skip change file check