From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../python3.12/site-packages/azure/common/cloud.py | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/azure/common/cloud.py (limited to '.venv/lib/python3.12/site-packages/azure/common/cloud.py') diff --git a/.venv/lib/python3.12/site-packages/azure/common/cloud.py b/.venv/lib/python3.12/site-packages/azure/common/cloud.py new file mode 100644 index 00000000..ec286e80 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/common/cloud.py @@ -0,0 +1,30 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +def get_cli_active_cloud(): + """Return a CLI active cloud. + + *Disclaimer*: This method is not working for azure-cli-core>=2.21.0 (released in March 2021). + + .. versionadded:: 1.1.6 + + .. deprecated:: 1.1.28 + + :return: A CLI Cloud + :rtype: azure.cli.core.cloud.Cloud + :raises: ImportError if azure-cli-core package is not available + """ + + try: + from azure.cli.core.cloud import get_active_cloud + except ImportError: + raise ImportError( + "The public API of azure-cli-core has been deprecated starting 2.21.0, " + + "and this method no longer can return a cloud instance. " + + "If you want to use this method, you need to install 'azure-cli-core<2.21.0'. " + + "You may corrupt data if you use current CLI and old azure-cli-core." + ) + return get_active_cloud() -- cgit v1.2.3