From e45e19c13a0f3e50ac16d0d85e4da08a2ea147b0 Mon Sep 17 00:00:00 2001 From: Lewis Gaul Date: Mon, 8 Apr 2024 15:51:02 +0100 Subject: [PATCH] Emit a DeprecationWarning when downloading the docker client --- python_on_whales/download_binaries.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python_on_whales/download_binaries.py b/python_on_whales/download_binaries.py index 9c30953c..a065d471 100644 --- a/python_on_whales/download_binaries.py +++ b/python_on_whales/download_binaries.py @@ -1,3 +1,5 @@ +__all__ = ("download_docker_cli", "get_docker_binary_path_in_cache") + import platform import shutil import tempfile @@ -31,6 +33,13 @@ def get_docker_cli_url(): def download_docker_cli(): + warnings.warn( + "Downloading the docker client with python-on-whales is being " + "deprecated, and this functionality will be removed in v1.0. " + "See https://github.com/gabrieldemarmiesse/python-on-whales/issues/556 " + "for planned v1.0 changes.", + DeprecationWarning, + ) file_to_download = get_docker_cli_url() extension = file_to_download.split(".")[-1]