From aba9763b5117494ca1ef1e420397e3845ad5b262 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 5 Feb 2018 08:42:47 -0800 Subject: Refs #28814 -- Imported from collections.abc to fix Python 3.7 deprecation warnings. https://bugs.python.org/issue25988 --- tests/lookup/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index 0161782dbe..7d7216777c 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -1,4 +1,4 @@ -import collections +import collections.abc from datetime import datetime from math import ceil from operator import attrgetter @@ -99,7 +99,7 @@ class LookupTests(TestCase): def test_iterator(self): # Each QuerySet gets iterator(), which is a generator that "lazily" # returns results using database-level iteration. - self.assertIsInstance(Article.objects.iterator(), collections.Iterator) + self.assertIsInstance(Article.objects.iterator(), collections.abc.Iterator) self.assertQuerysetEqual( Article.objects.iterator(), -- cgit v1.3