diff options
author | Laurent Peuch <cortex@worlddomination.be> | 2020-04-30 16:08:51 +0200 |
---|---|---|
committer | Laurent Peuch <cortex@worlddomination.be> | 2020-04-30 16:08:51 +0200 |
commit | df734fc17b0f7a429bbfc028f208cb4e64445f39 (patch) | |
tree | c756f0f9e6925522fcb420516fe76bb180f90f07 /logilab | |
parent | e4e0dfe5630342b8983836fa2f038207ceeefd7c (diff) | |
download | logilab-common-df734fc17b0f7a429bbfc028f208cb4e64445f39.tar.gz |
[deprecation] 'moved' function renamed 'callable_moved'
Diffstat (limited to 'logilab')
-rw-r--r-- | logilab/common/deprecation.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/logilab/common/deprecation.py b/logilab/common/deprecation.py index 48f3202..bb7e429 100644 --- a/logilab/common/deprecation.py +++ b/logilab/common/deprecation.py @@ -255,7 +255,7 @@ def argument_renamed(old_name, new_name, version=None): @argument_renamed(old_name="modpath", new_name="module_path") @argument_renamed(old_name="objname", new_name="object_name") -def moved(module_name, object_name, version=None, stacklevel=2): +def callable_moved(module_name, object_name, version=None, stacklevel=2): """use to tell that a callable has been moved to a new module. It returns a callable wrapper, so that when its called a warning is printed @@ -279,6 +279,9 @@ def moved(module_name, object_name, version=None, stacklevel=2): return callnew +moved = callable_renamed(old_name="moved", new_function="callable_moved") + + def class_renamed(old_name, new_class, message=None, version=None): """automatically creates a class which fires a DeprecationWarning when instantiated. |