diff --git a/compliance_checker/cf/util.py b/compliance_checker/cf/util.py index 1b592829..67cba708 100644 --- a/compliance_checker/cf/util.py +++ b/compliance_checker/cf/util.py @@ -1,11 +1,11 @@ import itertools import os import sys +from importlib.resources import files from pkgutil import get_data import requests from cf_units import Unit -from importlib_resources import files from lxml import etree from netCDF4 import Dataset diff --git a/compliance_checker/cfutil.py b/compliance_checker/cfutil.py index 8bcce331..3b2f4d7e 100644 --- a/compliance_checker/cfutil.py +++ b/compliance_checker/cfutil.py @@ -7,9 +7,9 @@ import warnings from collections import defaultdict from functools import lru_cache, partial +from importlib.resources import files from cf_units import Unit -from importlib_resources import files _UNITLESS_DB = None _SEA_NAMES = None diff --git a/compliance_checker/suite.py b/compliance_checker/suite.py index 6a4281e2..a8a80bce 100644 --- a/compliance_checker/suite.py +++ b/compliance_checker/suite.py @@ -13,11 +13,11 @@ import warnings from collections import defaultdict from datetime import datetime, timezone +from importlib.metadata import entry_points from operator import itemgetter from pathlib import Path from urllib.parse import urlparse -import importlib_metadata import requests from lxml import etree as ET from netCDF4 import Dataset @@ -73,7 +73,7 @@ def _get_generator_plugins(cls): """ if not hasattr(cls, "suite_generators"): - gens = importlib_metadata.entry_points( + gens = entry_points( group="compliance_checker.generators", ) cls.suite_generators = [x.load() for x in gens] @@ -139,7 +139,7 @@ def load_all_available_checkers(cls): base classes. """ cls._load_checkers( - importlib_metadata.entry_points(group="compliance_checker.suites"), + entry_points(group="compliance_checker.suites"), ) @classmethod diff --git a/compliance_checker/tests/conftest.py b/compliance_checker/tests/conftest.py index a320df71..87137100 100644 --- a/compliance_checker/tests/conftest.py +++ b/compliance_checker/tests/conftest.py @@ -1,9 +1,9 @@ import os import subprocess +from importlib.resources import files from itertools import chain import pytest -from importlib_resources import files from netCDF4 import Dataset from compliance_checker.cf import util diff --git a/compliance_checker/tests/resources.py b/compliance_checker/tests/resources.py index 7bbca9d6..8b489150 100644 --- a/compliance_checker/tests/resources.py +++ b/compliance_checker/tests/resources.py @@ -1,6 +1,5 @@ import subprocess - -from importlib_resources import files +from importlib.resources import files def get_filename(path): diff --git a/compliance_checker/tests/test_suite.py b/compliance_checker/tests/test_suite.py index 61915ee9..b855b4e4 100644 --- a/compliance_checker/tests/test_suite.py +++ b/compliance_checker/tests/test_suite.py @@ -1,9 +1,9 @@ import os import unittest +from importlib.resources import files from pathlib import Path import numpy as np -from importlib_resources import files from compliance_checker.acdd import ACDDBaseCheck from compliance_checker.base import BaseCheck, GenericFile, Result diff --git a/pyproject.toml b/pyproject.toml index 696cf98f..41c0c4a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ maintainers = [ { name = "Luke Campbell" }, { name = "Filipe Fernandes" }, ] -requires-python = ">=3.8" +requires-python = ">=3.10" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -28,8 +28,6 @@ classifiers = [ "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12",