Closed mtitov closed 1 year ago
@andre-merzky this issue is about that corresponding method __getstate__
is not picked from the base class dict
.
When TypedDict
was introduced it wasn't inherited from any class, thus it had (and currently has) the following __getattr__
method
https://github.com/radical-cybertools/radical.utils/blob/69d2a2266226bde869909d197a401393c94c91a7/src/radical/utils/typeddict.py#L263-L270
But original Munch
was inherited from DictMixin
and thus had __getattr__
method
https://github.com/radical-cybertools/radical.utils/blob/d00925de1e569121cc82c5029f0d05b8536994bd/src/radical/utils/munch.py#L155-L165
After we made TypedDict
inherited from dict
, method __getattr__
wasn't updated
should we just add
if k.startswith('__'):
return object.__getattribute__(self, k)
?
Yep, thanks - added that. A special handling for _data
was needed also though - please have a look if that works for you (#378)
traceback from the original issue