Closed georgeharker closed 4 years ago
This is indeed a bug in typish
's get_origin
, which will be resolved in its next release. Once available, please update typish
to the latest version, that'll do the trick. jsons
will soon follow with a dependency on that new version.
I'll close this one.
something changed in 1.3.0 and I think the usage of get_mro is to blame,
one of my classes fails to serialize with the error 'copy_with' not found.
It looks like get_mro() inside _get_complete_class_dict is returning typing types,
(<class 'typing._GenericAlias'>, <class 'typing._Final'>, <class 'object'>)
and the copy_with function on typing._GenericAlias finds it's way out as thing to be serialized as an attribute - which it isn't.
which is odd as the usage is like
get_mro(core.tracks.Pattern)
(so no typing wrappers involved).
get_origin(core.tracks.Pattern) is returning
typing.Pattern
which is what I imagine is wha's going awry. Given it looks like a typish bug I'll report over there too.