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 500aad16078..ef9c385b687 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 49b44f84da3..3ce43b451b9 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 93139b3b4ba..65141ee1dbe 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 efc84fe6bb9..5277f2de72a 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 031beb5c2d1..041fbbe43eb 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 a4e5e2e40d5..7d3b507b7ca 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 e03767b946b..8d7fceeeb66 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 868ab181e20..a54ed8bf791 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