Message 370037 - Python tracker (original) (raw)

To my knowledge, dataclasses works with from __future__ import annotations. If there are specific examples of problems, I'd like to hear about it: please open a separate issue.

There is a hack (discussed at PyCon 2018 with all of the relevant players) where it avoids importing typing to look at typing.ClassVar, but I think that code is all correct. Maybe I should just bite the bullet and import typing, since I believe importing it is faster than it used to be.