Open shpindler opened 1 year ago
Currently, marshmallow_dataclass does not support generic dataclasses. (This explains why your example does not work.)
PR #172 is now actively working to implement exactly that, so I think support for will be coming "real soon now".
It is from my question on StackOverflow: https://stackoverflow.com/questions/75096188/typeerror-when-creating-a-marshmallow-schema-from-dataclass-inherited-from-gener?noredirect=1#comment132530258_75096188
I'm trying to create a marshmallow schema from dataclass which is inherited from generic type:
users_schema = marshmallow_dataclass.class_schema(Users)()
This is my code:
However I get this traceback:
When I print
typ
variable from the traceback it is printed like~T
which is really not a class.Also when I make Pagination class concrete - not generic, it works. So the problem is related to Generic.
Any ideas what could I do to make it work?