From c84c950e00cb0f1e57f255df35d8dcd15684780c Mon Sep 17 00:00:00 2001 From: Nick Koukoufilippas Date: Wed, 22 Mar 2023 20:09:24 +0200 Subject: [PATCH 1/2] remove matrix.py version from incubator --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bdb174ef..9024929f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,6 @@ jobs: - name: Set up conda uses: conda-incubator/setup-miniconda@v2 with: - python-version: ${{ matrix.py }} channels: conda-forge, defaults channel-priority: strict show-channel-urls: true From 810baf4cbd139c2cc2d015e51b49468adde8e107 Mon Sep 17 00:00:00 2001 From: Nick Koukoufilippas Date: Wed, 22 Mar 2023 22:01:19 +0200 Subject: [PATCH 2/2] replace deprecated package --- pyccl/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyccl/__init__.py b/pyccl/__init__.py index ea581ca89..0103fce39 100644 --- a/pyccl/__init__.py +++ b/pyccl/__init__.py @@ -1,11 +1,11 @@ # flake8: noqa E402 -from pkg_resources import get_distribution, DistributionNotFound +from importlib.metadata import version, PackageNotFoundError try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: + __version__ = version(__name__) +except PackageNotFoundError: # package is not installed pass -del get_distribution, DistributionNotFound +del version, PackageNotFoundError # Set the environment variable for default config path from os import environ, path