-
Notifications
You must be signed in to change notification settings - Fork 291
Error changes #307
8000 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
Error changes #307
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #307 +/- ##
=======================================
Coverage 97.36% 97.37%
=======================================
Files 55 55
Lines 6344 6352 +8
Branches 45 44 -1
=======================================
+ Hits 6177 6185 +8
Misses 167 167
Continue to review full report at Codecov.
|
Also reverted |
Makes sense, and as I was saying on DM, I don't have a personal preference, but maybe there's a way to gauge usage and how much would it break people's code. But it also makes sense to try and keep compatibility, if it's doable enough. 🤷 |
I think it's expected for v2 to be a big change! People want to have the same features (and more) but already know it won't be free. I would go with whatever seems the best for the future (tuple looks good, naming too) even if it changes more compared to v1. TLDR: I'm in favour of "get it right" |
Agreed. But on this occasion, I think what we have here is right. I'll work on this tomorrow. |
Feedback on this welcome, in particular @tiangolo and @PrettyWood.
Basically this is reverting the keys in error information to match pydantic V1.
While I'm in favour of "get it right" over "keep it compatible", I don't think the win here is worth the headache this this will cause users.
With this change, errors like like:
Before this change (e.g. on
main
of pydantic-core atm.), errors looked like:While this might be a bit better, I don't think it's enough better to make up for the hassle this change will cause people.
WDYT?
If we decide to change this, I'd rather do it in pydantic/pydantic#4516 than after to minimise the changes there.