diff options
| author | Tim Graham <timograham@gmail.com> | 2013-07-13 13:29:11 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-07-14 13:02:55 -0400 |
| commit | 2456ffa42c33d63b54579eae0f5b9cf2a8cd3714 (patch) | |
| tree | 06a8364994fcb6689f39cdf47b0f0372302ee2c5 /django/db/models/sql | |
| parent | 0d81fd0e5f44432cbd1efb9b0e655116427dee6e (diff) | |
Fixed #20746 -- Removed Python 2.6 specific code/docs
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/where.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py index 024b995c99..2e83ecdce4 100644 --- a/django/db/models/sql/where.py +++ b/django/db/models/sql/where.py @@ -4,6 +4,7 @@ Code to manage the creation and SQL rendering of 'where' constraints. from __future__ import absolute_import +import collections import datetime from itertools import repeat @@ -11,7 +12,6 @@ from django.conf import settings from django.db.models.fields import DateTimeField, Field from django.db.models.sql.datastructures import EmptyResultSet, Empty from django.db.models.sql.aggregates import Aggregate -from django.utils.itercompat import is_iterator from django.utils.six.moves import xrange from django.utils import timezone from django.utils import tree @@ -61,7 +61,7 @@ class WhereNode(tree.Node): if not isinstance(data, (list, tuple)): return data obj, lookup_type, value = data - if is_iterator(value): + if isinstance(value, collections.Iterator): # Consume any generators immediately, so that we can determine # emptiness and transform any non-empty values correctly. value = list(value) |
