Skip to content

default_app_config application variable is deprecated in Django 3.2 #7481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

smithdc1
Copy link
Contributor

default_app_config is deprecated in Django 3.2.

https://code.djangoproject.com/ticket/31180

@xordoquy
Copy link
Collaborator

My feeling here is: let's not haste here as we still support Django < 3.2 and I have no idea of possible side effects of this removal on projects.

Copy link
Member

@rpkilby rpkilby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be conditioned on a version check.

if django.VERSION < (3, 2):
    default_app_config = 'rest_framework.apps.RestFrameworkConfig'

@rpkilby
Copy link
Member

rpkilby commented Aug 17, 2020

possible side effects of this removal on projects.

It looks like Django defaults to AppConfig.

If there is no default_app_config, Django uses the base AppConfig class.

We don't leverage many app config features, so the side effects would be that we'd lose our verbose app names and the one system check.

Copy link
Member

@rpkilby rpkilby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a minor issue that broke the package docstring but otherwise 👍

@smithdc1
Copy link
Contributor Author

smithdc1 commented Sep 3, 2020

Squashed and rebased this change.

@xordoquy
Copy link
Collaborator

xordoquy commented Oct 6, 2020

Shouldn't there also be something like DefaultConfig = RestFrameworkConfig in the apps.py ?

@carltongibson
Copy link
Collaborator

If there's only a single class, that'll be used as the default. (IIRC 🙂)

@xordoquy
Copy link
Collaborator

xordoquy commented Oct 6, 2020

Indeed, that's what I understand from django/django@3f2821a

@xordoquy xordoquy merged commit ebc1ebf into encode:master Oct 6, 2020
@smithdc1 smithdc1 deleted the app-config branch October 9, 2020 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants