From 25748b9246e6f260b1d40bf6c9aa7c2d027b0508 Mon Sep 17 00:00:00 2001 From: Blaise LI Date: Thu, 15 May 2025 09:28:51 +0200 Subject: [PATCH 1/2] fix: Use importlib for 3.12+ compatibility. Hopefully solves this issue: https://github.com/pyranges/sorted_nearest/issues/10 I haven't tested retro-compatibility for older Python versions, though. --- sorted_nearest/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorted_nearest/__init__.py b/sorted_nearest/__init__.py index 1e552a8..9006dd0 100644 --- a/sorted_nearest/__init__.py +++ b/sorted_nearest/__init__.py @@ -1,4 +1,4 @@ -import pkg_resources +from importlib.metadata import version from sorted_nearest.src.annotate_clusters import annotate_clusters # type: ignore # NOQA: F401 from sorted_nearest.src.cluster_by import cluster_by # type: ignore # NOQA: F401 @@ -19,4 +19,4 @@ from sorted_nearest.src.tiles import maketiles # type: ignore # NOQA: F401 from sorted_nearest.src.windows import makewindows # type: ignore # NOQA: F401 -__version__ = pkg_resources.get_distribution("sorted_nearest").version +__version__ = version("sorted_nearest") From b6503fad50ca7f00db4238f19d32e8e1fe771881 Mon Sep 17 00:00:00 2001 From: "endrebak.ada" Date: Mon, 9 Jun 2025 13:43:18 +0200 Subject: [PATCH 2/2] Remove Py 3.7 from github actions --- .github/workflows/install_doctest_lint_typecheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install_doctest_lint_typecheck.yml b/.github/workflows/install_doctest_lint_typecheck.yml index a170925..fa49695 100644 --- a/.github/workflows/install_doctest_lint_typecheck.yml +++ b/.github/workflows/install_doctest_lint_typecheck.yml @@ -11,7 +11,7 @@ jobs: # You can use PyPy versions in python-version. # For example, pypy2.7 and pypy3.9 matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3