-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
Remove Dump Validation #1304
Remove Dump Validation #1304
Conversation
4ebd400
to
2a578de
Compare
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.
I'm good with this so far. I think this is the right approach-- 💯 code simplification.
We'll definitely want to clarify somewhere in the docs (Quickstart, perhaps) that validation only happens on load
.
@@ -813,15 +813,13 @@ def make_item(foo, bar): | |||
with pytest.raises(ValidationError) as excinfo: | |||
schema.dump(make_item(6, 1)) | |||
errors = excinfo.value.messages | |||
assert "foo" in errors |
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.
Since we're not supporting validation-on-dump, we might want to just remove the (pre|post)_dump
methods in this test and the assertions associated them, full stop.
+32 −454 😍 |
Speeds up Update: also, positive results when running https://github.com/voidfiles/python-serialization-benchmark. 2.x-line
dev
1132-no-dump-validation--update
Note: I had to remove toasted-marshmallow from the benchmark because of lyft/toasted-marshmallow#9 |
Once deckar01#1 is merged in and this is brought up to date with We can probably get rid of |
Co-Authored-By: Steven Loria <[email protected]>
…update Remove more validation; update docs and tests
Feel free to squash my commits into yours if you want; I don't care about the git creds =). |
@deckar01 Are you working on this, or should I pick up where you left off? |
I haven't made any changes locally that haven't been pushed. Feel free to pick it up and push on it. I think some tests started failing after merging deckar01#1. Not sure if it was that or the merge conflicts I resolved. There are also new merge conflicts I haven't looked into. |
OK, I can look into the conflicts this week. Mind if I squash and merge after all is said and done? |
Allow dump errors to bubble to the top to avoid building an error dictionary.
Fixes #1132