pylint: Fix deprecated-class

There is no actual usage of deprecated classes for Python3.
Pylint complains about such for Python2. Since Python2 is no
longer supported these imports were removed.

Fixes: https://pagure.io/freeipa/issue/9117
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Stanislav Levin
2021-07-28 20:33:20 +03:00
committed by Rob Crittenden
parent d991245a29
commit 139f6b63b1
8 changed files with 8 additions and 61 deletions

View File

@@ -25,6 +25,7 @@ you are unfamiliar with this Python feature, see
http://docs.python.org/ref/sequence-types.html
"""
from collections.abc import Mapping
import logging
import operator
import re
@@ -51,13 +52,6 @@ from ipapython.ipa_log_manager import (
LOGGING_FORMAT_STDERR)
from ipapython.version import VERSION, API_VERSION, DEFAULT_PLUGINS
# pylint: disable=no-name-in-module, import-error
if six.PY3:
from collections.abc import Mapping
else:
from collections import Mapping
# pylint: enable=no-name-in-module, import-error
if six.PY3:
unicode = str