justquick / django-activity-stream

Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams.
http://django-activity-stream.rtfd.io/en/latest/
BSD 3-Clause "New" or "Revised" License
2.36k stars 483 forks source link

Conditionally include 'default_app_config' to remove Django 4.x deprecation warning #498

Closed chugcup closed 2 years ago

chugcup commented 2 years ago

Django 3.2 began deprecating usage of the default_app_config value in app folders in favor of automatic AppConfig discovery. The value will be completely removed in Django 4.1.

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

This commit conditionally checks the current Django version to omit setting the default_app_config value in Django 3.2 and newer. This removes the RemovedInDjango41Warning emitted during application startup.

RemovedInDjango41Warning: 'actstream' defines default_app_config = 'actstream.apps.ActstreamConfig'. Django now detects this configuration automatically. You can remove default_app_config.

Along with changes from #497 this should eliminate all known deprecation warnings for Django 4+ in active Django releases.

justquick commented 2 years ago

thanks!