Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Incorrect slot check: typo in__dictoffset__ #123935

Closed
Assignees
sobolevn
Labels
3.12only security fixes3.13bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-dataclassestype-bugAn unexpected behavior, bug, or error
@sobolevn

Description

@sobolevn

Bug report

I made a typo that made it into the final code:

cpython/Lib/dataclasses.py

Lines 1211 to 1212 in00ffdf2

ifgetattr(cls,'__dictrefoffset__',-1)!=0:
slots.append('__dict__')

It should had been__dictoffset__ not__dictrefoffset__.

Fixing plan:

  • Add tests for C types with__dictoffset__, so it won't happen again :)
  • Fix the typo

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-dataclassestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp