diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dfdc9a4..78385cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - name: Create conda environment diff --git a/ecgtools/__init__.py b/ecgtools/__init__.py index a19b2d5..8a000e3 100644 --- a/ecgtools/__init__.py +++ b/ecgtools/__init__.py @@ -1,12 +1,12 @@ #!/usr/bin/env python # flake8: noqa """Top-level module for ecgtools .""" -from pkg_resources import DistributionNotFound, get_distribution +from importlib.metadata import PackageNotFoundError, version from .builder import Builder, RootDirectory, glob_to_regex try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: + __version__ = version(__name__) +except PackageNotFoundError: # package is not installed __version__ = '0.0.0' diff --git a/setup.cfg b/setup.cfg index 18b251b..8e8cda5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ select = B,C,E,F,W,T4,B9 [isort] known_first_party=ecgtools -known_third_party=cf_xarray,joblib,pandas,pkg_resources,pydantic,pytest,setuptools,xarray +known_third_party=cf_xarray,joblib,pandas,pydantic,pytest,setuptools,xarray multi_line_output=3 include_trailing_comma=True force_grid_wrap=0