Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Open
avboag wants to merge 3 commits intopython:mainpython/cpython:mainfrom
avboag:fixing_frozen_slots_set_del_attravboag/cpython:fixing_frozen_slots_set_del_attrCopy head branch name to clipboard
Open

gh-105936: Fix frozen dataclasses with slots' __setattr__ and __delattr_ #105937
avboag wants to merge 3 commits intopython:mainpython/cpython:mainfrom
avboag:fixing_frozen_slots_set_del_attravboag/cpython:fixing_frozen_slots_set_del_attrCopy head branch name to clipboard

Conversation

@avboag
Copy link
Contributor

@avboag avboag commented Jun 20, 2023

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

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 gh-105936: Fix frozen dataclasses with slots' __setattr__ and __delattr_ Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.