Skip to content

Commit deead87

Browse files
authored
fix compatible with importlib_metadata 5.0.0 and Python 3.12 (#362)
1 parent 8f371fb commit deead87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpdata/plugins/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
importlib.import_module(module_name, PACKAGE_BASE)
1515

1616
# https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html
17-
eps = metadata.entry_points().get('dpdata.plugins', [])
17+
try:
18+
eps = metadata.entry_points(group='dpdata.plugins')
19+
except TypeError:
20+
eps = metadata.entry_points().get('dpdata.plugins', [])
1821
for ep in eps:
1922
plugin = ep.load()

0 commit comments

Comments
 (0)