Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fallback for functools.wraps #771

Merged
merged 1 commit into from Nov 28, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 1 addition & 13 deletions sympy/core/decorators.py
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