Always check for `__dictrefoffset__` and `__weakoffset__` in `dataclasses` with slots
オープン
@sobolevn がすでに取り組んでいます。
2024年5月9日 から。
stdlib
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
See https://github.com/python/cpython/pull/118099#discussion_r1575244611 and https://github.com/python/cpython/issues/118033
We now correctly check for __dictoffset__ and __weakoffset__ on C types without __slots__ defined: https://github.com/python/cpython/blob/c68acb1384a51eb745f572687eaf677371b9e765/Lib/dataclasses.py#L1201-L1212
But, not in this case: https://github.com/python/cpython/blob/c68acb1384a51eb745f572687eaf677371b9e765/Lib/dataclasses.py#L1213-L1218
So, in theory there might be C types with __slots__ and __dictoffset__ and __weakoffset__.
I will investigate!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。