Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package azure-cli-core for openSUSE:Factory 
checked in at 2023-05-04 17:10:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-core (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli-core.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli-core"

Thu May  4 17:10:02 2023 rev:52 rq:1084281 version:2.48.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-core/azure-cli-core.changes    
2023-04-05 21:35:30.226516655 +0200
+++ /work/SRC/openSUSE:Factory/.azure-cli-core.new.1533/azure-cli-core.changes  
2023-05-04 17:10:12.804238093 +0200
@@ -1,0 +2,8 @@
+Wed May  3 11:09:12 UTC 2023 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- New upstream release
+  + Version 2.48.1
+  + For detailed information about changes see the
+    HISTORY.rst file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-core-2.47.0.tar.gz

New:
----
  azure-cli-core-2.48.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ azure-cli-core.spec ++++++
--- /var/tmp/diff_new_pack.HE33Xf/_old  2023-05-04 17:10:13.344241255 +0200
+++ /var/tmp/diff_new_pack.HE33Xf/_new  2023-05-04 17:10:13.348241278 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           azure-cli-core
-Version:        2.47.0
+Version:        2.48.1
 Release:        0
 Summary:        Microsoft Azure CLI Core Module
 License:        MIT

++++++ azure-cli-core-2.47.0.tar.gz -> azure-cli-core-2.48.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/HISTORY.rst 
new/azure-cli-core-2.48.1/HISTORY.rst
--- old/azure-cli-core-2.47.0/HISTORY.rst       2023-03-31 11:26:38.000000000 
+0200
+++ new/azure-cli-core-2.48.1/HISTORY.rst       2023-04-25 06:21:03.000000000 
+0200
@@ -3,6 +3,16 @@
 Release History
 ===============
 
+2.48.1
+++++++
+* No changes
+
+2.48.0
+++++++
+* `aaz`: Support hidden secret properties of response in output (#26102)
+* `aaz`: Support `AAZPasswordArg` (#26134)
+* `aaz`: Support argument prompt input for simple type args (#26134)
+
 2.47.0
 ++++++
 * `aaz`: Add support for changing subscription of `AAZCommand` in 
customization code (#25745)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/PKG-INFO 
new/azure-cli-core-2.48.1/PKG-INFO
--- old/azure-cli-core-2.47.0/PKG-INFO  2023-03-31 11:27:03.349830000 +0200
+++ new/azure-cli-core-2.48.1/PKG-INFO  2023-04-25 06:21:41.873754700 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-cli-core
-Version: 2.47.0
+Version: 2.48.1
 Summary: Microsoft Azure Command-Line Tools Core Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/__init__.py 
new/azure-cli-core-2.48.1/azure/cli/core/__init__.py
--- old/azure-cli-core-2.47.0/azure/cli/core/__init__.py        2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/__init__.py        2023-04-25 
06:21:03.000000000 +0200
@@ -4,7 +4,7 @@
 # 
--------------------------------------------------------------------------------------------
 # pylint: disable=line-too-long
 
-__version__ = "2.47.0"
+__version__ = "2.48.1"
 
 import os
 import sys
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/aaz/__init__.py 
new/azure-cli-core-2.48.1/azure/cli/core/aaz/__init__.py
--- old/azure-cli-core-2.47.0/azure/cli/core/aaz/__init__.py    2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/aaz/__init__.py    2023-04-25 
06:21:03.000000000 +0200
@@ -12,7 +12,7 @@
 from ._arg import AAZArgumentsSchema, AAZArgEnum, AAZStrArg, AAZIntArg, 
AAZObjectArg, AAZDictArg, \
     AAZFreeFormDictArg, AAZFloatArg, AAZBaseArg, AAZBoolArg, AAZListArg, 
AAZResourceGroupNameArg, \
     AAZResourceLocationArg, AAZResourceIdArg, AAZSubscriptionIdArg, 
AAZUuidArg, AAZDateArg, AAZTimeArg, \
-    AAZDateTimeArg, AAZDurationArg, AAZFileArg
+    AAZDateTimeArg, AAZDurationArg, AAZFileArg, AAZPasswordArg
 from ._arg_fmt import AAZStrArgFormat, AAZIntArgFormat, AAZFloatArgFormat, 
AAZBoolArgFormat, AAZObjectArgFormat, \
     AAZDictArgFormat, AAZFreeFormDictArgFormat, AAZListArgFormat, 
AAZResourceLocationArgFormat, \
     AAZResourceIdArgFormat, AAZSubscriptionIdArgFormat, AAZUuidFormat, 
AAZDateFormat, AAZTimeFormat, \
@@ -24,4 +24,5 @@
     AAZListType, AAZObjectType
 from ._operation import AAZHttpOperation, AAZJsonInstanceUpdateOperation, 
AAZGenericInstanceUpdateOperation, \
     AAZJsonInstanceDeleteOperation, AAZJsonInstanceCreateOperation
+from ._prompt import AAZPromptInput, AAZPromptPasswordInput
 from ._selector import AAZJsonSelector
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/aaz/_arg.py 
new/azure-cli-core-2.48.1/azure/cli/core/aaz/_arg.py
--- old/azure-cli-core-2.47.0/azure/cli/core/aaz/_arg.py        2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/aaz/_arg.py        2023-04-25 
06:21:03.000000000 +0200
@@ -21,6 +21,7 @@
     AAZSubscriptionIdArgFormat, AAZResourceLocationArgFormat, 
AAZResourceIdArgFormat, AAZUuidFormat, AAZDateFormat, \
     AAZTimeFormat, AAZDateTimeFormat, AAZDurationFormat, AAZFileArgTextFormat
 from .exceptions import AAZUnregisteredArg
+from ._prompt import AAZPromptInput
 
 # pylint: disable=redefined-builtin, protected-access, too-few-public-methods
 
@@ -134,6 +135,12 @@
 
         if self._blank != AAZUndefined:
             arg.nargs = '?'
+            if isinstance(self._blank, AAZPromptInput):
+                short_summary = arg.type.settings.get('help', None) or ''
+                if short_summary:
+                    short_summary += '  '
+                short_summary += self._blank.help_message
+                arg.help = short_summary
 
         cli_ctx = kwargs.get('cli_ctx', None)
         if cli_ctx is None:
@@ -270,6 +277,13 @@
         return "GUID/UUID"
 
 
+class AAZPasswordArg(AAZStrArg):
+
+    @property
+    def _type_in_help(self):
+        return "Password"
+
+
 class AAZIntArg(AAZSimpleTypeArg, AAZIntType):
 
     @property
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-core-2.47.0/azure/cli/core/aaz/_arg_action.py 
new/azure-cli-core-2.48.1/azure/cli/core/aaz/_arg_action.py
--- old/azure-cli-core-2.47.0/azure/cli/core/aaz/_arg_action.py 2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/aaz/_arg_action.py 2023-04-25 
06:21:03.000000000 +0200
@@ -3,7 +3,7 @@
 # Licensed under the MIT License. See License.txt in the project root for 
license information.
 # 
--------------------------------------------------------------------------------------------
 
-# pylint: disable=protected-access
+# pylint: disable=protected-access, too-few-public-methods
 
 import copy
 import os
@@ -11,11 +11,13 @@
 from collections import OrderedDict
 
 from knack.log import get_logger
+from knack.prompting import NoTTYException
 
 from azure.cli.core import azclierror
 from ._base import AAZUndefined, AAZBlankArgValue
 from ._help import AAZShowHelp
 from ._utils import AAZShortHandSyntaxParser
+from ._prompt import AAZPromptInput
 from .exceptions import AAZInvalidShorthandSyntaxError, AAZInvalidValueError, 
AAZUnknownFieldError
 
 logger = get_logger(__name__)
@@ -23,6 +25,23 @@
 _ELEMENT_APPEND_KEY = "_+_"  # used for list append
 
 
+class AAZPromptInputOperation:
+
+    def __init__(self, prompt: AAZPromptInput, action_cls):
+        self.prompt = prompt
+        self.action_cls = action_cls
+
+    def __call__(self, *args, **kwargs):
+        try:
+            data = self.prompt()
+        except NoTTYException:
+            raise AAZInvalidValueError("argument value cannot be blank in 
non-interactive mode.")
+        try:
+            return self.action_cls.format_data(data)
+        except (ValueError, KeyError) as ex:
+            raise azclierror.InvalidArgumentValueError(f"Failed to parse 
value: {ex}") from ex
+
+
 class AAZArgActionOperations:
     """AAZArg operations container"""
 
@@ -34,6 +53,8 @@
 
     def apply(self, args, dest):
         for keys, data in self._ops:
+            if isinstance(data, AAZPromptInputOperation):
+                data = data()
             self._assign_data(args, data, dest, *keys)
 
     @staticmethod
@@ -123,6 +144,10 @@
         if data == AAZBlankArgValue:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument value cannot be blank")
+            if isinstance(cls._schema._blank, AAZPromptInput):
+                # Postpone the prompt input when apply the operation.
+                # In order not to break the logic of displaying help or 
validating other parameters.
+                return AAZPromptInputOperation(prompt=cls._schema._blank, 
action_cls=cls)
             data = copy.deepcopy(cls._schema._blank)
 
         if isinstance(data, str):
@@ -151,6 +176,8 @@
         if values is None:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument cannot be blank")
+            assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt 
input is not supported in " \
+                                                                       
"CompoundType args."
             dest_ops.add(copy.deepcopy(cls._schema._blank), *prefix_keys)
         else:
             assert isinstance(values, list)
@@ -248,6 +275,7 @@
         if data == AAZBlankArgValue:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument value cannot be blank")
+            assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt 
input is not supported in Object args."
             data = copy.deepcopy(cls._schema._blank)
 
         if data is None:
@@ -275,6 +303,7 @@
         if data == AAZBlankArgValue:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument value cannot be blank")
+            assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt 
input is not supported in Dict args."
             data = copy.deepcopy(cls._schema._blank)
 
         if data is None:
@@ -326,6 +355,8 @@
         if data == AAZBlankArgValue:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument value cannot be blank")
+            assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt 
input is not supported in " \
+                                                                       
"FreeFormDict args."
             data = copy.deepcopy(cls._schema._blank)
 
         if isinstance(data, dict):
@@ -374,6 +405,7 @@
         if values is None:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument cannot be blank")
+            assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt 
input is not supported in List args."
             dest_ops.add(copy.deepcopy(cls._schema._blank), *prefix_keys)
         else:
             assert isinstance(values, list)
@@ -430,6 +462,7 @@
         if data == AAZBlankArgValue:
             if cls._schema._blank == AAZUndefined:
                 raise AAZInvalidValueError("argument value cannot be blank")
+            assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt 
input is not supported in List args."
             data = copy.deepcopy(cls._schema._blank)
 
         if data is None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/aaz/_command.py 
new/azure-cli-core-2.48.1/azure/cli/core/aaz/_command.py
--- old/azure-cli-core-2.47.0/azure/cli/core/aaz/_command.py    2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/aaz/_command.py    2023-04-25 
06:21:03.000000000 +0200
@@ -180,7 +180,7 @@
         super().update_argument(param_name, argtype)
 
     @staticmethod
-    def deserialize_output(value, client_flatten=True):
+    def deserialize_output(value, client_flatten=True, secret_hidden=True):
         """ Deserialize output of a command.
         """
         if not isinstance(value, AAZBaseValue):
@@ -191,7 +191,7 @@
             if result == AAZUndefined:
                 return result
 
-            if client_flatten and isinstance(schema, AAZObjectType):
+            if isinstance(schema, AAZObjectType):
                 # handle client flatten in result
                 disc_schema = schema.get_discriminator(result)
                 new_result = {}
@@ -205,7 +205,11 @@
                         # get k_schema from discriminator definition
                         k_schema = disc_schema[k]
 
-                    if k_schema._flags.get('client_flatten', False):
+                    if secret_hidden and k_schema._flags.get('secret', False):
+                        # hidden secret properties in output
+                        continue
+
+                    if client_flatten and 
k_schema._flags.get('client_flatten', False):
                         # flatten k when there are client_flatten flag in it's 
schema
                         assert isinstance(k_schema, AAZObjectType) and 
isinstance(v, dict)
                         for sub_k, sub_v in v.items():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/aaz/_prompt.py 
new/azure-cli-core-2.48.1/azure/cli/core/aaz/_prompt.py
--- old/azure-cli-core-2.47.0/azure/cli/core/aaz/_prompt.py     1970-01-01 
01:00:00.000000000 +0100
+++ new/azure-cli-core-2.48.1/azure/cli/core/aaz/_prompt.py     2023-04-25 
06:21:03.000000000 +0200
@@ -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.
+# 
--------------------------------------------------------------------------------------------
+# pylint: disable=too-few-public-methods
+from knack.prompting import prompt, prompt_pass
+
+
+class AAZPromptInput:
+
+    def __init__(self, msg, help_string=None):
+        self._msg = msg
+        self._help_string = help_string
+
+    def __call__(self, *args, **kwargs):
+        return prompt(msg=self._msg, help_string=self._help_string)
+
+    @property
+    def help_message(self):
+        return "If value is blank it's asked from the tty."
+
+
+class AAZPromptPasswordInput(AAZPromptInput):
+
+    def __init__(self, msg, confirm=False, help_string=None):
+        super().__init__(msg=msg, help_string=help_string)
+        self._confirm = confirm
+
+    def __call__(self, *args, **kwargs):
+        return prompt_pass(msg=self._msg, confirm=self._confirm, 
help_string=self._help_string)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/mock.py 
new/azure-cli-core-2.48.1/azure/cli/core/mock.py
--- old/azure-cli-core-2.47.0/azure/cli/core/mock.py    2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/mock.py    2023-04-25 
06:21:03.000000000 +0200
@@ -8,7 +8,7 @@
 
 class DummyCli(AzCli):
     """A dummy CLI instance can be used to facilitate automation"""
-    def __init__(self, commands_loader_cls=None, **kwargs):
+    def __init__(self, commands_loader_cls=None, random_config_dir=False, 
**kwargs):
         import os
 
         from azure.cli.core import MainCommandsLoader
@@ -16,6 +16,7 @@
         from azure.cli.core.azlogging import AzCliLogging
         from azure.cli.core.cloud import get_active_cloud
         from azure.cli.core.parser import AzCliCommandParser
+        from azure.cli.core.util import random_string
         from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX
         from azure.cli.core._help import AzCliHelp
         from azure.cli.core._output import AzOutputProducer
@@ -24,7 +25,8 @@
 
         super(DummyCli, self).__init__(
             cli_name='az',
-            config_dir=GLOBAL_CONFIG_DIR,
+            config_dir=os.path.join(GLOBAL_CONFIG_DIR, 'dummy_cli_config_dir',
+                                    random_string()) if random_config_dir else 
GLOBAL_CONFIG_DIR,
             config_env_var_prefix=ENV_VAR_PREFIX,
             commands_loader_cls=commands_loader_cls or MainCommandsLoader,
             parser_cls=AzCliCommandParser,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-core-2.47.0/azure/cli/core/profiles/_shared.py 
new/azure-cli-core-2.48.1/azure/cli/core/profiles/_shared.py
--- old/azure-cli-core-2.47.0/azure/cli/core/profiles/_shared.py        
2023-03-31 11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/profiles/_shared.py        
2023-04-25 06:21:03.000000000 +0200
@@ -206,7 +206,7 @@
         ResourceType.DATA_STORAGE: '2018-11-09',
         ResourceType.DATA_STORAGE_BLOB: '2021-06-08',
         ResourceType.DATA_STORAGE_FILEDATALAKE: '2021-08-06',
-        ResourceType.DATA_STORAGE_FILESHARE: '2021-06-08',
+        ResourceType.DATA_STORAGE_FILESHARE: '2022-11-02',
         ResourceType.DATA_STORAGE_QUEUE: '2018-03-28',
         ResourceType.DATA_COSMOS_TABLE: '2017-04-17',
         ResourceType.MGMT_SERVICEBUS: '2022-10-01-preview',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/azure/cli/core/util.py 
new/azure-cli-core-2.48.1/azure/cli/core/util.py
--- old/azure-cli-core-2.47.0/azure/cli/core/util.py    2023-03-31 
11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure/cli/core/util.py    2023-04-25 
06:21:03.000000000 +0200
@@ -314,7 +314,7 @@
 
 
 def _update_latest_from_github(versions):
-    if not check_connectivity(max_retries=0):
+    if not check_connectivity(url='https://raw.githubusercontent.com', 
max_retries=0):
         return versions, False
     success = True
     for pkg in ['azure-cli-core', 'azure-cli-telemetry']:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-core-2.47.0/azure_cli_core.egg-info/PKG-INFO 
new/azure-cli-core-2.48.1/azure_cli_core.egg-info/PKG-INFO
--- old/azure-cli-core-2.47.0/azure_cli_core.egg-info/PKG-INFO  2023-03-31 
11:27:03.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure_cli_core.egg-info/PKG-INFO  2023-04-25 
06:21:41.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-cli-core
-Version: 2.47.0
+Version: 2.48.1
 Summary: Microsoft Azure Command-Line Tools Core Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-core-2.47.0/azure_cli_core.egg-info/SOURCES.txt 
new/azure-cli-core-2.48.1/azure_cli_core.egg-info/SOURCES.txt
--- old/azure-cli-core-2.47.0/azure_cli_core.egg-info/SOURCES.txt       
2023-03-31 11:27:03.000000000 +0200
+++ new/azure-cli-core-2.48.1/azure_cli_core.egg-info/SOURCES.txt       
2023-04-25 06:21:41.000000000 +0200
@@ -49,6 +49,7 @@
 azure/cli/core/aaz/_operation.py
 azure/cli/core/aaz/_paging.py
 azure/cli/core/aaz/_poller.py
+azure/cli/core/aaz/_prompt.py
 azure/cli/core/aaz/_selector.py
 azure/cli/core/aaz/_utils.py
 azure/cli/core/aaz/exceptions.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-core-2.47.0/setup.py 
new/azure-cli-core-2.48.1/setup.py
--- old/azure-cli-core-2.47.0/setup.py  2023-03-31 11:26:38.000000000 +0200
+++ new/azure-cli-core-2.48.1/setup.py  2023-04-25 06:21:03.000000000 +0200
@@ -8,7 +8,7 @@
 from codecs import open
 from setuptools import setup, find_packages
 
-VERSION = "2.47.0"
+VERSION = "2.48.1"
 
 # If we have source, validate that our version numbers match
 # This should prevent uploading releases with mismatched versions.

Reply via email to