Skip to content

Regression in tricky __dict__ use. #117838

Description

@felixxm

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

Activity

  1. ronaldoussoren commented on Apr 13, 2024

    @ronaldoussoren
    Contributor

    Issue #117750 is likely related to this.

  2. encukou commented on Apr 16, 2024

    @encukou
    Member

    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

  3. markshannon commented on Apr 16, 2024

    @markshannon
    Member

    Should be fixed by #117673.

  4. felixxm commented on Apr 16, 2024

    @felixxm
    ContributorAuthor

    Let me confirm 🕵️‍♂️

  5. felixxm commented on Apr 16, 2024

    @felixxm
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)release-blockertype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions