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-08-17 19:43:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azure-cli-core (Old) and /work/SRC/openSUSE:Factory/.azure-cli-core.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-core" Thu Aug 17 19:43:41 2023 rev:55 rq:1104152 version:2.51.0 Changes: -------- --- /work/SRC/openSUSE:Factory/azure-cli-core/azure-cli-core.changes 2023-07-15 23:15:22.695592000 +0200 +++ /work/SRC/openSUSE:Factory/.azure-cli-core.new.1766/azure-cli-core.changes 2023-08-17 19:43:54.546830181 +0200 @@ -1,0 +2,9 @@ +Mon Aug 14 14:26:18 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- New upstream release + + Version 2.51.0 + + For detailed information about changes see the + HISTORY.rst file provided with this package +- Update Requires from setup.py + +------------------------------------------------------------------- Old: ---- azure-cli-core-2.50.0.tar.gz New: ---- azure-cli-core-2.51.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azure-cli-core.spec ++++++ --- /var/tmp/diff_new_pack.YOSz57/_old 2023-08-17 19:43:55.394831767 +0200 +++ /var/tmp/diff_new_pack.YOSz57/_new 2023-08-17 19:43:55.398831775 +0200 @@ -17,7 +17,7 @@ Name: azure-cli-core -Version: 2.50.0 +Version: 2.51.0 Release: 0 Summary: Microsoft Azure CLI Core Module License: MIT @@ -32,7 +32,7 @@ BuildRequires: python3-azure-nspkg >= 3.0.0 BuildRequires: python3-setuptools Requires: azure-cli-nspkg -Requires: azure-cli-telemetry >= 1.0.8 +Requires: azure-cli-telemetry >= 1.1.0 Requires: python3-PyJWT >= 2.1.0 Requires: python3-argcomplete < 4.0 Requires: python3-argcomplete >= 3.1.1 @@ -44,9 +44,9 @@ Requires: python3-humanfriendly >= 10.0 Requires: python3-jmespath Requires: python3-knack < 1.0.0 -Requires: python3-knack >= 0.10.0 +Requires: python3-knack >= 0.11.0 Requires: python3-msal < 2.0.0 -Requires: python3-msal >= 1.22.0 +Requires: python3-msal >= 1.24.0~b1 Requires: python3-msal-extensions < 2.0.0 Requires: python3-msal-extensions >= 1.0.0 Requires: python3-msrestazure < 0.7.0 ++++++ azure-cli-core-2.50.0.tar.gz -> azure-cli-core-2.51.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/HISTORY.rst new/azure-cli-core-2.51.0/HISTORY.rst --- old/azure-cli-core-2.50.0/HISTORY.rst 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/HISTORY.rst 2023-07-27 09:10:05.000000000 +0200 @@ -3,6 +3,13 @@ Release History =============== +2.51.0 +++++++ +* `aaz`: Add `--max-items` and `--next-token` for pagination (#26710) +* `aaz`: Support paginating calculation (#26713) +* `aaz`: Support blank input for compound argument types (#26870) +* Drop client telemetry cache strategy (#26854) + 2.50.0 ++++++ * `aaz`: Add short summary for `--location` when its default value comes from resource group (#26584) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/PKG-INFO new/azure-cli-core-2.51.0/PKG-INFO --- old/azure-cli-core-2.50.0/PKG-INFO 2023-06-29 13:20:16.092210800 +0200 +++ new/azure-cli-core-2.51.0/PKG-INFO 2023-07-27 09:10:24.651254200 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-cli-core -Version: 2.50.0 +Version: 2.51.0 Summary: Microsoft Azure Command-Line Tools Core Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation @@ -11,12 +11,11 @@ Classifier: Intended Audience :: System Administrators Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: License :: OSI Approved :: MIT License -Requires-Python: >=3.7.0 +Requires-Python: >=3.8.0 License-File: LICENSE.txt Microsoft Azure CLI Core Module diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/__init__.py new/azure-cli-core-2.51.0/azure/cli/core/__init__.py --- old/azure-cli-core-2.50.0/azure/cli/core/__init__.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/__init__.py 2023-07-27 09:10:05.000000000 +0200 @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- # pylint: disable=line-too-long -__version__ = "2.50.0" +__version__ = "2.51.0" import os import sys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/_profile.py new/azure-cli-core-2.51.0/azure/cli/core/_profile.py --- old/azure-cli-core-2.50.0/azure/cli/core/_profile.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/_profile.py 2023-07-27 09:10:05.000000000 +0200 @@ -640,8 +640,8 @@ self._set_subscriptions(result, merge=False) def get_sp_auth_info(self, subscription_id=None, name=None, password=None, cert_file=None): - """Generate a JSON for --sdk-auth argument when used in: - - az ad sp create-for-rbac --sdk-auth + """Generate a JSON for --json-auth argument when used in: + - az ad sp create-for-rbac --json-auth """ from collections import OrderedDict account = self.get_subscription(subscription_id) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/__init__.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/__init__.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/__init__.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/__init__.py 2023-07-27 09:10:05.000000000 +0200 @@ -12,11 +12,12 @@ from ._arg import AAZArgumentsSchema, AAZArgEnum, AAZStrArg, AAZIntArg, AAZObjectArg, AAZDictArg, \ AAZFreeFormDictArg, AAZFloatArg, AAZBaseArg, AAZBoolArg, AAZListArg, AAZResourceGroupNameArg, \ AAZResourceLocationArg, AAZResourceIdArg, AAZSubscriptionIdArg, AAZUuidArg, AAZDateArg, AAZTimeArg, \ - AAZDateTimeArg, AAZDurationArg, AAZFileArg, AAZPasswordArg + AAZDateTimeArg, AAZDurationArg, AAZFileArg, AAZPasswordArg, AAZPaginationTokenArg, AAZPaginationLimitArg from ._arg_fmt import AAZStrArgFormat, AAZIntArgFormat, AAZFloatArgFormat, AAZBoolArgFormat, AAZObjectArgFormat, \ AAZDictArgFormat, AAZFreeFormDictArgFormat, AAZListArgFormat, AAZResourceLocationArgFormat, \ AAZResourceIdArgFormat, AAZSubscriptionIdArgFormat, AAZUuidFormat, AAZDateFormat, AAZTimeFormat, \ - AAZDateTimeFormat, AAZDurationFormat, AAZFileArgTextFormat, AAZFileArgBase64EncodeFormat, AAZFileArgFormat + AAZDateTimeFormat, AAZDurationFormat, AAZFileArgTextFormat, AAZFileArgBase64EncodeFormat, AAZFileArgFormat, \ + AAZPaginationTokenArgFormat from ._base import has_value, AAZValuePatch, AAZUndefined from ._command import AAZCommand, AAZWaitCommand, AAZCommandGroup, \ register_callback, register_command, register_command_group, load_aaz_command_table, link_helper diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/_arg.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/_arg.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/_arg.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/_arg.py 2023-07-27 09:10:05.000000000 +0200 @@ -19,11 +19,12 @@ from ._field_value import AAZObject from ._arg_fmt import AAZObjectArgFormat, AAZListArgFormat, AAZDictArgFormat, AAZFreeFormDictArgFormat, \ AAZSubscriptionIdArgFormat, AAZResourceLocationArgFormat, AAZResourceIdArgFormat, AAZUuidFormat, AAZDateFormat, \ - AAZTimeFormat, AAZDateTimeFormat, AAZDurationFormat, AAZFileArgTextFormat + AAZTimeFormat, AAZDateTimeFormat, AAZDurationFormat, AAZFileArgTextFormat, AAZPaginationTokenArgFormat, \ + AAZIntArgFormat from .exceptions import AAZUnregisteredArg from ._prompt import AAZPromptInput -# pylint: disable=redefined-builtin, protected-access, too-few-public-methods +# pylint: disable=redefined-builtin, protected-access, too-few-public-methods, too-many-instance-attributes class AAZArgumentsSchema(AAZObjectType): @@ -73,7 +74,7 @@ f"unrecognized value '{data}' from choices '{self.to_choices()}' ") -class AAZBaseArg(AAZBaseType): # pylint: disable=too-many-instance-attributes +class AAZBaseArg(AAZBaseType): """Base argument""" def __init__(self, options=None, required=False, help=None, arg_group=None, is_preview=False, is_experimental=False, @@ -656,3 +657,42 @@ class Action(AAZGenericUpdateAction): ACTION_NAME = "remove" return Action + + +class AAZPaginationTokenArg(AAZStrArg): + def __init__( + self, options=("--next-token",), arg_group="Pagination", + help="Token to specify where to start paginating. This is the token value from a previously truncated " + "response.", + fmt=None, + **kwargs + ): + fmt = fmt or AAZPaginationTokenArgFormat() + + super().__init__( + options=options, + arg_group=arg_group, + help=help, + fmt=fmt, + **kwargs, + ) + + +class AAZPaginationLimitArg(AAZIntArg): + def __init__( + self, options=("--max-items",), arg_group="Pagination", + help="Total number of items to return in the command's output. If the total number of items available is " + "more than the value specified, a token is provided in the command's output. To resume pagination, " + "provide the token value in `--next-token` argument of a subsequent command.", + fmt=None, + **kwargs + ): + fmt = fmt or AAZIntArgFormat(minimum=1) + + super().__init__( + options=options, + arg_group=arg_group, + help=help, + fmt=fmt, + **kwargs, + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/_arg_action.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/_arg_action.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/_arg_action.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/_arg_action.py 2023-07-27 09:10:05.000000000 +0200 @@ -173,7 +173,7 @@ def setup_operations(cls, dest_ops, values, prefix_keys=None): if prefix_keys is None: prefix_keys = [] - if values is None: + if values is None or values == []: if cls._schema._blank == AAZUndefined: raise AAZInvalidValueError("argument cannot be blank") assert not isinstance(cls._schema._blank, AAZPromptInput), "Prompt input is not supported in " \ @@ -402,7 +402,7 @@ def setup_operations(cls, dest_ops, values, prefix_keys=None): if prefix_keys is None: prefix_keys = [] - if values is None: + if values is None or values == []: 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." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/_arg_fmt.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/_arg_fmt.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/_arg_fmt.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/_arg_fmt.py 2023-07-27 09:10:05.000000000 +0200 @@ -5,6 +5,8 @@ # pylint: disable=line-too-long, too-few-public-methods import abc +import base64 +import json import os.path import re import math @@ -757,7 +759,6 @@ class AAZFileArgBase64EncodeFormat(AAZFileArgFormat): def read_file(self, file_path): - import base64 with open(file_path, 'rb') as f: contents = f.read() base64_data = base64.b64encode(contents) @@ -766,3 +767,41 @@ except UnicodeDecodeError: data = str(base64_data) return data + + +class AAZPaginationTokenArgFormat(AAZBaseArgFormat): + def __call__(self, ctx, value): + def validate_json(s): + try: + obj = json.loads(s) + except json.JSONDecodeError: + raise AAZInvalidArgValueError("Invalid JSON object.") + + if not isinstance(obj, dict): + raise AAZInvalidArgValueError("Decoded object is not a dictionary.") + + try: + _, _ = obj["next_link"], obj["offset"] + except KeyError: + raise AAZInvalidArgValueError("`next_link` or `offset` doesn't exist.") + + assert isinstance(value, AAZSimpleValue) + data = value._data + if data == AAZUndefined or data is None or value._is_patch: + return value + + assert isinstance(data, str) + try: + decoded_bytes = base64.b64decode(data) + except base64.binascii.Error: + raise AAZInvalidArgValueError("Invalid Base64 string.") + + try: + decoded_string = decoded_bytes.decode("utf-8") + except UnicodeDecodeError: + raise AAZInvalidArgValueError("Error decoding UTF-8.") + + validate_json(decoded_string) + value._data = decoded_string + + return value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/_command.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/_command.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/_command.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/_command.py 2023-07-27 09:10:05.000000000 +0200 @@ -17,7 +17,8 @@ from azure.cli.core.azclierror import CLIInternalError from ._arg import AAZArgumentsSchema, AAZBoolArg, \ - AAZGenericUpdateAddArg, AAZGenericUpdateSetArg, AAZGenericUpdateRemoveArg, AAZGenericUpdateForceStringArg + AAZGenericUpdateAddArg, AAZGenericUpdateSetArg, AAZGenericUpdateRemoveArg, AAZGenericUpdateForceStringArg, \ + AAZPaginationTokenArg, AAZPaginationLimitArg from ._base import AAZUndefined, AAZBaseValue from ._field_type import AAZObjectType from ._paging import AAZPaged @@ -61,6 +62,7 @@ AZ_HELP = None AZ_SUPPORT_NO_WAIT = False AZ_SUPPORT_GENERIC_UPDATE = False + AZ_SUPPORT_PAGINATION = False AZ_CONFIRMATION = None AZ_PREVIEW_INFO = None @@ -90,6 +92,9 @@ schema.generic_update_set = AAZGenericUpdateSetArg() schema.generic_update_remove = AAZGenericUpdateRemoveArg() schema.generic_update_force_string = AAZGenericUpdateForceStringArg() + if cls.AZ_SUPPORT_PAGINATION: + schema.pagination_token = AAZPaginationTokenArg() + schema.pagination_limit = AAZPaginationLimitArg() return schema def __init__(self, loader=None, cli_ctx=None, callbacks=None, **kwargs): @@ -243,7 +248,17 @@ self.ctx.next_link = next_link executor() - return AAZPaged(executor=executor_wrapper, extract_result=extract_result) + if self.AZ_SUPPORT_PAGINATION: + args = self.ctx.args + token = args.pagination_token.to_serialized_data() + limit = args.pagination_limit.to_serialized_data() + + return AAZPaged( + executor=executor_wrapper, extract_result=extract_result, cli_ctx=self.cli_ctx, + token=token, limit=limit + ) + + return AAZPaged(executor=executor_wrapper, extract_result=extract_result, cli_ctx=self.cli_ctx) class AAZWaitCommand(AAZCommand): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/_help.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/_help.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/_help.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/_help.py 2023-07-27 09:10:05.000000000 +0200 @@ -44,7 +44,7 @@ key = self.keys[idx] if isinstance(schema, AAZObjectArg): try: - schema = schema[key] + schema = schema[key] # pylint: disable=unsubscriptable-object except AAZUndefinedValueError: # show the help of current schema break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/aaz/_paging.py new/azure-cli-core-2.51.0/azure/cli/core/aaz/_paging.py --- old/azure-cli-core-2.50.0/azure/cli/core/aaz/_paging.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/aaz/_paging.py 2023-07-27 09:10:05.000000000 +0200 @@ -2,40 +2,78 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- - +import base64 import itertools -from typing import Iterator -import logging - -_LOGGER = logging.getLogger(__name__) +import json -class AAZPageIterator(Iterator[Iterator]): - def __init__(self, executor, extract_result): +class AAZPageIterator: # pylint: disable=too-many-instance-attributes + def __init__(self, executor, extract_result, cli_ctx, next_link, offset, limit): self._executor = executor self._extract_result = extract_result - self._next_link = None - self._did_once_already = False + self._cli_ctx = cli_ctx + self._next_link = next_link + self._did_once_already = bool(next_link) # desired start + self._total = limit + offset if isinstance(limit, int) else None + self._start = offset + self._curr_link = None + self._curr_size = None def __iter__(self): return self def __next__(self): + def next_token(_, result): # pylint: disable=unused-argument + from knack.log import get_logger + logger = get_logger(__name__) + + token = {"next_link": self._curr_link, "offset": self._curr_size + self._total} + token = json.dumps(token).encode("utf-8") + logger.warning("Token of next page: %s", base64.b64encode(token).decode("utf-8")) + + if self._total is not None and self._total < 0: + from knack.events import EVENT_CLI_SUCCESSFUL_EXECUTE + self._cli_ctx.register_event(EVENT_CLI_SUCCESSFUL_EXECUTE, next_token) + + raise StopIteration + if not self._next_link and self._did_once_already: - raise StopIteration("End of paging") + raise StopIteration("End of paginating.") + self._executor(self._next_link) self._did_once_already = True - result, self._next_link = self._extract_result() - return iter(result) + self._curr_link = self._next_link + curr_page, self._next_link = self._extract_result() + + if self._total is None: + return iter(curr_page) + + start = self._start # record 1st time only + self._start = 0 + self._curr_size = len(curr_page) + self._total -= self._curr_size + + if self._total < 0: + return iter(curr_page[start:self._total]) # smaller than current page + + return iter(curr_page[start:]) -class AAZPaged(Iterator): +class AAZPaged: + def __init__(self, executor, extract_result, cli_ctx, token=None, limit=None): + if isinstance(limit, int) and isinstance(token, str): + next_token = json.loads(token) + else: + next_token = {"next_link": None, "offset": 0} # default value - def __init__(self, executor, extract_result): self._page_iterator = itertools.chain.from_iterable( AAZPageIterator( executor=executor, - extract_result=extract_result + extract_result=extract_result, + cli_ctx=cli_ctx, + next_link=next_token["next_link"], + offset=next_token["offset"], + limit=limit ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/auth/util.py new/azure-cli-core-2.51.0/azure/cli/core/auth/util.py --- old/azure-cli-core-2.50.0/azure/cli/core/auth/util.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/auth/util.py 2023-07-27 09:10:05.000000000 +0200 @@ -129,6 +129,12 @@ if not result: raise AuthenticationError("Can't find token from MSAL cache.", recommendation="To re-authenticate, please run:\naz login") + + # msal_telemetry should be sent no matter if the MSAL response is a success or an error + if 'msal_telemetry' in result: + from azure.cli.core.telemetry import set_msal_telemetry + set_msal_telemetry(result['msal_telemetry']) + if 'error' in result: aad_error_handler(result, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/commands/__init__.py new/azure-cli-core-2.51.0/azure/cli/core/commands/__init__.py --- old/azure-cli-core-2.50.0/azure/cli/core/commands/__init__.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/commands/__init__.py 2023-07-27 09:10:05.000000000 +0200 @@ -724,7 +724,7 @@ expanded_arg, cmd_copy = job try: results.append(self._run_job(expanded_arg, cmd_copy)) - except(Exception, SystemExit) as ex: # pylint: disable=broad-except + except (Exception, SystemExit) as ex: # pylint: disable=broad-except exceptions.append((ex, id_arg)) return results, exceptions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/extension/__init__.py new/azure-cli-core-2.51.0/azure/cli/core/extension/__init__.py --- old/azure-cli-core-2.50.0/azure/cli/core/extension/__init__.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/extension/__init__.py 2023-07-27 09:10:05.000000000 +0200 @@ -8,7 +8,7 @@ import traceback import json import re -from distutils.sysconfig import get_python_lib +from distutils.sysconfig import get_python_lib # pylint: disable=deprecated-module import pkginfo from knack.config import CLIConfig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/profiles/_shared.py new/azure-cli-core-2.51.0/azure/cli/core/profiles/_shared.py --- old/azure-cli-core-2.50.0/azure/cli/core/profiles/_shared.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/profiles/_shared.py 2023-07-27 09:10:05.000000000 +0200 @@ -171,7 +171,7 @@ 'gallery_applications': '2021-07-01', 'gallery_application_versions': '2022-01-03', 'shared_galleries': '2022-01-03', - 'virtual_machine_scale_sets': '2022-11-01', + 'virtual_machine_scale_sets': '2023-03-01', }), ResourceType.MGMT_RESOURCE_FEATURES: '2021-07-01', ResourceType.MGMT_RESOURCE_LINKS: '2016-09-01', @@ -262,7 +262,7 @@ ResourceType.MGMT_ARO: '2022-09-04', ResourceType.MGMT_DATABOXEDGE: '2021-02-01-preview', ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview', - ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2023-05-01', { + ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2023-06-01', { 'container_services': '2017-07-01', 'open_shift_managed_clusters': '2019-09-30-preview' }), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure/cli/core/telemetry.py new/azure-cli-core-2.51.0/azure/cli/core/telemetry.py --- old/azure-cli-core-2.50.0/azure/cli/core/telemetry.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure/cli/core/telemetry.py 2023-07-27 09:10:05.000000000 +0200 @@ -71,6 +71,7 @@ self.poll_start_time = None self.poll_end_time = None self.allow_broker = None + self.msal_telemetry = None def add_event(self, name, properties): for key in self.instrumentation_key: @@ -217,6 +218,7 @@ set_custom_properties(result, 'RegionInput', self.region_input) set_custom_properties(result, 'RegionIdentified', self.region_identified) set_custom_properties(result, 'AllowBroker', str(self.allow_broker)) + set_custom_properties(result, 'MsalTelemetry', self.msal_telemetry) return result @@ -460,6 +462,12 @@ @decorators.suppress_all_exceptions() +def set_msal_telemetry(msal_telemetry): + if not _session.msal_telemetry: + _session.msal_telemetry = msal_telemetry + + +@decorators.suppress_all_exceptions() def add_dedicated_instrumentation_key(dedicated_instrumentation_key): if not dedicated_instrumentation_key: return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure_cli_core.egg-info/PKG-INFO new/azure-cli-core-2.51.0/azure_cli_core.egg-info/PKG-INFO --- old/azure-cli-core-2.50.0/azure_cli_core.egg-info/PKG-INFO 2023-06-29 13:20:15.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure_cli_core.egg-info/PKG-INFO 2023-07-27 09:10:24.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-cli-core -Version: 2.50.0 +Version: 2.51.0 Summary: Microsoft Azure Command-Line Tools Core Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation @@ -11,12 +11,11 @@ Classifier: Intended Audience :: System Administrators Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: License :: OSI Approved :: MIT License -Requires-Python: >=3.7.0 +Requires-Python: >=3.8.0 License-File: LICENSE.txt Microsoft Azure CLI Core Module diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/azure_cli_core.egg-info/requires.txt new/azure-cli-core-2.51.0/azure_cli_core.egg-info/requires.txt --- old/azure-cli-core-2.50.0/azure_cli_core.egg-info/requires.txt 2023-06-29 13:20:15.000000000 +0200 +++ new/azure-cli-core-2.51.0/azure_cli_core.egg-info/requires.txt 2023-07-27 09:10:24.000000000 +0200 @@ -1,12 +1,12 @@ argcomplete~=3.1.1 -azure-cli-telemetry==1.0.8.* +azure-cli-telemetry==1.1.0.* azure-mgmt-core<2,>=1.2.0 cryptography humanfriendly~=10.0 jmespath -knack~=0.10.1 +knack~=0.11.0 msal-extensions~=1.0.0 -msal[broker]==1.22.0 +msal[broker]==1.24.0b1 msrestazure~=0.6.4 packaging>=20.9 paramiko<4.0.0,>=2.0.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.50.0/setup.py new/azure-cli-core-2.51.0/setup.py --- old/azure-cli-core-2.50.0/setup.py 2023-06-29 13:20:03.000000000 +0200 +++ new/azure-cli-core-2.51.0/setup.py 2023-07-27 09:10:05.000000000 +0200 @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "2.50.0" +VERSION = "2.51.0" # If we have source, validate that our version numbers match # This should prevent uploading releases with mismatched versions. @@ -35,7 +35,6 @@ 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -44,16 +43,16 @@ DEPENDENCIES = [ 'argcomplete~=3.1.1', - 'azure-cli-telemetry==1.0.8.*', + 'azure-cli-telemetry==1.1.0.*', 'azure-mgmt-core>=1.2.0,<2', 'cryptography', # On Linux, the distribution (Ubuntu, Debian, etc) and version are logged in telemetry 'distro; sys_platform == "linux"', 'humanfriendly~=10.0', 'jmespath', - 'knack~=0.10.1', + 'knack~=0.11.0', 'msal-extensions~=1.0.0', - 'msal[broker]==1.22.0', + 'msal[broker]==1.24.0b1', 'msrestazure~=0.6.4', 'packaging>=20.9', 'paramiko>=2.0.8,<4.0.0', @@ -81,6 +80,6 @@ classifiers=CLASSIFIERS, packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "azure", "azure.cli"]), install_requires=DEPENDENCIES, - python_requires='>=3.7.0', + python_requires='>=3.8.0', package_data={'azure.cli.core': ['auth/landing_pages/*.html']} )