Repository navigation
Incorrect slot check: typo in __dictoffset__ #123935
Copy link
Copy link
Closed
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-dataclassestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errorstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on Sep 11, 2024 Out of curiosity... how did you find it?
I have a telegram channel, where I post different Python-related posts. Today I posted about how slots work in dataclasses. And one of my readers found this typo :)
Reacted by Bénédikt Tran and Semyon Pupkov- changed the title
[-]Incorrect slot check: typo in `__dictoffest__`[/-][+]Incorrect slot check: typo in `__dictoffset__`[/+]on Sep 11, 2024 - addedneeds backport to 3.12only security fixesonly security fixesneeds backport to 3.13only security fixesonly security fixes
on Sep 11, 2024 - added3.12only security fixesonly security fixes3.13only security fixesonly security fixesand removedneeds backport to 3.12only security fixesonly security fixesneeds backport to 3.13only security fixesonly security fixes
on Sep 11, 2024 PR merged and backported 🚀
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-dataclassestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
I made a typo that made it into the final code:
cpython/Lib/dataclasses.py
Lines 1211 to 1212 in 00ffdf2
It should had been
__dictoffset__not__dictrefoffset__.Fixing plan:
__dictoffset__, so it won't happen again :)Linked PRs
_get_slotsindataclasses.py#123941_get_slotsindataclasses.py(GH-123941) #123991_get_slotsindataclasses.py(GH-123941) #123992