This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ricyteach
Recipients Ricyteach, eric.smith
Date 2018-05-09.21:38:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is broken in 3.7 (both beta 3 and 4):

from __future__ import annotations
from dataclasses import dataclass
from typing import ClassVar, Any

class C():
    class_var: ClassVar[Any] = object()
    data: str


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\", line 850, in dataclass
    return wrap(_cls)
  File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\", line 842, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
  File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\", line 763, in _process_class
    else 'self',
  File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\", line 442, in _init_fn
    raise TypeError(f'non-default argument {!r} '
TypeError: non-default argument 'data' follows default argument
Date User Action Args
2018-05-09 21:38:42Ricyteachsetrecipients: + Ricyteach, eric.smith
2018-05-09 21:38:42Ricyteachsetmessageid: <>
2018-05-09 21:38:42Ricyteachlinkissue33453 messages
2018-05-09 21:38:42Ricyteachcreate