Opened 3 weeks ago

Last modified 3 weeks ago

#35418 new Cleanup/optimization

ValueError: site must subclass AdminSite

Reported by: Lily Foote Owned by: nobody
Component: Utilities Version: 5.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In https://code.djangoproject.com/ticket/28358#comment:13 it was reported that running tests with Django, PyPy and Coverage would fail with a ValueError: site must subclass AdminSite exception. This can also be triggered on CPython when running Coverage in pure python mode. There are upstream tickets for Coverage, PyPy and CPython, but these are not seeing much progress. A small change to Django to workaround this was proposed in https://code.djangoproject.com/ticket/28358#comment:21, but this never landed: https://github.com/django/django/pull/16541

I think we should land the workaround in Django so this isn't an issue even if upstream never finds a fix.

Change History (1)

comment:1 by Sarah Boyce, 3 weeks ago

Component: UncategorizedUtilities
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Hey Lily, thank you for creating this ticket and summarizing the current situation, including the update of the PyPy bug link.
This is a tricky one - tentatively accepting to track further investigation of a workaround. A fix in CPython or PyPy sounds preferable and if these start progressing, this will likely be closed as a wontfix.
But discussed with Natalia, and we're happy to look at a PR proposing the mentioned workaround (a test would also be needed, which from comments in #28358 that may be challenging).

Note: See TracTickets for help on using tickets.
Back to Top