8000 Remove default_app_config with change to only support Django 3.2+ by phillipuniverse · Pull Request #1741 · django-extensions/django-extensions · GitHub
[go: up one dir, main page]

Skip to content

Remove default_app_config with change to only support Django 3.2+ #1741

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
Sep 6, 2022

Conversation

phillipuniverse
Copy link
Contributor

This is the correct fix from the change at 7b2e0d7#r78148010. Related to Django 3.2 minimum requirements added at #1730.

Also fixes deprecation warnings like:

[2022-07-11T23:05:36.932Z] Traceback (most recent call last):
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/bin/pytest", line 8, in <module>
[2022-07-11T23:05:36.932Z]     sys.exit(console_main())
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 187, in console_main
[2022-07-11T23:05:36.932Z]     code = main()
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 145, in main
[2022-07-11T23:05:36.932Z]     config = _prepareconfig(args, plugins)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 324, in _prepareconfig
[2022-07-11T23:05:36.932Z]     config = pluginmanager.hook.pytest_cmdline_parse(
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
[2022-07-11T23:05:36.932Z]     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
[2022-07-11T23:05:36.932Z]     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 55, in _multicall
[2022-07-11T23:05:36.932Z]     gen.send(outcome)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/helpconfig.py", line 102, in pytest_cmdline_parse
[2022-07-11T23:05:36.932Z]     config: Config = outcome.get_result()
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
[2022-07-11T23:05:36.932Z]     raise ex[1].with_traceback(ex[2])
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
[2022-07-11T23:05:36.932Z]     res = hook_impl.function(*args)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1016, in pytest_cmdline_parse
[2022-07-11T23:05:36.932Z]     self.parse(args)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1304, in parse
[2022-07-11T23:05:36.932Z]     self._preparse(args, addopts=addopts)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1206, in _preparse
[2022-07-11T23:05:36.932Z]     self.hook.pytest_load_initial_conftests(
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
[2022-07-11T23:05:36.932Z]     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
[2022-07-11T23:05:36.932Z]     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
[2022-07-11T23:05:36.932Z]     return outcome.get_result()
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
[2022-07-11T23:05:36.932Z]     raise ex[1].with_traceback(ex[2])
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
[2022-07-11T23:05:36.932Z]     res = hook_impl.function(*args)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pytest_django/plugin.py", line 353, in pytest_load_initial_conftests
[2022-07-11T23:05:36.932Z]     _setup_django()
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/pytest_django/plugin.py", line 236, in _setup_django
[2022-07-11T23:05:36.932Z]     django.setup()
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/
8000
site-packages/django/__init__.py", line 24, in setup
[2022-07-11T23:05:36.932Z]     apps.populate(settings.INSTALLED_APPS)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
[2022-07-11T23:05:36.932Z]     app_config = AppConfig.create(entry)
[2022-07-11T23:05:36.932Z]   File "/opt/pysetup/.venv/lib/python3.10/site-packages/django/apps/config.py", line 189, in create
[2022-07-11T23:05:36.932Z]     warnings.warn(message, RemovedInDjango41Warning, stacklevel=2)
[2022-07-11T23:05:36.932Z] django.utils.deprecation.RemovedInDjango41Warning: 'django_extensions' defines default_app_config = 'django_extensions.apps.DjangoExtensionsConfig'. Django now detects this configuration automatically. You can remove default_app_config.

Copy link
Contributor
@blueyed blueyed left a comment

Choose a reason for hiding this comment

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

Thanks!

See also 7b2e0d7#r78271539 for a missing piece.

@ulgens
Copy link
Contributor
ulgens commented Jul 12, 2022

@blueyed @phillipuniverse default_app_config search in the repo returns 3 results: https://github.com/django-extensions/django-extensions/search?q=default_app_config I believe all of them (one of them is not mentioned) should be removed.

@phillipuniverse
Copy link
Contributor Author

@blueyed @ulgens done

@phillipuniverse
Copy link
Contributor Author

@ulgens I fixed the pragma linting, everything should be GTG now.

@bigshoesdev
Copy link

Hello, guys, @phillipuniverse , @ulgens

Thanks for supporting this.

When do you think we could merge this and deploy?

I am upgrading the django into 3.2 and stuck by this one when I run the pytest.

Thanks

@ulgens
Copy link
Contributor
ulgens commented Jul 25, 2022

I gave my approval but i don't have permission to merge.

@phillipuniverse
Copy link
Contributor Author

@bigshoesdev nothing more I can do on my side, this is the fix but a maintainer needs to approve the workflow and ultimately merge.

@ulgens
Copy link
Contributor
ulgens commented Sep 4, 2022

@trbs ping 👋🏻

@trbs trbs merged commit 583d2bf into django-extensions:main Sep 6, 2022
@trbs
Copy link
Member
trbs commented Sep 6, 2022

Thanks !

@phillipuniverse phillipuniverse deleted the patch-1 branch September 6, 2022 12:50
@ulgens
Copy link
Contributor
ulgens commented Sep 7, 2022

@trbs I think this was the last blocker for a new release with Django 4 support. Is there a plan for that release? If so, can we help?

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
0