1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

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
This commit is contained in:
Russell Keith-Magee
2010-05-04 14:00:30 +00:00
parent 7202eb8e31
commit 5211f48ae3
59 changed files with 32 additions and 3399 deletions

View File

@@ -1,17 +1,12 @@
"""Default variable filters."""
import re
try:
from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
except ImportError:
from django.utils._decimal import Decimal, InvalidOperation, ROUND_HALF_UP
from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
import random as random_module
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.3, 2.4 fallback.
from django.utils.functional import wraps # Python 2.4 fallback.
from django.template import Variable, Library
from django.conf import settings

View File

@@ -2,7 +2,7 @@
import sys
import re
from itertools import cycle as itertools_cycle
from itertools import groupby, cycle as itertools_cycle
from django.template import Node, NodeList, Template, Context, Variable
from django.template import TemplateSyntaxError, VariableDoesNotExist, BLOCK_TAG_START, BLOCK_TAG_END, VARIABLE_TAG_START, VARIABLE_TAG_END, SINGLE_BRACE_START, SINGLE_BRACE_END, COMMENT_TAG_START, COMMENT_TAG_END
@@ -10,7 +10,6 @@ from django.template import get_library, Library, InvalidTemplateLibrary
from django.template.smartif import IfParser, Literal
from django.conf import settings
from django.utils.encoding import smart_str, smart_unicode
from django.utils.itercompat import groupby
from django.utils.safestring import mark_safe
register = Library()