Lumír Balhar <frenzy.madn...@gmail.com> added the comment:

We have the same problem reported in attrs here in dataclasses and because it's 
not tested the way to manipulate __closure__ cells changes frequently.

My plan is to implement something similar to this into dataclasses: 
https://github.com/python-attrs/attrs/blob/5c040f30e3e4b3c9c0f27c8ac6ff13d604c1818c/src/attr/_make.py#L895-L916

Basically, when a new dataclass is created (with slots=True), look for 
references to the original class and fix them.

This fixes the problem reported to attrs in dataclasses and when we fix it and 
add some tests for it, the future behavior should be more stable.

What do you think?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46404>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to