Skip to content

Commit

Permalink
Merge pull request sympy#771 from Anxuiz/decorators-functools-wraps
Browse files Browse the repository at this point in the history
Remove fallback for functools.wraps
  • Loading branch information
goodok committed Nov 28, 2011
2 parents 0803e19 + 27794a9 commit dba5c30
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions sympy/core/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@
dependencies, so that they can be easily imported anywhere in sympy/core.
"""
from sympify import SympifyError, sympify
from functools import wraps
import warnings

try:
from functools import wraps
except ImportError:
def wraps(old_func):
"""Copy private data from ``old_func`` to ``new_func``. """
def decorate(new_func):
new_func.__dict__.update(old_func.__dict__)
new_func.__module__ = old_func.__module__
new_func.__name__ = old_func.__name__
new_func.__doc__ = old_func.__doc__
return new_func
return decorate

def deprecated(func):
"""This is a decorator which can be used to mark functions
as deprecated. It will result in a warning being emitted
Expand Down

0 comments on commit dba5c30

Please sign in to comment.