Closed
Description
Bug report
Bug description:
from dataclasses import dataclass
@dataclass(frozen=True, slots=True)
class Foo[T]:
pass
foo = Foo() # this line works
foo = Foo[int]() # this one does not
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.12/typing.py", line 1142, in __call__
result.__orig_class__ = self
^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 5, in __setattr__
TypeError: super(type, obj): obj must be an instance or subtype of type
Python 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)]
CPython versions tested on:
3.12
Operating systems tested on:
Linux