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
Hi @masinc, This is only the workaround I could come up with
fromdataclassesimportdataclassfromserdeimportserde, to_dict, from_dictfromtypingimportOptionalfromtypingimportGeneric, TypeVarT=TypeVar('T')
@serde@dataclassclassA(Generic[T]):
a: Optional[T]
a=A(A(A(None)))
print(to_dict(a))
print(from_dict(A[A[A[int]]], {'a': {'a': {'a': None}}})) # int in A[A[A[int]]] is a fake type
Python: 3.10.8
pyserde: 0.9.5
I defined the following class and an error occurred.
The
field
value is commented out, but aRecurtionError
is raised in both case.Rust
Serde
worked with similar recursive data structures.The text was updated successfully, but these errors were encountered: