From 5211f48ae3cc0d87a260dbf5c3ab8bdae664c4b6 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 4 May 2010 14:00:30 +0000 Subject: [PATCH] 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 --- django/contrib/admin/actions.py | 4 - django/contrib/admin/options.py | 4 - django/contrib/admin/sites.py | 4 - django/contrib/admin/views/decorators.py | 2 +- django/contrib/admin/views/main.py | 5 - django/contrib/auth/backends.py | 5 - django/contrib/auth/decorators.py | 2 +- django/contrib/formtools/utils.py | 2 +- django/contrib/localflavor/br/forms.py | 5 - django/contrib/messages/storage/fallback.py | 5 - django/core/cache/backends/locmem.py | 2 +- django/core/management/base.py | 5 - django/core/management/sql.py | 5 - django/core/serializers/json.py | 6 +- django/core/urlresolvers.py | 6 - django/db/backends/creation.py | 5 - django/db/backends/oracle/base.py | 5 +- django/db/backends/sqlite3/base.py | 2 +- django/db/backends/util.py | 6 +- django/db/models/fields/__init__.py | 2 +- django/db/models/options.py | 4 - django/db/transaction.py | 2 +- django/dispatch/dispatcher.py | 4 - django/forms/models.py | 5 - django/template/defaultfilters.py | 9 +- django/template/defaulttags.py | 3 +- django/test/simple.py | 8 - django/utils/_decimal.py | 3079 ----------------- django/utils/decorators.py | 2 +- django/utils/encoding.py | 7 +- django/utils/functional.py | 8 +- django/utils/itercompat.py | 58 +- django/views/decorators/cache.py | 2 +- django/views/decorators/csrf.py | 2 +- django/views/decorators/http.py | 2 +- django/views/decorators/vary.py | 2 +- tests/modeltests/aggregation/models.py | 10 +- tests/modeltests/basic/models.py | 12 - tests/modeltests/model_formsets/models.py | 5 - tests/modeltests/or_lookups/models.py | 5 - tests/modeltests/serializers/models.py | 6 +- .../management/commands/app_command.py | 5 - .../management/commands/base_command.py | 5 - .../management/commands/label_command.py | 5 - .../management/commands/noargs_command.py | 5 - .../aggregation_regress/models.py | 5 - tests/regressiontests/decorators/tests.py | 2 +- tests/regressiontests/defaultfilters/tests.py | 6 - tests/regressiontests/forms/extra.py | 5 +- tests/regressiontests/forms/fields.py | 6 +- tests/regressiontests/forms/forms.py | 5 +- tests/regressiontests/forms/widgets.py | 5 +- tests/regressiontests/model_fields/models.py | 5 - tests/regressiontests/model_fields/tests.py | 7 +- .../model_inheritance_regress/models.py | 6 - tests/regressiontests/queries/models.py | 12 +- tests/regressiontests/utils/itercompat.py | 15 - tests/regressiontests/utils/tests.py | 9 - tests/runtests.py | 6 - 59 files changed, 32 insertions(+), 3399 deletions(-) delete mode 100644 django/utils/_decimal.py delete mode 100644 tests/regressiontests/utils/itercompat.py diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py index 69374626cc..b75c91b75a 100644 --- a/django/contrib/admin/actions.py +++ b/django/contrib/admin/actions.py @@ -12,10 +12,6 @@ from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.text import capfirst from django.utils.translation import ugettext_lazy, ugettext as _ -try: - set -except NameError: - from sets import Set as set # Python 2.3 fallback def delete_selected(modeladmin, request, queryset): """ diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 6334a311da..1f8ff6dbd1 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -23,10 +23,6 @@ from django.utils.text import capfirst, get_text_list from django.utils.translation import ugettext as _ from django.utils.translation import ungettext, ugettext_lazy from django.utils.encoding import force_unicode -try: - set -except NameError: - from sets import Set as set # Python 2.3 fallback HORIZONTAL, VERTICAL = 1, 2 # returns the