mirror of https://github.com/celery/kombu.git
Use new entry_points interface
This commit is contained in:
parent
659c99a947
commit
54638f251b
|
@ -77,9 +77,13 @@ def detect_environment():
|
|||
|
||||
def entrypoints(namespace):
|
||||
"""Return setuptools entrypoints for namespace."""
|
||||
if sys.version_info >= (3,10):
|
||||
entry_points = importlib_metadata.entry_points(group=namespace)
|
||||
else:
|
||||
entry_points = importlib_metadata.entry_points().get(namespace, [])
|
||||
return (
|
||||
(ep, ep.load())
|
||||
for ep in importlib_metadata.entry_points().get(namespace, [])
|
||||
for ep in entry_points
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue