-
Notifications
You must be signed in to change notification settings - Fork 188
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
Quieten deprecation warning #400
Open
scottgigante
wants to merge
1
commit into
revsys:master
Choose a base branch
from
scottgigante:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFAULT_FILE_STORAGE isn't actually used here if the version is >=4.2, and it's triggering a deprecation warning -- this PR quietens that warning. ```pytb Traceback (most recent call last): File "/Users/scottgigante/envs/django/bin/py.test", line 8, in <module> sys.exit(console_main()) ^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() ^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/config/__init__.py", line 147, in main config = _prepareconfig(args, plugins) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/config/__init__.py", line 328, in _prepareconfig config = pluginmanager.hook.pytest_cmdline_parse( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_hooks.py", line 433, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_manager.py", line 112, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_callers.py", line 133, in _multicall teardown[0].send(outcome) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/helpconfig.py", line 103, in pytest_cmdline_parse config: Config = outcome.get_result() ^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_result.py", line 108, in get_result raise exc.with_traceback(exc.__traceback__) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_callers.py", line 80, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1075, in pytest_cmdline_parse self.parse(args) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1425, in parse self._preparse(args, addopts=addopts) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1327, in _preparse self.hook.pytest_load_initial_conftests( File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_hooks.py", line 433, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_manager.py", line 112, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_callers.py", line 155, in _multicall return outcome.get_result() ^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_result.py", line 108, in get_result raise exc.with_traceback(exc.__traceback__) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pluggy/_callers.py", line 80, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pytest_django/plugin.py", line 360, in pytest_load_initial_conftests _setup_django(early_config) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/pytest_django/plugin.py", line 236, in _setup_django django.setup() File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate app_config.ready() File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/health_check/storage/apps.py", line 10, in ready from .backends import DefaultFileStorageHealthCheck File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/health_check/storage/backends.py", line 82, in <module> class DefaultFileStorageHealthCheck(StorageHealthCheck): File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/health_check/storage/backends.py", line 84, in DefaultFileStorageHealthCheck storage = settings.DEFAULT_FILE_STORAGE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/django/utils/functional.py", line 295, in __getattribute__ value = super().__getattribute__(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/django/conf/__init__.py", line 193, in DEFAULT_FILE_STORAGE self._show_deprecation_warning( File "/Users/scottgigante/envs/django/lib/python3.11/site-packages/django/conf/__init__.py", line 174, in _show_deprecation_warning warnings.warn(message, category, stacklevel=2) django.utils.deprecation.RemovedInDjango51Warning: The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead. ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DEFAULT_FILE_STORAGE isn't actually used here if the version is >=4.2, and it's triggering a deprecation warning -- this PR quietens that warning.