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
Add test for functoool.partial validators #5102
Add test for functoool.partial validators #5102
Conversation
This fixes pydantic#5101 atleast in regards to the unhelpful message As this check is only done on creation of a class the overhead should be ok
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.
otherwise LGTM.
Also I see tests are failing. Please update. |
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.
otherwise LGTM.
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.
LGTM, @dmontagu are you happy with this?
Yes I'm fine with it. If possible I think we should support functools validators in v2 (given my understanding of how validators will work in v2 though I think that should be straightforward). |
Was suggested in python/cpython#102323 by @sobolevn. Fixes pydantic#5101 Superceedes pydantic#5102
Does it make sense to close this in favor of #5126 ? |
* Use getattr and default for qualname Was suggested in python/cpython#102323 by @sobolevn. Fixes #5101 Superceedes #5102 * Import tests from #5102 * Fix signature generation for functools * Use getattr and default for name * Remove expectation of error from tests * Reset tracked validators * Describe changes * Use getattr and default for module * Use id as fallback * Tweak name formatting --------- Co-authored-by: JensHeinrich <github.com/JensHeinrich> Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Add testcase for #5101