Kaydet (Commit) bb33ee5e authored tarafından Ramiro Morales's avatar Ramiro Morales

Removed django.utils.itercompat.product() as per deprecation TL.

üst da6d303d
......@@ -5,9 +5,7 @@ these implementations if necessary.
"""
import collections
import itertools
import sys
import warnings
def is_iterable(x):
......@@ -29,8 +27,3 @@ def is_iterator(x):
if sys.version_info >= (2, 7):
return isinstance(x, collections.Iterator)
return isinstance(x, collections.Iterator) and hasattr(x, '__iter__')
def product(*args, **kwds):
warnings.warn("django.utils.itercompat.product is deprecated; use the native version instead",
DeprecationWarning, stacklevel=2)
return itertools.product(*args, **kwds)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment