-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Serialization bug when using schema inheritance #800
Comments
Thanks for reporting it. I am a bit busy but as soon as I have time I will take a look |
marcosschroh
added a commit
that referenced
this issue
Dec 2, 2024
Fixed in the next released |
Thank you, @marcosschroh! I have 2 questions, out of curiosity
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
dataclasses-avroschema/dataclasses_avroschema/utils.py
Lines 126 to 127 in ed935bb
In this code section
.__annotations__
is misused.__annotations__
is accessed on the instance, which has the same behavior as accessing it on the class (type(instance)
). In this case,__annotations__
only contains the fields of the current class but not those of its parent classes.To Reproduce
Further notes on
__annotations__
:Expected behavior
Serialization should succeed.
Suggestions
typing.get_type_hints
lru_cache
for exampleThe text was updated successfully, but these errors were encountered: