From 4c79ed60d477847e340b5c6a39608d963bb3eeb8 Mon Sep 17 00:00:00 2001 From: likui Date: Mon, 9 Oct 2023 10:30:15 +0800 Subject: [PATCH] Remove importlib-metadata from requirements We don't need it anymore as we don't support python < 3.8 Also it was removed from global requirements so it breaks the requirements check. Change-Id: Ic558c0a55aff8a0a4f762177a7188069f2baa1fe --- cinder/backup/drivers/gcs.py | 8 +------- requirements.txt | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cinder/backup/drivers/gcs.py b/cinder/backup/drivers/gcs.py index c7288f3ffad..3fba8df9b89 100644 --- a/cinder/backup/drivers/gcs.py +++ b/cinder/backup/drivers/gcs.py @@ -27,16 +27,10 @@ Server-centric flow is used for authentication. """ import base64 +import importlib.metadata as importlib_metadata import io import os -try: - # For python 3.8 and later - import importlib.metadata as importlib_metadata -except ImportError: - # For everyone else - import importlib_metadata - try: from google.auth import exceptions as gexceptions from google.oauth2 import service_account diff --git a/requirements.txt b/requirements.txt index 62f69539c3d..f0bd467b87c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,6 @@ decorator>=4.4.2 # BSD eventlet>=0.30.1,!=0.32.0 # MIT greenlet>=0.4.16 # MIT httplib2>=0.18.1 # MIT -importlib_metadata>=3.1.1 # Apache-2.0 iso8601>=0.1.12 # MIT jsonschema>=3.2.0 # MIT keystoneauth1>=4.2.1 # Apache-2.0