1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +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

@@ -12,12 +12,6 @@ from django.db import models, DEFAULT_DB_ALIAS
from django.db.models import Count
from django.db.models.query import Q, ITER_CHUNK_SIZE, EmptyQuerySet
# Python 2.3 doesn't have sorted()
try:
sorted
except NameError:
from django.utils.itercompat import sorted
class DumbCategory(models.Model):
pass
@@ -1279,12 +1273,12 @@ True
"""}
# In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__
# In Python 2.6 beta releases, exceptions raised in __len__
# are swallowed (Python issue 1242657), so these cases return an empty list,
# rather than raising an exception. Not a lot we can do about that,
# unfortunately, due to the way Python handles list() calls internally. Thus,
# we skip the tests for Python 2.3 and 2.6.
if (2, 4) <= sys.version_info < (2, 6):
# we skip the tests for Python 2.6.
if sys.version_info < (2, 6):
__test__["API_TESTS"] += """
# If you're not careful, it's possible to introduce infinite loops via default
# ordering on foreign keys in a cycle. We detect that.