diff options
author | Jason Kirtland <jek@discorporate.us> | 2007-08-01 19:27:58 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2007-08-01 19:27:58 +0000 |
commit | 963087faf48b42e2885e9132c1be1c1f1b4d18ef (patch) | |
tree | 6030210064175f6daa6e4a65f31798aeb1a9a15d /lib/sqlalchemy | |
parent | 91a5e9dc8a8e8757bc282a1d28662ad4d463d7d9 (diff) | |
download | sqlalchemy-963087faf48b42e2885e9132c1be1c1f1b4d18ef.tar.gz |
Don't set __name__ on py 2.3
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/util.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 28e5083e9..6cb65e395 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -549,7 +549,11 @@ def deprecated(func, add_deprecation_to_docstring=True): warnings.warn(logging.SADeprecationWarning("Call to deprecated function %s" % func.__name__), stacklevel=2) return func(*args, **kwargs) - func_with_warning.__name__ = func.__name__ func_with_warning.__doc__ = (add_deprecation_to_docstring and 'Deprecated.\n' or '') + func.__doc__ func_with_warning.__dict__.update(func.__dict__) + try: + func_with_warning.__name__ = func.__name__ + except TypeError: + pass + return func_with_warning |