File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1- import importlib . metadata
1+ import sys
22from typing import Any , Mapping , Type
33
44from .converters .base import ImageConverterMixin , ImageReader , ImageWriter
55
66
77def _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
You can’t perform that action at this time.
0 commit comments