[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

Wojciech Łopata report at bugs.python.org
Mon Jan 27 07:46:43 EST 2020


Wojciech Łopata <wlopata at gmail.com> added the comment:

I thought of this behaviour as a bug, because PEP 563 mentions breaking  "applications depending on arbitrary objects to be directly present in annotations", while it is also breaking users of dataclasses.fields(), that is a part of the standard library. But if it's not something worth fighting for, feel free to close this issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39442>
_______________________________________


More information about the Python-bugs-list mailing list