- cattrs version: 23.1.2
- python version: 3.11.3
- operating system: windows 11
Description
I wanted to register an unstructure hook for an Entity type derived from the non-generic Binary protocol.
What I Did
CONVERTER.register_unstructure_hook(
Entity, make_dict_unstructure_fn(Entity, CONVERTER, client_unchecked=override(omit=True))
)
Which caused an error:
File ".../cattrs/gen/__init__.py", line 82, in make_dict_unstructure_fn
mapping = generate_mapping(cl, mapping)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../cattrs/gen/_generics.py", line 32, in generate_mapping
orig_bases = cl.__orig_bases__
^^^^^^^^^^^^^^^^^
AttributeError: type object 'Entity' has no attribute '__orig_bases__'