#33889: Error in admin.site.register on pypy3.8 Django 4.1 and main ------------------------------------------+------------------------ Reporter: Hasan Ramezani | Owner: nobody Type: Bug | Status: new Component: contrib.admin | Version: dev Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ------------------------------------------+------------------------ I tried to [https://github.com/jazzband/django-axes/pull/910 include Django 4.1 in django-axes]. then I noticed the CI fails on [https://github.com/jazzband/django- axes/runs/7653550763?check_suite_focus=true Django 4.1] and [https://github.com/jazzband/django- axes/runs/7653551446?check_suite_focus=true Django main] with the following error:
{{{ File "/home/runner/work/django-axes/django- axes/.tox/pypy38-djmain/lib/pypy3.8/site- packages/django/contrib/auth/admin.py", line 29, in <module> class GroupAdmin(admin.ModelAdmin): File "/home/runner/work/django-axes/django- axes/.tox/pypy38-djmain/lib/pypy3.8/site- packages/django/contrib/admin/decorators.py", line 102, in _model_admin_wrapper raise ValueError("site must subclass AdminSite") ValueError: site must subclass AdminSite }}} It seems the error comes from [https://github.com/django/django/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/contrib/admin/decorators.py#L101 register decorator] I've checked it and found this introduced after https://github.com/django/django/commit/97d7990abde3fe4b525ae83958fd0b52d6a1d13f It seems the `if not isinstance(admin_site, AdminSite):` returns `False` after this change. -- Ticket URL: <https://code.djangoproject.com/ticket/33889> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070182645fd772-61549fe3-a563-4e2b-a546-14e57c915e7e-000000%40eu-central-1.amazonses.com.