Cleanup warning function

pull/84/head
Raphaël Vinot 2017-05-03 16:52:57 +02:00
parent 8b3d17c5d0
commit 619cb10403
1 changed files with 6 additions and 14 deletions

View File

@ -59,14 +59,6 @@ def deprecated(func):
@functools.wraps(func) @functools.wraps(func)
def new_func(*args, **kwargs): def new_func(*args, **kwargs):
if sys.version_info < (3, 0):
warnings.showwarning(
"Call to deprecated function {}.".format(func.__name__),
category=DeprecationWarning,
filename=func.func_code.co_filename,
lineno=func.func_code.co_firstlineno + 1
)
else:
warnings.showwarning( warnings.showwarning(
"Call to deprecated function {}.".format(func.__name__), "Call to deprecated function {}.".format(func.__name__),
category=DeprecationWarning, category=DeprecationWarning,