You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to use marshmallow_dataclass perfectly when using with dataclasses.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.
Scenario 2 seems to be ok for my requirements. But I am not sure what weird stuff might happen by enabling both dataclasses and attrs together. If you are aware of possible problems I might get into, please let me know.
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: