RFE: @dataclasses.dataclass(slots=True) doesn't support methods using zero-arg super()
| BPO | 46404 |
|---|---|
| Nosy | @vstinner, @ericvsmith, @encukou, @ericsnowcurrently, @hynek, @Tinche, @frenzymadness, @sweeneyde |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None closed_at = None created_at = <Date 2022-01-16.22:48:06.738> labels = ['interpreter-core', 'type-feature', '3.11'] title = "RFE: @dataclasses.dataclass(slots=True) doesn't support methods using closures" updated_at = <Date 2022-03-28.15:16:37.392> user = 'https://github.com/Tinche'
bugs.python.org fields:
activity = <Date 2022-03-28.15:16:37.392> actor = 'vstinner' assignee = 'none' closed = False closed_date = None closer = None components = ['Interpreter Core'] creation = <Date 2022-01-16.22:48:06.738> creator = 'tinchester' dependencies = [] files = [] hgrepos = [] issue_num = 46404 keywords = [] message_count = 8.0 messages = ['410730', '410745', '411462', '415291', '415300', '415303', '416169', '416174'] nosy_count = 8.0 nosy_names = ['vstinner', 'eric.smith', 'petr.viktorin', 'eric.snow', 'hynek', 'tinchester', 'frenzy', 'Dennis Sweeney'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue46404' versions = ['Python 3.11']
Linked PRs
- gh-90562: Update __class__ in function closures for dataclasses with slots=True #104038
- gh-90562: Mention slots pitfall in dataclass docs #107391
- gh-90562: Fix
super()without args calls fordataclasseswith slots #111538 - [3.13] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) #119350
- [3.12] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) #119351
- gh-90562: Support zero argument super with dataclasses when slots=True #124455
- gh-90562: Improve zero argument support for
super()in dataclasses whenslots=True#124692