diff options
author | Laurent Peuch <cortex@worlddomination.be> | 2020-04-15 19:05:04 +0200 |
---|---|---|
committer | Laurent Peuch <cortex@worlddomination.be> | 2020-04-15 19:05:04 +0200 |
commit | 90a7c6ef05cbe1cae0333fa7c2529c4b63520f9b (patch) | |
tree | a76904e739af200ae123cad24a3d679f2932d8a4 /logilab | |
parent | 42389d0b7d38166f13e22fcb44c6c7bba8012eff (diff) | |
download | logilab-common-90a7c6ef05cbe1cae0333fa7c2529c4b63520f9b.tar.gz |
[fix] decorators needs to use functools.wraps
Diffstat (limited to 'logilab')
-rw-r--r-- | logilab/common/deprecation.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/logilab/common/deprecation.py b/logilab/common/deprecation.py index 3ad42d0..3cfdff0 100644 --- a/logilab/common/deprecation.py +++ b/logilab/common/deprecation.py @@ -80,6 +80,8 @@ class DeprecationManager(object): message = reason or 'The function "%s" is deprecated' if '%s' in message: message %= func.__name__ + + @wraps(func) def wrapped(*args, **kwargs): self.warn(version, message, stacklevel+1) return func(*args, **kwargs) |