Skip to content

Commit d2996de

Browse files
authored
Fix Python 3.12 CI failures (#971)
1 parent dcdad31 commit d2996de

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

ci/install-deps.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ pip install -e .
99
pip install -r requirements-test.txt
1010
pip install git+https://github.com/dask/distributed@main
1111
pip install git+https://github.com/dask/dask@main
12+
# Re-pin k8s-crd-resolver compatible versions after other installs
13+
# may upgrade them:
14+
# - setuptools 82 removed pkg_resources, needed by openapi-spec-validator<0.5.0
15+
# - openapi-spec-validator<0.5.0 needs jsonschema<4.18 for _legacy_validators
16+
pip install "setuptools<81" "jsonschema==4.17.3" "openapi-spec-validator<0.5.0"

dask_kubernetes/operator/controller/controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
from collections import defaultdict
88
from contextlib import suppress
99
from datetime import datetime
10+
from importlib.metadata import entry_points
1011
from typing import TYPE_CHECKING, Any, Final
1112
from uuid import uuid4
1213

1314
import aiohttp
1415
import dask.config
1516
import kopf
1617
import kr8s
17-
import pkg_resources
1818
from distributed.core import clean_exception, rpc
1919
from distributed.protocol.pickle import dumps
2020
from kr8s.asyncio.objects import Deployment, Pod, Service
@@ -47,7 +47,7 @@
4747

4848
# Load operator plugins from other packages
4949
PLUGINS: list[Any] = []
50-
for ep in pkg_resources.iter_entry_points(group="dask_operator_plugin"):
50+
for ep in entry_points(group="dask_operator_plugin"):
5151
with suppress(AttributeError, ImportError):
5252
PLUGINS.append(ep.load())
5353

0 commit comments

Comments
 (0)