1import warnings
2warnings.warn("The toolz.compatibility module is no longer "
3              "needed in Python 3 and has been deprecated. Please "
4              "import these utilities directly from the standard library. "
5              "This module will be removed in a future release.",
6              category=DeprecationWarning, stacklevel=2)
7
8import operator
9import sys
10
11PY3 = sys.version_info[0] > 2
12PY34 = sys.version_info[0] == 3 and sys.version_info[1] == 4
13PYPY = hasattr(sys, 'pypy_version_info') and PY3
14
15__all__ = ('map', 'filter', 'range', 'zip', 'reduce', 'zip_longest',
16           'iteritems', 'iterkeys', 'itervalues', 'filterfalse',
17           'PY3', 'PY34', 'PYPY')
18
19
20map = map
21filter = filter
22range = range
23zip = zip
24from functools import reduce
25from itertools import zip_longest
26from itertools import filterfalse
27iteritems = operator.methodcaller('items')
28iterkeys = operator.methodcaller('keys')
29itervalues = operator.methodcaller('values')
30from collections.abc import Sequence
31