summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-08-01 19:27:58 +0000
committerJason Kirtland <jek@discorporate.us>2007-08-01 19:27:58 +0000
commit963087faf48b42e2885e9132c1be1c1f1b4d18ef (patch)
tree6030210064175f6daa6e4a65f31798aeb1a9a15d
parent91a5e9dc8a8e8757bc282a1d28662ad4d463d7d9 (diff)
downloadsqlalchemy-963087faf48b42e2885e9132c1be1c1f1b4d18ef.tar.gz
Don't set __name__ on py 2.3
-rw-r--r--lib/sqlalchemy/util.py6
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