Skip to content

gh-105936: Fix frozen dataclasses with slots' __setattr__ and __delattr_ - #105937

Closed
avboag wants to merge 3 commits into
python:mainfrom
avboag:fixing_frozen_slots_set_del_attr
Closed

avboag wants to merge 3 commits into
python:mainfrom
avboag:fixing_frozen_slots_set_del_attr

Conversation

@avboag

@avboag avboag commented Jun 20, 2023 •

Copy link
Copy Markdown
Contributor

The problem was that super was called cls with the original class instead of the one generated by _add_slots.
The PR moves _add_slots to before the generation of other methods for the dataclass that enabling the use of right cls everywhere (currently _frozen_get_del_attr was the only place to be affected).

@bedevere-bot

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@Eclips4 Eclips4 changed the title Fixed frozen dataclasses with slots' __setattr__ and __delattr_ as laid out in issue gh-105936 Jan 5, 2024
@gpshead

gpshead commented Apr 13, 2026

Copy link
Copy Markdown
Member

#144021 completed this.

@gpshead gpshead closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants