fix: Remove overwriting action
from @deprecated
decorator
#1389
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.
The deprecations warnings on third party packages
(which are still in compatibility mode with 3.6) are getting annoying. Therefore I have set up the following warning filter in my project:
Unfortunately it does not work, because the deprecations in the
skeleton
module are explicitly called with anaction
parameter. This in turn means that these warnings are executed in a separate context with exactly this action, all other filter conditions are overwritten or ignored.I therefore suggest setting the general filter in the
__init__
to"once"
.The module filter was wrong at this point anyway. The
module
refers to the module that calls the deprecated method,not the one that triggers the warning (my fault).
This general filter can easily be customized from a relaxed
"ignore"
to an annoying"always"
in the project.Alternatively, the
viur-core
could also use its ownDeprecationWarning
subclass so that these warnings could be filtered even more finely using the class filter.