From 6a77bf785f3eac8e77a6ede56095fa3b51d534e9 Mon Sep 17 00:00:00 2001 From: Archit Kulkarni Date: Thu, 22 Jun 2023 08:01:12 -0700 Subject: [PATCH] Remove `urllib3` dependency (#36609) urllib3 was listed as a dependency under ray[k8s] (and therefore ray[all]), but upon inspection it seems it isn't actually used. This PR removes urllib3 from the dependencies. In this PR, ray[k8s] is also removed since urllib3 was the only dependency there. I confirmed manually that pip install ray[doesnotexist] doesn't fail, so this PR won't break any existing user scripts that contain pip install ray[k8s]. Signed-off-by: Archit Kulkarni --- python/ray/autoscaler/_private/autoscaler.py | 6 ------ python/requirements.txt | 1 - python/setup.py | 1 - 3 files changed, 8 deletions(-) diff --git a/python/ray/autoscaler/_private/autoscaler.py b/python/ray/autoscaler/_private/autoscaler.py index 3d787c4956a8..ba62e5c7d2ba 100644 --- a/python/ray/autoscaler/_private/autoscaler.py +++ b/python/ray/autoscaler/_private/autoscaler.py @@ -78,12 +78,6 @@ ) from ray.core.generated import gcs_service_pb2, gcs_service_pb2_grpc -try: - from urllib3.exceptions import MaxRetryError -except ImportError: - MaxRetryError = None - - logger = logging.getLogger(__name__) # Status of a node e.g. "up-to-date", see ray/autoscaler/tags.py diff --git a/python/requirements.txt b/python/requirements.txt index e04d5847ac42..59ce5d7448f1 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -40,7 +40,6 @@ colorful pyyaml rich gpustat>=1.0.0 -urllib3 opentelemetry-sdk fastapi virtualenv<20.21.1,>=20.0.24 diff --git a/python/setup.py b/python/setup.py index 08b4c91fb6db..776d09b7b531 100644 --- a/python/setup.py +++ b/python/setup.py @@ -264,7 +264,6 @@ def get_packages(self): ], "serve": ["uvicorn", "requests", "starlette", "fastapi", "aiorwlock"], "tune": ["pandas", "tensorboardX>=1.9", "requests", pyarrow_dep], - "k8s": ["urllib3"], "observability": [ "opentelemetry-api", "opentelemetry-sdk",