[issue35540] dataclasses.asdict breaks with defaultdict fields

2018-12-19 Thread Will T
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

[issue32873] Pickling of typing types

2018-04-04 Thread Will T
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

[issue32162] typing.Generic breaks __init_subclass__

2018-04-02 Thread Will T
Will T added the comment: Done: https://bugs.python.org/issue33207 - thanks for the quick response! -- ___ Python tracker <https://bugs.python.org/issue32

[issue33207] typing.Generic does not correctly call super().__init_subclass__

2018-04-02 Thread Will T
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

[issue32162] typing.Generic breaks __init_subclass__

2018-04-02 Thread Will T
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