diff --git a/cinder/api/api_utils.py b/cinder/api/api_utils.py index 7d4d9fd9f62..0dfceada0f5 100644 --- a/cinder/api/api_utils.py +++ b/cinder/api/api_utils.py @@ -10,8 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations - import typing from typing import Any, Generator, Iterable, Optional, Union diff --git a/cinder/api/common.py b/cinder/api/common.py index 74f99e0f55c..3936231da59 100644 --- a/cinder/api/common.py +++ b/cinder/api/common.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations - import enum import json import os diff --git a/cinder/backup/api.py b/cinder/backup/api.py index ec312d75488..93d48761318 100644 --- a/cinder/backup/api.py +++ b/cinder/backup/api.py @@ -17,8 +17,6 @@ """Handles all requests relating to the volume backups service.""" -from __future__ import annotations - from datetime import datetime import random from typing import Optional diff --git a/cinder/cmd/manage.py b/cinder/cmd/manage.py index 91f5ffe8b9a..a573768f43f 100644 --- a/cinder/cmd/manage.py +++ b/cinder/cmd/manage.py @@ -50,8 +50,6 @@ """CLI interface for cinder management.""" -from __future__ import annotations - import collections import collections.abc as collections_abc import errno diff --git a/cinder/cmd/status.py b/cinder/cmd/status.py index 67c85bae491..6c93e42b89e 100644 --- a/cinder/cmd/status.py +++ b/cinder/cmd/status.py @@ -15,8 +15,6 @@ """CLI interface for cinder status commands.""" -from __future__ import annotations - import os import sys diff --git a/cinder/context.py b/cinder/context.py index 15bbc2690f0..ff544e56d59 100644 --- a/cinder/context.py +++ b/cinder/context.py @@ -17,8 +17,6 @@ """RequestContext: context for requests that persist through all of cinder.""" -from __future__ import annotations - import copy from typing import Any, Optional diff --git a/cinder/flow_utils.py b/cinder/flow_utils.py index 1dd78bb891d..222ab7825b2 100644 --- a/cinder/flow_utils.py +++ b/cinder/flow_utils.py @@ -10,8 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations - import os from typing import Any, Optional diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 181d99fa97f..9002afb0973 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -16,8 +16,6 @@ """Implementation of an image service that uses Glance as the backend""" -from __future__ import annotations # Remove when only supporting python 3.9+ - import copy import itertools import random diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py index 84e478f7ce2..53518bdf1cf 100644 --- a/cinder/image/image_utils.py +++ b/cinder/image/image_utils.py @@ -23,8 +23,6 @@ Some slight modifications, but at some point we should look at maybe pushing this up to Oslo """ -from __future__ import annotations # Remove when only supporting python 3.9+ - import contextlib import errno import io diff --git a/cinder/rpc.py b/cinder/rpc.py index 60921a211e6..b3a2eb69d78 100644 --- a/cinder/rpc.py +++ b/cinder/rpc.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations - __all__ = [ 'init', 'cleanup', diff --git a/cinder/scheduler/base_weight.py b/cinder/scheduler/base_weight.py index 44e7f7f94b6..953950d243f 100644 --- a/cinder/scheduler/base_weight.py +++ b/cinder/scheduler/base_weight.py @@ -17,8 +17,6 @@ Pluggable Weighing support """ -from __future__ import annotations - import abc from typing import Iterable, Optional diff --git a/cinder/scheduler/evaluator/evaluator.py b/cinder/scheduler/evaluator/evaluator.py index 4b686932154..514bec4adf5 100644 --- a/cinder/scheduler/evaluator/evaluator.py +++ b/cinder/scheduler/evaluator/evaluator.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations # Remove when only supporting python 3.9+ - import operator import re import sys diff --git a/cinder/scheduler/filter_scheduler.py b/cinder/scheduler/filter_scheduler.py index d938a3ea00f..6b2f1a3af5a 100644 --- a/cinder/scheduler/filter_scheduler.py +++ b/cinder/scheduler/filter_scheduler.py @@ -20,8 +20,6 @@ You can customize this scheduler by specifying your own volume Filters and Weighing Functions. """ -from __future__ import annotations - from typing import (Optional, Union) from oslo_config import cfg diff --git a/cinder/scheduler/flows/create_volume.py b/cinder/scheduler/flows/create_volume.py index 3ff7a3af83a..09880921c7c 100644 --- a/cinder/scheduler/flows/create_volume.py +++ b/cinder/scheduler/flows/create_volume.py @@ -10,8 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations # Remove when only supporting python 3.9+ - from typing import Any, Optional from oslo_log import log as logging diff --git a/cinder/scheduler/host_manager.py b/cinder/scheduler/host_manager.py index a71f4708dee..3aa198bf179 100644 --- a/cinder/scheduler/host_manager.py +++ b/cinder/scheduler/host_manager.py @@ -15,8 +15,6 @@ """Manage backends in the current zone.""" -from __future__ import annotations - from collections import abc import random import typing diff --git a/cinder/utils.py b/cinder/utils.py index 823bd22c81c..277c2be07e7 100644 --- a/cinder/utils.py +++ b/cinder/utils.py @@ -25,8 +25,6 @@ should be placed in volume_utils instead. """ -from __future__ import annotations # Remove when only supporting python 3.9+ - from collections import OrderedDict import contextlib import datetime diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 38faa1b036b..0e20baff0f5 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -16,8 +16,6 @@ """Handles all requests relating to volumes.""" -from __future__ import annotations - import ast import collections import datetime diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 2d4017314b5..39db852d507 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -14,8 +14,6 @@ # under the License. """RADOS Block Device Driver""" -from __future__ import annotations - import binascii import errno import json diff --git a/cinder/volume/flows/api/create_volume.py b/cinder/volume/flows/api/create_volume.py index d97987d515f..fe071289793 100644 --- a/cinder/volume/flows/api/create_volume.py +++ b/cinder/volume/flows/api/create_volume.py @@ -11,8 +11,6 @@ # under the License. -from __future__ import annotations # Remove when only supporting python 3.9+ - from typing import Any, Optional, Type, Union from oslo_config import cfg diff --git a/cinder/volume/flows/manager/create_volume.py b/cinder/volume/flows/manager/create_volume.py index 1f78b33759d..8e41162e43b 100644 --- a/cinder/volume/flows/manager/create_volume.py +++ b/cinder/volume/flows/manager/create_volume.py @@ -10,8 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations - import binascii import traceback import typing diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index ed58a61a08b..9e542ac36ef 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -35,8 +35,6 @@ intact. """ -from __future__ import annotations # Remove when only supporting Python 3.9+ - import functools import time import typing diff --git a/cinder/volume/rpcapi.py b/cinder/volume/rpcapi.py index 52e1fcfaf8c..58de69c1c6c 100644 --- a/cinder/volume/rpcapi.py +++ b/cinder/volume/rpcapi.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import annotations - from typing import Optional, Union from cinder.common import constants diff --git a/cinder/volume/volume_types.py b/cinder/volume/volume_types.py index a5da0ef05e4..29d2f45d690 100644 --- a/cinder/volume/volume_types.py +++ b/cinder/volume/volume_types.py @@ -19,8 +19,6 @@ """Built-in volume type properties.""" -from __future__ import annotations - from typing import Any, Iterable, Optional, Union from oslo_config import cfg diff --git a/cinder/volume/volume_utils.py b/cinder/volume/volume_utils.py index 34775661269..8d6a015328d 100644 --- a/cinder/volume/volume_utils.py +++ b/cinder/volume/volume_utils.py @@ -14,8 +14,6 @@ """Volume-related Utilities and helpers.""" -from __future__ import annotations # Remove when only supporting python 3.9+ - import abc import ast import functools diff --git a/setup.cfg b/setup.cfg index 3c9051d6b4d..4f70d67746d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,7 @@ long_description = file: README.rst author = OpenStack author_email = openstack-discuss@lists.openstack.org url = https://docs.openstack.org/cinder/latest/ -python_requires = >=3.8 +python_requires = >=3.9 classifiers = Environment :: OpenStack Intended Audience :: Information Technology