Skip to content

Commit 81c2c5d

Browse files
committed
Python 3.12 issue resolution and CI enrichment
1 parent a04fe9b commit 81c2c5d

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
sys:
1313
- { os: windows-latest, shell: 'cmd /C call {0}' }
1414
- { os: ubuntu-24.04, shell: "bash -l {0}" }
15+
python-version: [3.9, 3.12]
1516
fail-fast: false
1617
defaults:
1718
run:
@@ -26,14 +27,18 @@ jobs:
2627
steps:
2728
- uses: actions/checkout@v2
2829

30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
2935
- name: Install Conda environment with Micromamba
3036
uses: mamba-org/setup-micromamba@v2.0.2
3137
with:
3238
micromamba-version: latest
3339
environment-name: test
3440
cache-downloads: true
3541
create-args: >-
36-
python=3.9
3742
pre-commit
3843
pytest-cov
3944
pytest-mock

tiledb/bioimg/plugin_manager.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
import importlib.metadata
1+
import sys
22
from typing import Any, Mapping, Type
33

44
from .converters.base import ImageConverterMixin, ImageReader, ImageWriter
55

66

77
def _load_entrypoints(name: str) -> Mapping[str, Any]:
8-
eps = importlib.metadata.entry_points()[name]
8+
if sys.version_info < (3, 12):
9+
import importlib
10+
11+
eps = importlib.metadata.entry_points()[name]
12+
else:
13+
from importlib.metadata import entry_points
14+
15+
eps = entry_points(group=name)
916
return {ep.name: ep.load() for ep in eps}
1017

1118

0 commit comments

Comments
 (0)