diff --git a/repo2docker/app.py b/repo2docker/app.py index 71171405..5feba05a 100755 --- a/repo2docker/app.py +++ b/repo2docker/app.py @@ -267,7 +267,7 @@ def _platform_default(self): """ p = get_platform() if p == "linux/arm64": - warnings.warn( + self.log.warning( "Building for linux/arm64 is experimental. " "To use the recommended platform set --Repo2Docker.platform=linux/amd64. " "To silence this warning set --Repo2Docker.platform=linux/arm64." diff --git a/repo2docker/buildpacks/conda/__init__.py b/repo2docker/buildpacks/conda/__init__.py index 2a3e694d..a9c6670e 100644 --- a/repo2docker/buildpacks/conda/__init__.py +++ b/repo2docker/buildpacks/conda/__init__.py @@ -355,7 +355,7 @@ def uses_r(self): @property def py2(self): """Am I building a Python 2 kernel environment?""" - warnings.warn( + self.log.warning( "CondaBuildPack.py2 is deprecated in 2023.2. Use CondaBuildPack.separate_kernel_env.", DeprecationWarning, stacklevel=2, diff --git a/repo2docker/utils.py b/repo2docker/utils.py index 9c2769e1..443db97e 100644 --- a/repo2docker/utils.py +++ b/repo2docker/utils.py @@ -543,5 +543,4 @@ def get_platform(): # OSX reports arm64 return "linux/arm64" else: - warnings.warn(f"Unexpected platform '{m}', defaulting to linux/amd64") - return "linux/amd64" + raise ValueError("Unsupported platform {m}")