-
Notifications
You must be signed in to change notification settings - Fork 77
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 when using marshmallow_dataclass with attr.s #236
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am able to use
marshmallow_dataclass
perfectly when using withdataclasses.dataclass
However, I want to use it with
attrs
module instead - use the converters/validators functionalities.It works well most of the time. However, I am facing problems when I use
marshmallow_dataclass
+attrs
with inheritance.Sample code is given below.
B = ClsB.Schema().load({'a': 123, 'b': 'bb', 'c': 4, 'd': "123"})
marshmallow.exceptions.ValidationError: {'a': ['Unknown field.'], 'b': ['Unknown field.']}
Questions:
dataclasses
andattrs
together. If you are aware of possible problems I might get into, please let me know.I have raised this query with
attrs
as well.python-attrs/attrs#1114
I hope the first question is answered by
marshmallow_dataclass
team and second by theattrs
team.The text was updated successfully, but these errors were encountered: