Skip to content

Commit

Permalink
importlib_metadata removed deprecated entry point interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
woutdenolf committed Oct 3, 2022
1 parent 6ae9fac commit 0c60caf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kombu/utils/compat.py
Expand Up @@ -82,7 +82,12 @@ def entrypoints(namespace):
if sys.version_info >= (3,10):
entry_points = importlib_metadata.entry_points(group=namespace)
else:
entry_points = importlib_metadata.entry_points().get(namespace, [])
entry_points = importlib_metadata.entry_points()
try:
entry_points = entry_points.get(namespace, [])
except AttributeError:
entry_points = entry_points.select(group=namespace)

return (
(ep, ep.load())
for ep in entry_points
Expand Down

0 comments on commit 0c60caf

Please sign in to comment.