Open ketozhang opened 6 days ago
I don't use TaggedDict directly with pydantic, so I don't suggest this needs to be fixed. This is likely relevant for pydantic to solve.
However, I do question the multiple inheritance here. A cursory glance, it's not typical to see UserDict
inheriting dict
.
Description of the problem
Using pydantic for deserialization, the ASDF serialized node of the YAML tree comes in as a
asdf.tagged.TaggedDict
. Pydantic is having trouble validating this as if it's a regular dictionary. I identified this being due toTaggedDict
having multiple-inheritance to bothUserDict
anddict
. I have not seen examples where this is the intended implementation for custom dicts.Example of the problem
Success on simplest single-inheritance.
Fails on simplest multi-inheritance
System information
asdf version: 3.5.0 python version: 3.12.7 operating system: OSX 14.6.1