#33196: AppConfig.label identifier enforcement unnecessarily complicates upgrades for some apps ------------------------------------------------+------------------------ Reporter: Simon Weber | Owner: nobody Type: Cleanup/optimization | Status: new Component: Core (Other) | Version: 3.2 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 | ------------------------------------------------+------------------------ [https://code.djangoproject.com/ticket/32285 #32285] introduced a new ImproperlyConfigured exception when an app label isn't a valid python identifier. This was intended to prevent confusion caused by periods in app labels.
But, this also prevents using app labels containing things like hyphens, which seem to still work fine when the check is removed. There's a few mentions online where this has caused surprises, such as for [https://github.com/FortAwesome/Font-Awesome/issues/17801 fontawesome] and [https://github.com/sehmaschine/django-grappelli/issues/957 django- greppelli]. I suspect this will get worse as we get closer to 3.1 support ending. Notably, [https://docs.djangoproject.com/en/3.2/ref/applications/#django.apps.AppConfig.label the docs] say the label //should// be an identifier, not that it //must//. So, what do you think about changing the exception to something that can be overridden, like a warning or system check? This is still a strong signal to users about the source of potential problems, but also saves a lot of pain in cases like mine -- as it stands, I'd need to update thousands of previously-working references across project source, migrations, and databases. I'd be happy to write the patch if we can agree on an approach. -- Ticket URL: <https://code.djangoproject.com/ticket/33196> 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/054.a857e62c7ea7a6f1f9dfd5c4337e834a%40djangoproject.com.