Bug report
Bug description:
On Python 3.14, this code:
defmaker():
ifFalse:
__class__=42defmethod(self):
return__class__returnmethodfromdataclassesimportdataclass@dataclass(slots=True)classX:
a: intmeth=maker()
Fails with ValueError: Cell is empty, because some dataclasses machinery for updating the __class__ cell doesn't reckon with the possibility that the cell may be empty.
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
macOS
Linked PRs
Bug report
Bug description:
On Python 3.14, this code:
Fails with
ValueError: Cell is empty, because some dataclasses machinery for updating the__class__cell doesn't reckon with the possibility that the cell may be empty.CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
macOS
Linked PRs