From 54fbd186b80fa47cd11ee820487c425b7e9fd4c1 Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Mon, 24 Feb 2025 09:45:11 -0500 Subject: [PATCH] Remove vestigial conda methods on Image (#2894) --- modal/image.py | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/modal/image.py b/modal/image.py index 93e847413..6c8722d36 100644 --- a/modal/image.py +++ b/modal/image.py @@ -31,7 +31,7 @@ from ._serialization import serialize from ._utils.async_utils import synchronize_api from ._utils.blob_utils import MAX_OBJECT_SIZE_BYTES -from ._utils.deprecation import deprecation_error, deprecation_warning +from ._utils.deprecation import deprecation_warning from ._utils.docker_utils import ( extract_copy_command_patterns, find_dockerignore_file, @@ -1413,45 +1413,6 @@ def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec: force_build=self.force_build or force_build, ) - @staticmethod - def conda(python_version: Optional[str] = None, force_build: bool = False): - """mdmd:hidden""" - message = ( - "`Image.conda` is deprecated." - " Please use the faster and more reliable `Image.micromamba` constructor instead." - ) - deprecation_error((2025, 5, 2), message) - - def conda_install( - self, - *packages: Union[str, list[str]], # A list of Python packages, eg. ["numpy", "matplotlib>=3.5.0"] - channels: list[str] = [], # A list of Conda channels, eg. ["conda-forge", "nvidia"] - force_build: bool = False, # Ignore cached builds, similar to 'docker build --no-cache' - secrets: Sequence[_Secret] = [], - gpu: GPU_T = None, - ): - """mdmd:hidden""" - message = ( - "`Image.conda_install` is deprecated." - " Please use the faster and more reliable `Image.micromamba_install` instead." - ) - deprecation_error((2025, 5, 2), message) - - def conda_update_from_environment( - self, - environment_yml: str, - force_build: bool = False, # Ignore cached builds, similar to 'docker build --no-cache' - *, - secrets: Sequence[_Secret] = [], - gpu: GPU_T = None, - ): - """mdmd:hidden""" - message = ( - "Image.conda_update_from_environment` is deprecated." - " Please use the `Image.micromamba_install` method (with the `spec_file` parameter) instead." - ) - deprecation_error((2025, 5, 2), message) - @staticmethod def micromamba( python_version: Optional[str] = None,