Always check for `__dictrefoffset__` and `__weakoffset__` in `dataclasses` with slots
@sobolevn ci sta già lavorando.
Dal 9/5/2024.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.