From 86faa96702fca94e16b4ab8600eb8d2e5cab8ecf Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 24 May 2021 11:51:09 +0800 Subject: [PATCH] pybind/mgr/dashboard: drop "from __future__ import absolute_import" since we've migrated to python3, there is no need to import absolute_import for accessing absolute import anymore. Signed-off-by: Kefu Chai --- src/pybind/mgr/dashboard/__init__.py | 1 - src/pybind/mgr/dashboard/api/__init__.py | 1 - src/pybind/mgr/dashboard/controllers/__init__.py | 1 - src/pybind/mgr/dashboard/controllers/auth.py | 1 - src/pybind/mgr/dashboard/controllers/cluster_configuration.py | 1 - src/pybind/mgr/dashboard/controllers/crush_rule.py | 1 - src/pybind/mgr/dashboard/controllers/docs.py | 2 -- src/pybind/mgr/dashboard/controllers/erasure_code_profile.py | 1 - src/pybind/mgr/dashboard/controllers/frontend_logging.py | 2 -- src/pybind/mgr/dashboard/controllers/grafana.py | 2 -- src/pybind/mgr/dashboard/controllers/health.py | 1 - src/pybind/mgr/dashboard/controllers/home.py | 1 - src/pybind/mgr/dashboard/controllers/host.py | 1 - src/pybind/mgr/dashboard/controllers/iscsi.py | 1 - src/pybind/mgr/dashboard/controllers/logs.py | 1 - src/pybind/mgr/dashboard/controllers/mgr_modules.py | 1 - src/pybind/mgr/dashboard/controllers/monitor.py | 1 - src/pybind/mgr/dashboard/controllers/nfsganesha.py | 1 - src/pybind/mgr/dashboard/controllers/orchestrator.py | 1 - src/pybind/mgr/dashboard/controllers/osd.py | 1 - src/pybind/mgr/dashboard/controllers/perf_counters.py | 1 - src/pybind/mgr/dashboard/controllers/pool.py | 1 - src/pybind/mgr/dashboard/controllers/prometheus.py | 1 - src/pybind/mgr/dashboard/controllers/rbd.py | 1 - src/pybind/mgr/dashboard/controllers/rbd_mirroring.py | 1 - src/pybind/mgr/dashboard/controllers/rgw.py | 1 - src/pybind/mgr/dashboard/controllers/role.py | 1 - src/pybind/mgr/dashboard/controllers/saml2.py | 1 - src/pybind/mgr/dashboard/controllers/settings.py | 2 -- src/pybind/mgr/dashboard/controllers/summary.py | 1 - src/pybind/mgr/dashboard/controllers/task.py | 1 - src/pybind/mgr/dashboard/controllers/telemetry.py | 1 - src/pybind/mgr/dashboard/controllers/user.py | 1 - src/pybind/mgr/dashboard/exceptions.py | 1 - src/pybind/mgr/dashboard/grafana.py | 1 - src/pybind/mgr/dashboard/module.py | 2 -- src/pybind/mgr/dashboard/plugins/__init__.py | 1 - src/pybind/mgr/dashboard/plugins/debug.py | 1 - src/pybind/mgr/dashboard/plugins/feature_toggles.py | 1 - src/pybind/mgr/dashboard/plugins/interfaces.py | 1 - src/pybind/mgr/dashboard/plugins/lru_cache.py | 1 - src/pybind/mgr/dashboard/plugins/ttl_cache.py | 1 - src/pybind/mgr/dashboard/rest_client.py | 1 - src/pybind/mgr/dashboard/security.py | 1 - src/pybind/mgr/dashboard/services/__init__.py | 1 - src/pybind/mgr/dashboard/services/access_control.py | 1 - src/pybind/mgr/dashboard/services/auth.py | 1 - src/pybind/mgr/dashboard/services/ceph_service.py | 1 - src/pybind/mgr/dashboard/services/cephfs.py | 1 - src/pybind/mgr/dashboard/services/cephx.py | 1 - src/pybind/mgr/dashboard/services/exception.py | 1 - src/pybind/mgr/dashboard/services/ganesha.py | 1 - src/pybind/mgr/dashboard/services/iscsi_cli.py | 1 - src/pybind/mgr/dashboard/services/iscsi_client.py | 1 - src/pybind/mgr/dashboard/services/iscsi_config.py | 1 - src/pybind/mgr/dashboard/services/orchestrator.py | 1 - src/pybind/mgr/dashboard/services/progress.py | 1 - src/pybind/mgr/dashboard/services/rbd.py | 1 - src/pybind/mgr/dashboard/services/rgw_client.py | 1 - src/pybind/mgr/dashboard/services/sso.py | 1 - src/pybind/mgr/dashboard/settings.py | 2 -- src/pybind/mgr/dashboard/tests/__init__.py | 1 - src/pybind/mgr/dashboard/tests/helper.py | 1 - src/pybind/mgr/dashboard/tests/test_access_control.py | 1 - src/pybind/mgr/dashboard/tests/test_api_auditing.py | 1 - src/pybind/mgr/dashboard/tests/test_ceph_service.py | 1 - src/pybind/mgr/dashboard/tests/test_controllers.py | 1 - src/pybind/mgr/dashboard/tests/test_docs.py | 1 - src/pybind/mgr/dashboard/tests/test_exceptions.py | 1 - src/pybind/mgr/dashboard/tests/test_feature_toggles.py | 1 - src/pybind/mgr/dashboard/tests/test_ganesha.py | 1 - src/pybind/mgr/dashboard/tests/test_home.py | 1 - src/pybind/mgr/dashboard/tests/test_notification.py | 1 - src/pybind/mgr/dashboard/tests/test_plugin_debug.py | 1 - src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py | 1 - src/pybind/mgr/dashboard/tests/test_rbd_service.py | 1 - src/pybind/mgr/dashboard/tests/test_settings.py | 1 - src/pybind/mgr/dashboard/tests/test_sso.py | 1 - src/pybind/mgr/dashboard/tests/test_task.py | 1 - src/pybind/mgr/dashboard/tests/test_tools.py | 1 - src/pybind/mgr/dashboard/tests/test_versioning.py | 1 - src/pybind/mgr/dashboard/tools.py | 1 - src/pybind/mgr/orchestrator/tests/test_orchestrator.py | 1 - src/pybind/mgr/restful/decorators.py | 1 - src/pybind/mgr/restful/hooks.py | 1 - src/pybind/mgr/restful/module.py | 1 - src/pybind/mgr/tests/__init__.py | 1 - 87 files changed, 93 deletions(-) diff --git a/src/pybind/mgr/dashboard/__init__.py b/src/pybind/mgr/dashboard/__init__.py index 34485327e353..cd36ecafa7ce 100644 --- a/src/pybind/mgr/dashboard/__init__.py +++ b/src/pybind/mgr/dashboard/__init__.py @@ -3,7 +3,6 @@ """ ceph dashboard module """ -from __future__ import absolute_import import os diff --git a/src/pybind/mgr/dashboard/api/__init__.py b/src/pybind/mgr/dashboard/api/__init__.py index c3961685ab8d..e69de29bb2d1 100644 --- a/src/pybind/mgr/dashboard/api/__init__.py +++ b/src/pybind/mgr/dashboard/api/__init__.py @@ -1 +0,0 @@ -from __future__ import absolute_import diff --git a/src/pybind/mgr/dashboard/controllers/__init__.py b/src/pybind/mgr/dashboard/controllers/__init__.py index ee8d3bd7bb49..2b1e9afdb131 100755 --- a/src/pybind/mgr/dashboard/controllers/__init__.py +++ b/src/pybind/mgr/dashboard/controllers/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=protected-access,too-many-branches,too-many-lines -from __future__ import absolute_import import collections import importlib diff --git a/src/pybind/mgr/dashboard/controllers/auth.py b/src/pybind/mgr/dashboard/controllers/auth.py index 2e45b7c92e18..ed219dc72b0b 100644 --- a/src/pybind/mgr/dashboard/controllers/auth.py +++ b/src/pybind/mgr/dashboard/controllers/auth.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import http.cookies import logging diff --git a/src/pybind/mgr/dashboard/controllers/cluster_configuration.py b/src/pybind/mgr/dashboard/controllers/cluster_configuration.py index 8b0829b84026..871b629ee4c2 100644 --- a/src/pybind/mgr/dashboard/controllers/cluster_configuration.py +++ b/src/pybind/mgr/dashboard/controllers/cluster_configuration.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/crush_rule.py b/src/pybind/mgr/dashboard/controllers/crush_rule.py index ea5096cca0f1..7b0c17fde07f 100644 --- a/src/pybind/mgr/dashboard/controllers/crush_rule.py +++ b/src/pybind/mgr/dashboard/controllers/crush_rule.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from cherrypy import NotFound diff --git a/src/pybind/mgr/dashboard/controllers/docs.py b/src/pybind/mgr/dashboard/controllers/docs.py index e7ed9742ab9d..77dc6f4dafee 100644 --- a/src/pybind/mgr/dashboard/controllers/docs.py +++ b/src/pybind/mgr/dashboard/controllers/docs.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - import logging from typing import Any, Dict, List, Union diff --git a/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py b/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py index 4b8264ef0bd5..a62f60c1a905 100644 --- a/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py +++ b/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from cherrypy import NotFound diff --git a/src/pybind/mgr/dashboard/controllers/frontend_logging.py b/src/pybind/mgr/dashboard/controllers/frontend_logging.py index 421e36c02e74..1d3e3cdd6255 100644 --- a/src/pybind/mgr/dashboard/controllers/frontend_logging.py +++ b/src/pybind/mgr/dashboard/controllers/frontend_logging.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging from . import BaseController, Endpoint, UiApiController diff --git a/src/pybind/mgr/dashboard/controllers/grafana.py b/src/pybind/mgr/dashboard/controllers/grafana.py index 94fe53d0f977..a92a390adee6 100644 --- a/src/pybind/mgr/dashboard/controllers/grafana.py +++ b/src/pybind/mgr/dashboard/controllers/grafana.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - from .. import mgr from ..exceptions import DashboardException from ..grafana import GrafanaRestClient, push_local_dashboards diff --git a/src/pybind/mgr/dashboard/controllers/health.py b/src/pybind/mgr/dashboard/controllers/health.py index 0ae0a5bf08b1..4e402ee65bd6 100644 --- a/src/pybind/mgr/dashboard/controllers/health.py +++ b/src/pybind/mgr/dashboard/controllers/health.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/controllers/home.py b/src/pybind/mgr/dashboard/controllers/home.py index 793b241dd755..5f9454c85cf8 100644 --- a/src/pybind/mgr/dashboard/controllers/home.py +++ b/src/pybind/mgr/dashboard/controllers/home.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/host.py b/src/pybind/mgr/dashboard/controllers/host.py index 590925ca58bf..a40890602b92 100644 --- a/src/pybind/mgr/dashboard/controllers/host.py +++ b/src/pybind/mgr/dashboard/controllers/host.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import copy import os diff --git a/src/pybind/mgr/dashboard/controllers/iscsi.py b/src/pybind/mgr/dashboard/controllers/iscsi.py index 9ee76d7a1353..1c9cd378f70d 100644 --- a/src/pybind/mgr/dashboard/controllers/iscsi.py +++ b/src/pybind/mgr/dashboard/controllers/iscsi.py @@ -2,7 +2,6 @@ # pylint: disable=C0302 # pylint: disable=too-many-branches # pylint: disable=too-many-lines -from __future__ import absolute_import import json import re diff --git a/src/pybind/mgr/dashboard/controllers/logs.py b/src/pybind/mgr/dashboard/controllers/logs.py index 97995110746f..0efd37cfefc5 100644 --- a/src/pybind/mgr/dashboard/controllers/logs.py +++ b/src/pybind/mgr/dashboard/controllers/logs.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import collections diff --git a/src/pybind/mgr/dashboard/controllers/mgr_modules.py b/src/pybind/mgr/dashboard/controllers/mgr_modules.py index b614612d0b72..e6095841ff95 100644 --- a/src/pybind/mgr/dashboard/controllers/mgr_modules.py +++ b/src/pybind/mgr/dashboard/controllers/mgr_modules.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from .. import mgr from ..security import Scope diff --git a/src/pybind/mgr/dashboard/controllers/monitor.py b/src/pybind/mgr/dashboard/controllers/monitor.py index b61fcd4f393e..986fddc7f730 100644 --- a/src/pybind/mgr/dashboard/controllers/monitor.py +++ b/src/pybind/mgr/dashboard/controllers/monitor.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/controllers/nfsganesha.py b/src/pybind/mgr/dashboard/controllers/nfsganesha.py index 91d079234e46..b2d9ae5505f0 100644 --- a/src/pybind/mgr/dashboard/controllers/nfsganesha.py +++ b/src/pybind/mgr/dashboard/controllers/nfsganesha.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import logging import os diff --git a/src/pybind/mgr/dashboard/controllers/orchestrator.py b/src/pybind/mgr/dashboard/controllers/orchestrator.py index 085870a0f4aa..a0c1d171d540 100644 --- a/src/pybind/mgr/dashboard/controllers/orchestrator.py +++ b/src/pybind/mgr/dashboard/controllers/orchestrator.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from functools import wraps diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py index 1c6b2d26aeba..ea5ccd0f809b 100644 --- a/src/pybind/mgr/dashboard/controllers/osd.py +++ b/src/pybind/mgr/dashboard/controllers/osd.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/perf_counters.py b/src/pybind/mgr/dashboard/controllers/perf_counters.py index fca8e294ef51..b9c215c000d8 100644 --- a/src/pybind/mgr/dashboard/controllers/perf_counters.py +++ b/src/pybind/mgr/dashboard/controllers/perf_counters.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from typing import Any, Dict diff --git a/src/pybind/mgr/dashboard/controllers/pool.py b/src/pybind/mgr/dashboard/controllers/pool.py index 32ec6c198f87..4fef2b975d4a 100644 --- a/src/pybind/mgr/dashboard/controllers/pool.py +++ b/src/pybind/mgr/dashboard/controllers/pool.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import time from typing import Any, Dict, Iterable, List, Optional, Union, cast diff --git a/src/pybind/mgr/dashboard/controllers/prometheus.py b/src/pybind/mgr/dashboard/controllers/prometheus.py index 09aa42663179..05b4ffc52354 100644 --- a/src/pybind/mgr/dashboard/controllers/prometheus.py +++ b/src/pybind/mgr/dashboard/controllers/prometheus.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json from datetime import datetime diff --git a/src/pybind/mgr/dashboard/controllers/rbd.py b/src/pybind/mgr/dashboard/controllers/rbd.py index 57fe06a00a65..a1fa9be3bdb8 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd.py +++ b/src/pybind/mgr/dashboard/controllers/rbd.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # pylint: disable=unused-argument # pylint: disable=too-many-statements,too-many-branches -from __future__ import absolute_import import logging import math diff --git a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py index 832c97fda978..dffc513fdaa5 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/rgw.py b/src/pybind/mgr/dashboard/controllers/rgw.py index bd395f47315a..2dc301a406bb 100644 --- a/src/pybind/mgr/dashboard/controllers/rgw.py +++ b/src/pybind/mgr/dashboard/controllers/rgw.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/role.py b/src/pybind/mgr/dashboard/controllers/role.py index 32404237c4a7..44dcef75c765 100644 --- a/src/pybind/mgr/dashboard/controllers/role.py +++ b/src/pybind/mgr/dashboard/controllers/role.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/saml2.py b/src/pybind/mgr/dashboard/controllers/saml2.py index fb8278068b1a..8939f6827243 100644 --- a/src/pybind/mgr/dashboard/controllers/saml2.py +++ b/src/pybind/mgr/dashboard/controllers/saml2.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/settings.py b/src/pybind/mgr/dashboard/controllers/settings.py index 7d9ca9fb316a..77d8eeb0ad7d 100644 --- a/src/pybind/mgr/dashboard/controllers/settings.py +++ b/src/pybind/mgr/dashboard/controllers/settings.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - from contextlib import contextmanager import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/summary.py b/src/pybind/mgr/dashboard/controllers/summary.py index 4e240b9770bd..becb91295f6a 100644 --- a/src/pybind/mgr/dashboard/controllers/summary.py +++ b/src/pybind/mgr/dashboard/controllers/summary.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/controllers/task.py b/src/pybind/mgr/dashboard/controllers/task.py index 16c5017822e3..9b477a659d20 100644 --- a/src/pybind/mgr/dashboard/controllers/task.py +++ b/src/pybind/mgr/dashboard/controllers/task.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from ..services import progress from ..tools import TaskManager diff --git a/src/pybind/mgr/dashboard/controllers/telemetry.py b/src/pybind/mgr/dashboard/controllers/telemetry.py index 0a2743d111ef..37ab98f1a56c 100644 --- a/src/pybind/mgr/dashboard/controllers/telemetry.py +++ b/src/pybind/mgr/dashboard/controllers/telemetry.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from .. import mgr from ..exceptions import DashboardException diff --git a/src/pybind/mgr/dashboard/controllers/user.py b/src/pybind/mgr/dashboard/controllers/user.py index 8d340fedccb4..dbd240f7c541 100644 --- a/src/pybind/mgr/dashboard/controllers/user.py +++ b/src/pybind/mgr/dashboard/controllers/user.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import time from datetime import datetime diff --git a/src/pybind/mgr/dashboard/exceptions.py b/src/pybind/mgr/dashboard/exceptions.py index 8857c423cc4e..96cbc5233561 100644 --- a/src/pybind/mgr/dashboard/exceptions.py +++ b/src/pybind/mgr/dashboard/exceptions.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import class ViewCacheNoDataException(Exception): diff --git a/src/pybind/mgr/dashboard/grafana.py b/src/pybind/mgr/dashboard/grafana.py index 2ba28fbeb6f4..6e3ae5a221bf 100644 --- a/src/pybind/mgr/dashboard/grafana.py +++ b/src/pybind/mgr/dashboard/grafana.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index c8e5ba4020a1..4fa6d8163d37 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -2,8 +2,6 @@ """ ceph dashboard mgr plugin (based on CherryPy) """ -from __future__ import absolute_import - import collections import errno import logging diff --git a/src/pybind/mgr/dashboard/plugins/__init__.py b/src/pybind/mgr/dashboard/plugins/__init__.py index 6cd03fa95385..edc0b65946bd 100644 --- a/src/pybind/mgr/dashboard/plugins/__init__.py +++ b/src/pybind/mgr/dashboard/plugins/__init__.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import abc diff --git a/src/pybind/mgr/dashboard/plugins/debug.py b/src/pybind/mgr/dashboard/plugins/debug.py index 8eb2bb1e6da0..da5a4fb9577a 100644 --- a/src/pybind/mgr/dashboard/plugins/debug.py +++ b/src/pybind/mgr/dashboard/plugins/debug.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json from enum import Enum diff --git a/src/pybind/mgr/dashboard/plugins/feature_toggles.py b/src/pybind/mgr/dashboard/plugins/feature_toggles.py index ea50652346a4..8dc865096a45 100644 --- a/src/pybind/mgr/dashboard/plugins/feature_toggles.py +++ b/src/pybind/mgr/dashboard/plugins/feature_toggles.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from enum import Enum from typing import List, Optional diff --git a/src/pybind/mgr/dashboard/plugins/interfaces.py b/src/pybind/mgr/dashboard/plugins/interfaces.py index 9c050074f7da..0c106d2617cc 100644 --- a/src/pybind/mgr/dashboard/plugins/interfaces.py +++ b/src/pybind/mgr/dashboard/plugins/interfaces.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from . import PLUGIN_MANAGER as PM # pylint: disable=cyclic-import from . import Interface, Mixin diff --git a/src/pybind/mgr/dashboard/plugins/lru_cache.py b/src/pybind/mgr/dashboard/plugins/lru_cache.py index 9b29a6012447..4d8fc27b34a8 100644 --- a/src/pybind/mgr/dashboard/plugins/lru_cache.py +++ b/src/pybind/mgr/dashboard/plugins/lru_cache.py @@ -4,7 +4,6 @@ This is a minimal implementation of lru_cache function. Based on Python 3 functools and backports.functools_lru_cache. """ -from __future__ import absolute_import from collections import OrderedDict from functools import wraps diff --git a/src/pybind/mgr/dashboard/plugins/ttl_cache.py b/src/pybind/mgr/dashboard/plugins/ttl_cache.py index b316151e7e08..ad3c36d1198d 100644 --- a/src/pybind/mgr/dashboard/plugins/ttl_cache.py +++ b/src/pybind/mgr/dashboard/plugins/ttl_cache.py @@ -3,7 +3,6 @@ This is a minimal implementation of TTL-ed lru_cache function. Based on Python 3 functools and backports.functools_lru_cache. """ -from __future__ import absolute_import from collections import OrderedDict from functools import wraps diff --git a/src/pybind/mgr/dashboard/rest_client.py b/src/pybind/mgr/dashboard/rest_client.py index 90cfd41ad77e..e35ceb5474ee 100644 --- a/src/pybind/mgr/dashboard/rest_client.py +++ b/src/pybind/mgr/dashboard/rest_client.py @@ -11,7 +11,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. """ -from __future__ import absolute_import import inspect import logging diff --git a/src/pybind/mgr/dashboard/security.py b/src/pybind/mgr/dashboard/security.py index cbeda6daec22..4c6e5c564af3 100644 --- a/src/pybind/mgr/dashboard/security.py +++ b/src/pybind/mgr/dashboard/security.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import inspect diff --git a/src/pybind/mgr/dashboard/services/__init__.py b/src/pybind/mgr/dashboard/services/__init__.py index 139759b658ca..40a96afc6ff0 100644 --- a/src/pybind/mgr/dashboard/services/__init__.py +++ b/src/pybind/mgr/dashboard/services/__init__.py @@ -1,2 +1 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import diff --git a/src/pybind/mgr/dashboard/services/access_control.py b/src/pybind/mgr/dashboard/services/access_control.py index dd32712494fc..08bee8ec4291 100644 --- a/src/pybind/mgr/dashboard/services/access_control.py +++ b/src/pybind/mgr/dashboard/services/access_control.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-arguments,too-many-return-statements # pylint: disable=too-many-branches, too-many-locals, too-many-statements -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/services/auth.py b/src/pybind/mgr/dashboard/services/auth.py index 55436afb6ad3..76ee740b1a73 100644 --- a/src/pybind/mgr/dashboard/services/auth.py +++ b/src/pybind/mgr/dashboard/services/auth.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/ceph_service.py b/src/pybind/mgr/dashboard/services/ceph_service.py index 4cf82f06696d..028368b76502 100644 --- a/src/pybind/mgr/dashboard/services/ceph_service.py +++ b/src/pybind/mgr/dashboard/services/ceph_service.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/cephfs.py b/src/pybind/mgr/dashboard/services/cephfs.py index 604cf4a77fc8..8e9a0736571d 100644 --- a/src/pybind/mgr/dashboard/services/cephfs.py +++ b/src/pybind/mgr/dashboard/services/cephfs.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import datetime import logging diff --git a/src/pybind/mgr/dashboard/services/cephx.py b/src/pybind/mgr/dashboard/services/cephx.py index 60303ad85fd6..514173e53bec 100644 --- a/src/pybind/mgr/dashboard/services/cephx.py +++ b/src/pybind/mgr/dashboard/services/cephx.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from .ceph_service import CephService diff --git a/src/pybind/mgr/dashboard/services/exception.py b/src/pybind/mgr/dashboard/services/exception.py index 54aa8a7b4ccf..f027ed300b96 100644 --- a/src/pybind/mgr/dashboard/services/exception.py +++ b/src/pybind/mgr/dashboard/services/exception.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/ganesha.py b/src/pybind/mgr/dashboard/services/ganesha.py index 9799f837a74f..fdbb497853b1 100644 --- a/src/pybind/mgr/dashboard/services/ganesha.py +++ b/src/pybind/mgr/dashboard/services/ganesha.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-lines -from __future__ import absolute_import import logging import os diff --git a/src/pybind/mgr/dashboard/services/iscsi_cli.py b/src/pybind/mgr/dashboard/services/iscsi_cli.py index 93abbcd190a3..e46924d8c353 100644 --- a/src/pybind/mgr/dashboard/services/iscsi_cli.py +++ b/src/pybind/mgr/dashboard/services/iscsi_cli.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/services/iscsi_client.py b/src/pybind/mgr/dashboard/services/iscsi_client.py index 9cc2600e1217..c222fbb0d75b 100644 --- a/src/pybind/mgr/dashboard/services/iscsi_client.py +++ b/src/pybind/mgr/dashboard/services/iscsi_client.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-public-methods -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/iscsi_config.py b/src/pybind/mgr/dashboard/services/iscsi_config.py index acc0c09362ce..f1818c1986c2 100644 --- a/src/pybind/mgr/dashboard/services/iscsi_config.py +++ b/src/pybind/mgr/dashboard/services/iscsi_config.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/services/orchestrator.py b/src/pybind/mgr/dashboard/services/orchestrator.py index 7dfdfc2920f8..45b0d3230926 100644 --- a/src/pybind/mgr/dashboard/services/orchestrator.py +++ b/src/pybind/mgr/dashboard/services/orchestrator.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import logging from functools import wraps diff --git a/src/pybind/mgr/dashboard/services/progress.py b/src/pybind/mgr/dashboard/services/progress.py index 96272beff7c4..d1afefbac0c9 100644 --- a/src/pybind/mgr/dashboard/services/progress.py +++ b/src/pybind/mgr/dashboard/services/progress.py @@ -7,7 +7,6 @@ executing and completed tasks tacked by the progress mgr module using the same structure of dashboard tasks ''' -from __future__ import absolute_import import logging from datetime import datetime diff --git a/src/pybind/mgr/dashboard/services/rbd.py b/src/pybind/mgr/dashboard/services/rbd.py index 083631915575..0356de8f5f44 100644 --- a/src/pybind/mgr/dashboard/services/rbd.py +++ b/src/pybind/mgr/dashboard/services/rbd.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=unused-argument -from __future__ import absolute_import import cherrypy import rbd diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py index 598d05ee39df..3d5d1cdf073e 100644 --- a/src/pybind/mgr/dashboard/services/rgw_client.py +++ b/src/pybind/mgr/dashboard/services/rgw_client.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import ipaddress import logging diff --git a/src/pybind/mgr/dashboard/services/sso.py b/src/pybind/mgr/dashboard/services/sso.py index fdc9b862b79a..74b1a3e52cf5 100644 --- a/src/pybind/mgr/dashboard/services/sso.py +++ b/src/pybind/mgr/dashboard/services/sso.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-return-statements,too-many-branches -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/settings.py b/src/pybind/mgr/dashboard/settings.py index 6c1b90374fb7..26b8d638a765 100644 --- a/src/pybind/mgr/dashboard/settings.py +++ b/src/pybind/mgr/dashboard/settings.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - import errno import inspect from ast import literal_eval diff --git a/src/pybind/mgr/dashboard/tests/__init__.py b/src/pybind/mgr/dashboard/tests/__init__.py index 2c8d3c68a5b2..64a71561ff86 100644 --- a/src/pybind/mgr/dashboard/tests/__init__.py +++ b/src/pybind/mgr/dashboard/tests/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-arguments -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/tests/helper.py b/src/pybind/mgr/dashboard/tests/helper.py index e71133a108b7..67dd09fdfe1d 100644 --- a/src/pybind/mgr/dashboard/tests/helper.py +++ b/src/pybind/mgr/dashboard/tests/helper.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import try: from typing import Any, Dict diff --git a/src/pybind/mgr/dashboard/tests/test_access_control.py b/src/pybind/mgr/dashboard/tests/test_access_control.py index 9415d7e57064..f05490de52f9 100644 --- a/src/pybind/mgr/dashboard/tests/test_access_control.py +++ b/src/pybind/mgr/dashboard/tests/test_access_control.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/tests/test_api_auditing.py b/src/pybind/mgr/dashboard/tests/test_api_auditing.py index b2e83379efc8..71121a06bcaf 100644 --- a/src/pybind/mgr/dashboard/tests/test_api_auditing.py +++ b/src/pybind/mgr/dashboard/tests/test_api_auditing.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import re diff --git a/src/pybind/mgr/dashboard/tests/test_ceph_service.py b/src/pybind/mgr/dashboard/tests/test_ceph_service.py index 9a8ca674c236..f3350337c74c 100644 --- a/src/pybind/mgr/dashboard/tests/test_ceph_service.py +++ b/src/pybind/mgr/dashboard/tests/test_ceph_service.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import logging import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_controllers.py b/src/pybind/mgr/dashboard/tests/test_controllers.py index bacef3677d78..7bd0b1955a06 100644 --- a/src/pybind/mgr/dashboard/tests/test_controllers.py +++ b/src/pybind/mgr/dashboard/tests/test_controllers.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from ..controllers import ApiController, BaseController, Controller, Endpoint, RESTController from . import ControllerTestCase # pylint: disable=no-name-in-module diff --git a/src/pybind/mgr/dashboard/tests/test_docs.py b/src/pybind/mgr/dashboard/tests/test_docs.py index 84cfddd629ec..b4210edff204 100644 --- a/src/pybind/mgr/dashboard/tests/test_docs.py +++ b/src/pybind/mgr/dashboard/tests/test_docs.py @@ -1,5 +1,4 @@ # # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_exceptions.py b/src/pybind/mgr/dashboard/tests/test_exceptions.py index bbf909095720..f28e2cd55d4d 100644 --- a/src/pybind/mgr/dashboard/tests/test_exceptions.py +++ b/src/pybind/mgr/dashboard/tests/test_exceptions.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import time diff --git a/src/pybind/mgr/dashboard/tests/test_feature_toggles.py b/src/pybind/mgr/dashboard/tests/test_feature_toggles.py index 571b8c286c85..7a36269d87be 100644 --- a/src/pybind/mgr/dashboard/tests/test_feature_toggles.py +++ b/src/pybind/mgr/dashboard/tests/test_feature_toggles.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_ganesha.py b/src/pybind/mgr/dashboard/tests/test_ganesha.py index f9cc44aa2738..2d1136d2333b 100644 --- a/src/pybind/mgr/dashboard/tests/test_ganesha.py +++ b/src/pybind/mgr/dashboard/tests/test_ganesha.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-lines -from __future__ import absolute_import import unittest from unittest.mock import MagicMock, Mock, patch diff --git a/src/pybind/mgr/dashboard/tests/test_home.py b/src/pybind/mgr/dashboard/tests/test_home.py index 37e09b4b2af9..dc73a6d2ead6 100644 --- a/src/pybind/mgr/dashboard/tests/test_home.py +++ b/src/pybind/mgr/dashboard/tests/test_home.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import logging import os diff --git a/src/pybind/mgr/dashboard/tests/test_notification.py b/src/pybind/mgr/dashboard/tests/test_notification.py index df303e455634..0abca989c229 100644 --- a/src/pybind/mgr/dashboard/tests/test_notification.py +++ b/src/pybind/mgr/dashboard/tests/test_notification.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import random import time diff --git a/src/pybind/mgr/dashboard/tests/test_plugin_debug.py b/src/pybind/mgr/dashboard/tests/test_plugin_debug.py index cb4d1afc2184..5010d9768ffe 100644 --- a/src/pybind/mgr/dashboard/tests/test_plugin_debug.py +++ b/src/pybind/mgr/dashboard/tests/test_plugin_debug.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from . import CLICommandTestMixin, ControllerTestCase # pylint: disable=no-name-in-module diff --git a/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py b/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py index acb8336de7ec..490a8a6e2992 100644 --- a/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import json import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_rbd_service.py b/src/pybind/mgr/dashboard/tests/test_rbd_service.py index 99cf27d82145..1772ac8cf1ca 100644 --- a/src/pybind/mgr/dashboard/tests/test_rbd_service.py +++ b/src/pybind/mgr/dashboard/tests/test_rbd_service.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_settings.py b/src/pybind/mgr/dashboard/tests/test_settings.py index e92b580e3a62..0644ecb8833e 100644 --- a/src/pybind/mgr/dashboard/tests/test_settings.py +++ b/src/pybind/mgr/dashboard/tests/test_settings.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import errno import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_sso.py b/src/pybind/mgr/dashboard/tests/test_sso.py index c347f5420082..0aaa0e87478a 100644 --- a/src/pybind/mgr/dashboard/tests/test_sso.py +++ b/src/pybind/mgr/dashboard/tests/test_sso.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import errno import tempfile diff --git a/src/pybind/mgr/dashboard/tests/test_task.py b/src/pybind/mgr/dashboard/tests/test_task.py index 0d51e2d3f889..2506c3913c2f 100644 --- a/src/pybind/mgr/dashboard/tests/test_task.py +++ b/src/pybind/mgr/dashboard/tests/test_task.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import threading diff --git a/src/pybind/mgr/dashboard/tests/test_tools.py b/src/pybind/mgr/dashboard/tests/test_tools.py index c9cd11bafc83..dbd87552e0b7 100644 --- a/src/pybind/mgr/dashboard/tests/test_tools.py +++ b/src/pybind/mgr/dashboard/tests/test_tools.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_versioning.py b/src/pybind/mgr/dashboard/tests/test_versioning.py index d051e0550a48..bf166e40dc48 100644 --- a/src/pybind/mgr/dashboard/tests/test_versioning.py +++ b/src/pybind/mgr/dashboard/tests/test_versioning.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tools.py b/src/pybind/mgr/dashboard/tools.py index a6f14e82d008..a882a30cc005 100644 --- a/src/pybind/mgr/dashboard/tools.py +++ b/src/pybind/mgr/dashboard/tools.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import collections import fnmatch diff --git a/src/pybind/mgr/orchestrator/tests/test_orchestrator.py b/src/pybind/mgr/orchestrator/tests/test_orchestrator.py index 35f4b64b8782..35154270449f 100644 --- a/src/pybind/mgr/orchestrator/tests/test_orchestrator.py +++ b/src/pybind/mgr/orchestrator/tests/test_orchestrator.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/restful/decorators.py b/src/pybind/mgr/restful/decorators.py index d1d3fbcd5178..11840a9913a6 100644 --- a/src/pybind/mgr/restful/decorators.py +++ b/src/pybind/mgr/restful/decorators.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from pecan import request, response from base64 import b64decode diff --git a/src/pybind/mgr/restful/hooks.py b/src/pybind/mgr/restful/hooks.py index d677dcc2a15a..c57cbcd404d0 100644 --- a/src/pybind/mgr/restful/hooks.py +++ b/src/pybind/mgr/restful/hooks.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from pecan.hooks import PecanHook diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index b5f9d6f0af9b..d259a85e5a67 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -1,7 +1,6 @@ """ A RESTful API for Ceph """ -from __future__ import absolute_import import os import json diff --git a/src/pybind/mgr/tests/__init__.py b/src/pybind/mgr/tests/__init__.py index 9d5e2dcabea7..2725e4d643a1 100644 --- a/src/pybind/mgr/tests/__init__.py +++ b/src/pybind/mgr/tests/__init__.py @@ -1,5 +1,4 @@ # type: ignore -from __future__ import absolute_import import json import logging -- 2.47.3