diff --git a/cytoolz/compatibility.py b/cytoolz/compatibility.py deleted file mode 100644 index 28bef91..0000000 --- a/cytoolz/compatibility.py +++ /dev/null @@ -1,30 +0,0 @@ -import warnings -warnings.warn("The toolz.compatibility module is no longer " - "needed in Python 3 and has been deprecated. Please " - "import these utilities directly from the standard library. " - "This module will be removed in a future release.", - category=DeprecationWarning, stacklevel=2) - -import operator -import sys - -PY3 = sys.version_info[0] > 2 -PY34 = sys.version_info[0] == 3 and sys.version_info[1] == 4 -PYPY = hasattr(sys, 'pypy_version_info') and PY3 - -__all__ = ('map', 'filter', 'range', 'zip', 'reduce', 'zip_longest', - 'iteritems', 'iterkeys', 'itervalues', 'filterfalse', - 'PY3', 'PY34', 'PYPY') - - -map = map -filter = filter -range = range -zip = zip -from functools import reduce -from itertools import zip_longest -from itertools import filterfalse -iteritems = operator.methodcaller('items') -iterkeys = operator.methodcaller('keys') -itervalues = operator.methodcaller('values') -from collections.abc import Sequence diff --git a/cytoolz/tests/test_compatibility.py b/cytoolz/tests/test_compatibility.py deleted file mode 100644 index fe3768a..0000000 --- a/cytoolz/tests/test_compatibility.py +++ /dev/null @@ -1,9 +0,0 @@ -import pytest -import importlib - -def test_compat_warn(): - with pytest.warns(DeprecationWarning): - # something else is importing this, - import cytoolz.compatibility - # reload to be sure we warn - importlib.reload(cytoolz.compatibility) diff --git a/pyproject.toml b/pyproject.toml index cfb78d1..012a405 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,5 +104,4 @@ addopts = [ log_cli_level = "info" filterwarnings = [ "error", - "ignore:The toolz.compatibility module is no longer needed:DeprecationWarning:", ]