diff --git a/docs/changes.rst b/docs/changes.rst index 2dcd4e1..649e27e 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -27,6 +27,9 @@ Released: not yet **Bug fixes:** +* Fixed new Pylint issue 'deprecated-class' that is raised when importing from + collections in Python versions that do not support collections.abc yet. + **Enhancements:** **Cleanup:** diff --git a/immutable_views/_dict_view.py b/immutable_views/_dict_view.py index 0b08bb4..2e2778e 100644 --- a/immutable_views/_dict_view.py +++ b/immutable_views/_dict_view.py @@ -22,7 +22,7 @@ from collections.abc import Mapping except ImportError: # Python 2 - from collections import Mapping + from collections import Mapping # pylint: disable=deprecated-class __all__ = ['DictView'] diff --git a/immutable_views/_list_view.py b/immutable_views/_list_view.py index 3ea866c..49cbb45 100644 --- a/immutable_views/_list_view.py +++ b/immutable_views/_list_view.py @@ -20,7 +20,7 @@ from collections.abc import Sequence except ImportError: # Python 2 - from collections import Sequence + from collections import Sequence # pylint: disable=deprecated-class __all__ = ['ListView'] diff --git a/immutable_views/_set_view.py b/immutable_views/_set_view.py index fd38c8d..7573280 100644 --- a/immutable_views/_set_view.py +++ b/immutable_views/_set_view.py @@ -20,7 +20,7 @@ from collections.abc import Set except ImportError: # Python 2 - from collections import Set + from collections import Set # pylint: disable=deprecated-class __all__ = ['SetView'] diff --git a/tests/unittest/test_dict_view.py b/tests/unittest/test_dict_view.py index d0bff67..8ec273b 100755 --- a/tests/unittest/test_dict_view.py +++ b/tests/unittest/test_dict_view.py @@ -24,6 +24,7 @@ from collections.abc import KeysView, ValuesView, ItemsView, Iterator, \ MutableMapping, Mapping except ImportError: + # pylint: disable=deprecated-class from collections import KeysView, ValuesView, ItemsView, Iterator, \ MutableMapping, Mapping import pytest diff --git a/tests/unittest/test_list_view.py b/tests/unittest/test_list_view.py index 1658b26..74c4ea5 100644 --- a/tests/unittest/test_list_view.py +++ b/tests/unittest/test_list_view.py @@ -23,6 +23,7 @@ from collections.abc import Sequence, MutableSequence except ImportError: # Python 2 + # pylint: disable=deprecated-class from collections import Sequence, MutableSequence import pytest from nocaselist import NocaseList diff --git a/tests/unittest/test_set_view.py b/tests/unittest/test_set_view.py index 9d55e21..0120a67 100644 --- a/tests/unittest/test_set_view.py +++ b/tests/unittest/test_set_view.py @@ -23,6 +23,7 @@ from collections.abc import Set, MutableSet except ImportError: # Python 2 + # pylint: disable=deprecated-class from collections import Set, MutableSet import pytest