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 frenzy
Recipients Dennis Sweeney, eric.smith, eric.snow, frenzy, hynek, petr.viktorin, tinchester
Date 2022-03-15.22:50:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647384614.07.0.194576492303.issue46404@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2022-03-15 22:50:14frenzysetrecipients: + frenzy, eric.smith, petr.viktorin, eric.snow, hynek, tinchester, Dennis Sweeney
2022-03-15 22:50:14frenzysetmessageid: <1647384614.07.0.194576492303.issue46404@roundup.psfhosted.org>
2022-03-15 22:50:14frenzylinkissue46404 messages
2022-03-15 22:50:13frenzycreate