New submission from Will T :
_asdict_inner attempts to manually recursively deepcopy dicts by calling
type(obj) with a generator of transformed keyvalue tuples @
https://github.com/python/cpython/blob/b2f642ccd2f65d2f3bf77bbaa103dd2bc2733734/Lib/dataclasses.py#L1080
. defaultdicts are dicts
Will T added the comment:
I believe I hit a bug with this fix (just pulled the code a few min ago):
In [10]: pickle.loads(pickle.dumps(typing.List))
Out[10]: typing.List
In [11]: pickle.loads(pickle.dumps(typing.FrozenSet
Will T added the comment:
Done: https://bugs.python.org/issue33207 - thanks for the quick response!
--
___
Python tracker
<https://bugs.python.org/issue32
New submission from Will T :
Per the docs (
https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ )
this should be chain-calling super but currently doesn't, and thus breaks base
classes listed after it which depend on this functionality. Attached a test for
a
Will T added the comment:
I believe I'm experiencing a related bug in the new (3.7) version
unfortunately. The current version of typing.Generic.__init_subclass__ isn't
chaining to super(Generic, cls).__init_subclass__, meaning Generic's position
in class bases can prevent s