diff --git a/openpype/lib/editorial.py b/openpype/lib/editorial.py index 18028c5f06..49220b4f15 100644 --- a/openpype/lib/editorial.py +++ b/openpype/lib/editorial.py @@ -1,7 +1,16 @@ +"""Code related to editorial utility functions was moved +to 'openpype.pipeline.editorial' please change your imports as soon as +possible. File will be probably removed in OpenPype 3.14.* +""" + import warnings import functools +class EditorialDeprecatedWarning(DeprecationWarning): + pass + + def editorial_deprecated(func): """Mark functions as deprecated. @@ -10,12 +19,13 @@ def editorial_deprecated(func): @functools.wraps(func) def new_func(*args, **kwargs): + warnings.simplefilter("always", EditorialDeprecatedWarning) warnings.warn( ( "Call to deprecated function '{}'." " Function was moved to 'openpype.pipeline.editorial'." ).format(func.__name__), - category=DeprecationWarning, + category=EditorialDeprecatedWarning, stacklevel=2 ) return func(*args, **kwargs)