Py3: Replace six.moves imports

Replace six.moves and six.StringIO/BytesIO imports with cannonical
Python 3 packages.

Note: six.moves.input behaves differently than builtin input function.
Therefore I left six.moves.input for now.

See: https://pagure.io/freeipa/issue/7715
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
Christian Heimes
2018-09-27 07:47:07 +02:00
committed by Florence Blanc-Renaud
parent 753264069f
commit 15d5e44ee8
31 changed files with 46 additions and 90 deletions

View File

@@ -23,6 +23,7 @@ Functionality for Command Line Interface.
from __future__ import print_function
import atexit
import builtins
import importlib
import logging
import textwrap
@@ -53,9 +54,6 @@ from ipalib.util import (
if six.PY3:
unicode = str
import builtins # pylint: disable=import-error
else:
import __builtin__ as builtins # pylint: disable=import-error
if six.PY2:
reload(sys) # pylint: disable=reload-builtin, undefined-variable