From f0f15f89c68c0baaa70d093aba8d8e80a5255034 Mon Sep 17 00:00:00 2001 From: zhangbailin Date: Sun, 26 Apr 2020 16:53:41 +0800 Subject: [PATCH] Remove future imports These particular imports are no longer needed in a Python 3-only world. Change-Id: I5e9e15556c04871c451f6363380f2a7ac026c968 --- doc/ext/term.py | 2 -- lower-constraints.txt | 1 - watcher/api/config.py | 2 -- watcher/applier/actions/factory.py | 2 -- watcher/applier/loading/default.py | 3 --- watcher/common/loader/base.py | 2 -- watcher/common/loader/default.py | 2 -- watcher/db/purge.py | 2 -- watcher/decision_engine/loading/default.py | 3 --- .../decision_engine/strategy/strategies/workload_balance.py | 2 -- watcher/tests/api/test_hooks.py | 2 -- watcher/tests/api/test_utils.py | 2 -- .../applier/actions/loading/test_default_actions_loader.py | 1 - watcher/tests/applier/actions/test_change_node_power_state.py | 2 -- .../tests/applier/actions/test_change_nova_service_state.py | 2 -- watcher/tests/applier/actions/test_migration.py | 3 --- watcher/tests/applier/actions/test_resize.py | 1 - watcher/tests/applier/actions/test_volume_migration.py | 2 -- .../workflow_engine/loading/test_default_engine_loader.py | 1 - watcher/tests/cmd/test_api.py | 3 --- watcher/tests/cmd/test_applier.py | 3 --- watcher/tests/cmd/test_decision_engine.py | 3 --- watcher/tests/common/loader/test_loader.py | 2 -- .../decision_engine/datasources/test_ceilometer_helper.py | 3 --- 24 files changed, 51 deletions(-) diff --git a/doc/ext/term.py b/doc/ext/term.py index 64a233d4b..67cba1af0 100644 --- a/doc/ext/term.py +++ b/doc/ext/term.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - import importlib import inspect diff --git a/lower-constraints.txt b/lower-constraints.txt index 6e63706d5..d247da7a0 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -31,7 +31,6 @@ extras==1.0.0 fasteners==0.14.1 fixtures==3.0.0 freezegun==0.3.10 -future==0.16.0 futurist==1.8.0 gitdb2==2.0.3 GitPython==2.1.8 diff --git a/watcher/api/config.py b/watcher/api/config.py index e1aeb8ccb..7064ad340 100644 --- a/watcher/api/config.py +++ b/watcher/api/config.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - from oslo_config import cfg from watcher.api import hooks diff --git a/watcher/applier/actions/factory.py b/watcher/applier/actions/factory.py index 037e0db42..5d773a609 100644 --- a/watcher/applier/actions/factory.py +++ b/watcher/applier/actions/factory.py @@ -15,8 +15,6 @@ # limitations under the License. # -from __future__ import unicode_literals - from oslo_log import log from watcher.applier.loading import default diff --git a/watcher/applier/loading/default.py b/watcher/applier/loading/default.py index c4d58d9e2..c3ca90099 100644 --- a/watcher/applier/loading/default.py +++ b/watcher/applier/loading/default.py @@ -11,9 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - - from watcher.common.loader import default diff --git a/watcher/common/loader/base.py b/watcher/common/loader/base.py index d959b2452..8a88e9fc4 100644 --- a/watcher/common/loader/base.py +++ b/watcher/common/loader/base.py @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - import abc diff --git a/watcher/common/loader/default.py b/watcher/common/loader/default.py index 3ef63bc84..aad9689b9 100644 --- a/watcher/common/loader/default.py +++ b/watcher/common/loader/default.py @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - from oslo_config import cfg from oslo_log import log from stevedore import driver as drivermanager diff --git a/watcher/db/purge.py b/watcher/db/purge.py index d1b58fefa..b39944027 100644 --- a/watcher/db/purge.py +++ b/watcher/db/purge.py @@ -15,8 +15,6 @@ # limitations under the License. # -from __future__ import print_function - import collections import datetime import itertools diff --git a/watcher/decision_engine/loading/default.py b/watcher/decision_engine/loading/default.py index 8fbd5b893..013c76ee5 100644 --- a/watcher/decision_engine/loading/default.py +++ b/watcher/decision_engine/loading/default.py @@ -19,9 +19,6 @@ # limitations under the License. # -from __future__ import unicode_literals - - from watcher.common.loader import default diff --git a/watcher/decision_engine/strategy/strategies/workload_balance.py b/watcher/decision_engine/strategy/strategies/workload_balance.py index 076b5aad5..d20b10c6a 100644 --- a/watcher/decision_engine/strategy/strategies/workload_balance.py +++ b/watcher/decision_engine/strategy/strategies/workload_balance.py @@ -17,8 +17,6 @@ # limitations under the License. # -from __future__ import division - from oslo_log import log from watcher._i18n import _ diff --git a/watcher/tests/api/test_hooks.py b/watcher/tests/api/test_hooks.py index 8ed737023..b2ce49f2d 100644 --- a/watcher/tests/api/test_hooks.py +++ b/watcher/tests/api/test_hooks.py @@ -14,8 +14,6 @@ """Tests for the Pecan API hooks.""" -from __future__ import unicode_literals - import mock from oslo_config import cfg import oslo_messaging as messaging diff --git a/watcher/tests/api/test_utils.py b/watcher/tests/api/test_utils.py index 9c6d0ce33..fb76f80e3 100644 --- a/watcher/tests/api/test_utils.py +++ b/watcher/tests/api/test_utils.py @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - from oslo_config import cfg import wsme diff --git a/watcher/tests/applier/actions/loading/test_default_actions_loader.py b/watcher/tests/applier/actions/loading/test_default_actions_loader.py index 5a36391f1..3115e32b4 100644 --- a/watcher/tests/applier/actions/loading/test_default_actions_loader.py +++ b/watcher/tests/applier/actions/loading/test_default_actions_loader.py @@ -12,7 +12,6 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals from watcher.applier.actions import base as abase from watcher.applier.loading import default diff --git a/watcher/tests/applier/actions/test_change_node_power_state.py b/watcher/tests/applier/actions/test_change_node_power_state.py index 343416a67..7c2607de7 100644 --- a/watcher/tests/applier/actions/test_change_node_power_state.py +++ b/watcher/tests/applier/actions/test_change_node_power_state.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - import jsonschema import mock diff --git a/watcher/tests/applier/actions/test_change_nova_service_state.py b/watcher/tests/applier/actions/test_change_nova_service_state.py index 0c922fafc..949760d83 100644 --- a/watcher/tests/applier/actions/test_change_nova_service_state.py +++ b/watcher/tests/applier/actions/test_change_nova_service_state.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - import jsonschema import mock diff --git a/watcher/tests/applier/actions/test_migration.py b/watcher/tests/applier/actions/test_migration.py index c0a951df0..95d3d4b4d 100644 --- a/watcher/tests/applier/actions/test_migration.py +++ b/watcher/tests/applier/actions/test_migration.py @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - - import jsonschema import mock diff --git a/watcher/tests/applier/actions/test_resize.py b/watcher/tests/applier/actions/test_resize.py index 0cdfc0ee9..75709c9b4 100644 --- a/watcher/tests/applier/actions/test_resize.py +++ b/watcher/tests/applier/actions/test_resize.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals import jsonschema import mock diff --git a/watcher/tests/applier/actions/test_volume_migration.py b/watcher/tests/applier/actions/test_volume_migration.py index e21fd6686..2381f20f8 100644 --- a/watcher/tests/applier/actions/test_volume_migration.py +++ b/watcher/tests/applier/actions/test_volume_migration.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - import jsonschema import mock diff --git a/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py b/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py index 49d27ca7e..0c014a15f 100644 --- a/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py +++ b/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py @@ -13,7 +13,6 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals from watcher.applier.loading import default from watcher.applier.workflow_engine import base as wbase diff --git a/watcher/tests/cmd/test_api.py b/watcher/tests/cmd/test_api.py index bdeba3b6e..1ef476536 100644 --- a/watcher/tests/cmd/test_api.py +++ b/watcher/tests/cmd/test_api.py @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import unicode_literals - import types import mock diff --git a/watcher/tests/cmd/test_applier.py b/watcher/tests/cmd/test_applier.py index dbf128dc1..6ca43338a 100644 --- a/watcher/tests/cmd/test_applier.py +++ b/watcher/tests/cmd/test_applier.py @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import unicode_literals - import types import mock diff --git a/watcher/tests/cmd/test_decision_engine.py b/watcher/tests/cmd/test_decision_engine.py index 3f0380ba2..66d318ee4 100644 --- a/watcher/tests/cmd/test_decision_engine.py +++ b/watcher/tests/cmd/test_decision_engine.py @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import unicode_literals - import types import mock diff --git a/watcher/tests/common/loader/test_loader.py b/watcher/tests/common/loader/test_loader.py index 6eef2bd49..7abf0c9b5 100644 --- a/watcher/tests/common/loader/test_loader.py +++ b/watcher/tests/common/loader/test_loader.py @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import unicode_literals - import mock from oslo_config import cfg diff --git a/watcher/tests/decision_engine/datasources/test_ceilometer_helper.py b/watcher/tests/decision_engine/datasources/test_ceilometer_helper.py index 11051415b..3d3184d4f 100644 --- a/watcher/tests/decision_engine/datasources/test_ceilometer_helper.py +++ b/watcher/tests/decision_engine/datasources/test_ceilometer_helper.py @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import unicode_literals - import mock from watcher.common import clients