Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in tricky __dict__ use. #117838

Closed
felixxm opened this issue Apr 13, 2024 · 5 comments
Closed

Regression in tricky __dict__ use. #117838

felixxm opened this issue Apr 13, 2024 · 5 comments
Labels
3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-bug An unexpected behavior, bug, or error

Comments

@felixxm
Copy link
Contributor

felixxm commented Apr 13, 2024

Bug report

Bug description:

I noticed a regression in Python 3.13.0 alpha 6. Django LazySettings started to crash because _wrapper is no longer set to the empty sentinel. I bisected this regression to the c32dc47, so it's related with the recent changes in __dict__.

Django's LazySettings and LazyObject are quite tricky. I will try to provide a small reproducer later.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

@felixxm felixxm added the type-bug An unexpected behavior, bug, or error label Apr 13, 2024
@ronaldoussoren
Copy link
Contributor

Issue #117750 is likely related to this.

@hugovk hugovk added 3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker labels Apr 13, 2024
@encukou
Copy link
Member

encukou commented Apr 16, 2024

The dict issue is fixed on main (#117808), but the Django tests now fail with another assertion added as part of the same change:

python: ./Include/internal/pycore_object.h:283: _PyObject_Init: Assertion `_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE) || _Py_IsImmortal(typeobj)' failed.

cc @markshannon

@markshannon
Copy link
Member

Should be fixed by #117673.

@felixxm
Copy link
Contributor Author

felixxm commented Apr 16, 2024

Let me confirm 🕵️‍♂️

@felixxm
Copy link
Contributor Author

felixxm commented Apr 16, 2024

It works for me 🎉 Many thanks for help 🧑‍🚒

@felixxm felixxm closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-bug An unexpected behavior, bug, or error
Projects
Development

No branches or pull requests

5 participants