From 0f9d1372d636e39091ec0675fa59e883dd6752e1 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 7 Oct 2023 12:05:47 +0900 Subject: [PATCH] Declare Python 3.10 support ... and removes the remaining code and dependency for Python < 3.8. Change-Id: I305d3b9cc43bedf980826b10ab26959d10e35997 --- osprofiler/__init__.py | 9 ++------- requirements.txt | 1 - setup.cfg | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/osprofiler/__init__.py b/osprofiler/__init__.py index e9adf59..803e612 100644 --- a/osprofiler/__init__.py +++ b/osprofiler/__init__.py @@ -13,11 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -try: - # For Python 3.8 and later - import importlib.metadata as importlib_metadata -except ImportError: - # For everyone else - import importlib_metadata +import importlib.metadata -__version__ = importlib_metadata.version("osprofiler") +__version__ = importlib.metadata.version("osprofiler") diff --git a/requirements.txt b/requirements.txt index 954148d..6d60306 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,3 @@ oslo.utils>=3.33.0 # Apache-2.0 PrettyTable>=0.7.2 # BSD requests>=2.14.2 # Apache-2.0 WebOb>=1.7.1 # MIT -importlib_metadata>=1.7.0;python_version<'3.8' # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 0518875..4913385 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython