-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
to_dict/to_json not working with postponed annotations for Generic dataclass, if typed class is defined in different module #90
Comments
Thank you for the illustrative example. In my production code I don't use postponed annotations, that's why this problem hadn't been discovered before you did :) This bug seems to be caused by explicit passing globals of the |
I came to conclusion to remove explicit globals and locals passing to |
@Fatal1ty we are working with @AntonOvsyannikov on the same thing, so let me chime in here. I can confirm that the fix works for the sample code and probably in our real life code, however I stumbled on a new bug and can't fully test. See this #91 |
Merged and will be available in an upcoming release. |
@Fatal1ty thanks a lot! |
Fixed in 3.3.1. |
Description
In all my modules I am using postponed annotations.
I define
dataclass
, inherited fromGeneric[T]
, where typevar is defined in same module. Than I derive some typed class and try to callto_dict()
. If both classes are in same module enerything is ok. If typed class defined in different module I gotUnresolvedTypeReferenceError
What I Did
m1.py
m2.py
The text was updated successfully, but these errors were encountered: