summaryrefslogtreecommitdiff
path: root/django/utils/functional.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-05-04 14:00:30 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-05-04 14:00:30 +0000
commit5211f48ae3cc0d87a260dbf5c3ab8bdae664c4b6 (patch)
tree2b50ac06dd30395e53e7649d2a813927ccaeed94 /django/utils/functional.py
parent7202eb8e3194c6d9c52780526871018205bd0858 (diff)
Fixed #12164 -- Removed the Python 2.3 compatibility imports and workarounds. Thanks to timo and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/functional.py')
-rw-r--r--django/utils/functional.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 4b070f0ed4..ccfbcb0250 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -60,9 +60,6 @@ def curry(_curried_func, *args, **kwargs):
# Summary of changes made to the Python 2.5 code below:
# * swapped ``partial`` for ``curry`` to maintain backwards-compatibility
# in Django.
-# * Wrapped the ``setattr`` call in ``update_wrapper`` with a try-except
-# block to make it compatible with Python 2.3, which doesn't allow
-# assigning to ``__name__``.
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software Foundation.
# All Rights Reserved.
@@ -90,10 +87,7 @@ def update_wrapper(wrapper,
function (defaults to functools.WRAPPER_UPDATES)
"""
for attr in assigned:
- try:
- setattr(wrapper, attr, getattr(wrapped, attr))
- except TypeError: # Python 2.3 doesn't allow assigning to __name__.
- pass
+ setattr(wrapper, attr, getattr(wrapped, attr))
for attr in updated:
getattr(wrapper, attr).update(getattr(wrapped, attr))
# Return the wrapper so this can be used as a decorator via curry()