Declare Python 3.10 support

... and removes the remaining code and dependency for Python < 3.8.

Change-Id: I9aa4b4fa6b73b6fbc792789b4bc63b7fb0370806
This commit is contained in:
Takashi Kajinami 2023-10-07 12:07:46 +09:00
parent 00858022c3
commit cb1be57d38
3 changed files with 4 additions and 10 deletions

@ -17,16 +17,10 @@
# under the License. # under the License.
"""OpenStack Client interface. Handles the REST calls and responses.""" """OpenStack Client interface. Handles the REST calls and responses."""
import importlib.metadata
import logging import logging
import warnings import warnings
try:
# For Python 3.8 and later
import importlib.metadata as importlib_metadata
except ImportError:
# For everyone else
import importlib_metadata
from debtcollector import removals from debtcollector import removals
from debtcollector import renames from debtcollector import renames
from keystoneauth1 import adapter from keystoneauth1 import adapter
@ -41,7 +35,7 @@ try:
# trigger if it's a version of keyring that's supported in global # trigger if it's a version of keyring that's supported in global
# requirements. Update _min and _bad when that changes. # requirements. Update _min and _bad when that changes.
keyring_v = packaging.version.Version( keyring_v = packaging.version.Version(
importlib_metadata.version('keyring') importlib.metadata.version('keyring')
) )
keyring_min = packaging.version.Version('5.5.1') keyring_min = packaging.version.Version('5.5.1')
# This is a list of versions, e.g., pkg_resources.parse_version('3.3') # This is a list of versions, e.g., pkg_resources.parse_version('3.3')
@ -51,7 +45,7 @@ try:
import keyring import keyring
else: else:
keyring = None keyring = None
except (ImportError, importlib_metadata.PackageNotFoundError): except (ImportError, importlib.metadata.PackageNotFoundError):
keyring = None keyring = None
pickle = None pickle = None

@ -17,5 +17,4 @@ oslo.utils>=3.33.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0 requests>=2.14.2 # Apache-2.0
six>=1.10.0 # MIT six>=1.10.0 # MIT
stevedore>=1.20.0 # Apache-2.0 stevedore>=1.20.0 # Apache-2.0
importlib_metadata>=1.7.0;python_version<'3.8' # Apache-2.0
packaging>=20.4 # BSD packaging>=20.4 # BSD

@ -17,6 +17,7 @@ classifier =
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
[files] [files]
packages = packages =