You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_PyObject_StoreInstanceAttribute assertion fails in setattr after __dict__.clear() #117750
In Fedora, we see a similar problem when trying to import django.conf.urls when building Django, but it's different. Commenting here, because @encukou asked us if the debug-build assertion is the same:
Traceback (most recent call last):
File "/usr/lib/rpm/redhat/import_all_modules.py", line 171, in <module>
main()
~~~~^^
File "/usr/lib/rpm/redhat/import_all_modules.py", line 167, in main
import_modules(modules)
~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/rpm/redhat/import_all_modules.py", line 100, in import_modules
importlib.import_module(module)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/lib64/python3.13/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1020, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/conf/urls/__init__.py", line 1, in <module>
from django.urls import include
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/urls/__init__.py", line 1, in <module>
from .base import (
...<11 lines>...
)
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/urls/base.py", line 8, in <module>
from .exceptions import NoReverseMatch, Resolver404
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/urls/exceptions.py", line 1, in <module>
from django.http import Http404
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/http/__init__.py", line 9, in <module>
from django.http.response import (
...<16 lines>...
)
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/http/response.py", line 19, in <module>
from django.core.serializers.json import DjangoJSONEncoder
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/core/serializers/__init__.py", line 23, in <module>
from django.core.serializers.base import SerializerDoesNotExist
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/core/serializers/base.py", line 9, in <module>
from django.db import models
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/db/__init__.py", line 50, in <module>
signals.request_started.connect(reset_queries)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/dispatch/dispatcher.py", line 83, in connect
if settings.configured and settings.DEBUG:
^^^^^^^^^^^^^^
File "/builddir/build/BUILDROOT/python-django-4.2.11-3.fc41.x86_64/usr/lib/python3.13/site-packages/django/conf/__init__.py", line 104, in __getattr__
val = getattr(_wrapped, name)
~~~~~~~^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'DEBUG'
python3-debug: /builddir/build/BUILD/Python-3.13.0a6/Objects/dictobject.c:7119: _PyObject_InlineValuesConsistencyCheck: Assertion `0' failed.
Activity
encukou commentedon Apr 11, 2024
Bisected to #116115
hroncok commentedon Apr 12, 2024
In Fedora, we see a similar problem when trying to import
django.conf.urlswhen building Django, but it's different. Commenting here, because @encukou asked us if the debug-build assertion is the same:hroncok commentedon Apr 12, 2024
The Django problem can be reproduced with:
GH-117750: When clearing object's dict, clear inline values but leave…
thmo commentedon Apr 15, 2024
Here's a small reproducer for the
AttributeErrorcase:Works with 3.12, fails with 3.13a06.
gvanrossum commentedon Apr 16, 2024
Fixed in main, so this can be closed.
hroncok commentedon Apr 16, 2024
The _PyObject_InlineValuesConsistencyCheck in Django is also fixed on main.
pythonGH-117750: When clearing object's dict, clear inline values but…