From 3f245e829b1d3b291e9a7fa6500f3141def71812 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 16 Apr 2024 17:17:35 +0100 Subject: [PATCH] Switch to pkg_resources.iter_entry_points --- dask_kubernetes/operator/controller/controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask_kubernetes/operator/controller/controller.py b/dask_kubernetes/operator/controller/controller.py index 7e8b1b7b..6cd990e4 100644 --- a/dask_kubernetes/operator/controller/controller.py +++ b/dask_kubernetes/operator/controller/controller.py @@ -4,13 +4,13 @@ from collections import defaultdict from contextlib import suppress from datetime import datetime -from importlib.metadata import entry_points from uuid import uuid4 import aiohttp import dask.config import kopf import kr8s +import pkg_resources from distributed.core import clean_exception, rpc from distributed.protocol.pickle import dumps from kr8s.asyncio.objects import Deployment, Pod, Service @@ -38,7 +38,7 @@ # Load operator plugins from other packages PLUGINS = [] -for ep in entry_points(group="dask_operator_plugin"): +for ep in pkg_resources.iter_entry_points(group="dask_operator_plugin"): with suppress(AttributeError, ImportError): PLUGINS.append(ep.load())