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 ulope
Recipients eric.smith, hbq1, miss-islington, ulope
Date 2021-05-06.21:34:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620336870.93.0.317223525045.issue43176@roundup.psfhosted.org>
In-reply-to
Content
@eric.smith Sure, here you go:


dataclass_empty.py:
```
from dataclasses import dataclass


@dataclass
class A:
    pass


@dataclass(frozen=True)
class B(A):
    x: int

print("42")
```

Running this on < 3.8.10:
```
$ ~/.pythonz/pythons/CPython-3.8.1/bin/python3.8 --version
Python 3.8.1

$ ~/.pythonz/pythons/CPython-3.8.1/bin/python3.8 dataclass_empty.py
42
```

And on 3.8.10:
```
$ /usr/local/opt/python@3.8/bin/python3 --version
Python 3.8.10

$ /usr/local/opt/python@3.8/bin/python3 dataclass_empty.py
Traceback (most recent call last):
  File "dataclass_empty.py", line 10, in <module>
    class B(A):
  File "/usr/local/Cellar/python@3.8/3.8.10/Frameworks/Python.framework/Versions/3.8/lib/python3.8/dataclasses.py", line 1011, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
  File "/usr/local/Cellar/python@3.8/3.8.10/Frameworks/Python.framework/Versions/3.8/lib/python3.8/dataclasses.py", line 896, in _process_class
    raise TypeError('cannot inherit frozen dataclass from a '
TypeError: cannot inherit frozen dataclass from a non-frozen one
```
History
Date User Action Args
2021-05-06 21:34:30ulopesetrecipients: + ulope, eric.smith, miss-islington, hbq1
2021-05-06 21:34:30ulopesetmessageid: <1620336870.93.0.317223525045.issue43176@roundup.psfhosted.org>
2021-05-06 21:34:30ulopelinkissue43176 messages
2021-05-06 21:34:30ulopecreate