azure-cli-core 2.91.0__tar.gz → 2.93.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/HISTORY.rst +14 -0
  2. {azure_cli_core-2.91.0/azure_cli_core.egg-info → azure_cli_core-2.93.0}/PKG-INFO +5 -15
  3. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/__init__.py +1 -1
  4. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_environment.py +1 -0
  5. azure_cli_core-2.93.0/azure/cli/core/_output.py +82 -0
  6. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_field_value.py +1 -1
  7. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_poller.py +4 -0
  8. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/msal_credentials.py +8 -2
  9. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/breaking_change.py +2 -2
  10. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/cloud.py +33 -1
  11. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commandIndex.latest.json +1 -1
  12. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/arm.py +3 -4
  13. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/helpIndex.latest.json +4 -4
  14. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/util.py +58 -20
  15. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0/azure_cli_core.egg-info}/PKG-INFO +5 -15
  16. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure_cli_core.egg-info/SOURCES.txt +1 -1
  17. azure_cli_core-2.93.0/pyproject.toml +66 -0
  18. azure_cli_core-2.91.0/azure/cli/core/_output.py +0 -21
  19. azure_cli_core-2.91.0/setup.py +0 -92
  20. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/LICENSE.txt +0 -0
  21. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/MANIFEST.in +0 -0
  22. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/README.rst +0 -0
  23. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/__init__.py +0 -0
  24. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/__init__.py +0 -0
  25. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_breaking_change.py +0 -0
  26. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_completers.py +0 -0
  27. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_config.py +0 -0
  28. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_debug.py +0 -0
  29. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_help.py +0 -0
  30. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_help_loaders.py +0 -0
  31. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_profile.py +0 -0
  32. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/_session.py +0 -0
  33. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/__init__.py +0 -0
  34. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_arg.py +0 -0
  35. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_arg_action.py +0 -0
  36. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_arg_browser.py +0 -0
  37. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_arg_fmt.py +0 -0
  38. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_base.py +0 -0
  39. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_client.py +0 -0
  40. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_command.py +0 -0
  41. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_command_ctx.py +0 -0
  42. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_content_builder.py +0 -0
  43. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_error_format.py +0 -0
  44. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_field_type.py +0 -0
  45. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_help.py +0 -0
  46. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_http_policy.py +0 -0
  47. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_operation.py +0 -0
  48. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_paging.py +0 -0
  49. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_prompt.py +0 -0
  50. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_selector.py +0 -0
  51. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/_utils.py +0 -0
  52. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/exceptions.py +0 -0
  53. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/aaz/utils.py +0 -0
  54. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/api.py +0 -0
  55. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/__init__.py +0 -0
  56. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/agentic_session.py +0 -0
  57. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/binary_cache.py +0 -0
  58. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/constants.py +0 -0
  59. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/credential_adaptor.py +0 -0
  60. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/identity.py +0 -0
  61. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/landing_pages/error.html +0 -0
  62. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/landing_pages/success.html +0 -0
  63. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/persistence.py +0 -0
  64. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/auth/util.py +0 -0
  65. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/azclierror.py +0 -0
  66. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/azlogging.py +0 -0
  67. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/command_recommender.py +0 -0
  68. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/__init__.py +0 -0
  69. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/client_factory.py +0 -0
  70. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/command_operation.py +0 -0
  71. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/constants.py +0 -0
  72. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/events.py +0 -0
  73. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/parameters.py +0 -0
  74. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/progress.py +0 -0
  75. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/sensitive.py +0 -0
  76. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/template_create.py +0 -0
  77. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/transform.py +0 -0
  78. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/commands/validators.py +0 -0
  79. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/credential_helper.py +0 -0
  80. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/decorators.py +0 -0
  81. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/extension/__init__.py +0 -0
  82. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/extension/_homebrew_patch.py +0 -0
  83. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/extension/_index.py +0 -0
  84. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/extension/_resolve.py +0 -0
  85. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/extension/dynamic_install.py +0 -0
  86. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/extension/operations.py +0 -0
  87. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/file_util.py +0 -0
  88. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/intercept_survey.py +0 -0
  89. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/keys.py +0 -0
  90. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/local_context.py +0 -0
  91. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/mock.py +0 -0
  92. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/parser.py +0 -0
  93. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/profiles/__init__.py +0 -0
  94. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/profiles/_shared.py +0 -0
  95. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/sdk/__init__.py +0 -0
  96. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/sdk/policies.py +0 -0
  97. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/style.py +0 -0
  98. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure/cli/core/telemetry.py +0 -0
  99. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure_cli_core.egg-info/dependency_links.txt +0 -0
  100. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure_cli_core.egg-info/not-zip-safe +0 -0
  101. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure_cli_core.egg-info/requires.txt +0 -0
  102. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/azure_cli_core.egg-info/top_level.txt +0 -0
  103. {azure_cli_core-2.91.0 → azure_cli_core-2.93.0}/setup.cfg +0 -0
@@ -3,6 +3,20 @@
3
3
  Release History
4
4
  ===============
5
5
 
6
+ 2.93.0
7
+ ++++++
8
+ * Upgrade bundled Python to 3.14.10 for Windows and Debian packages (#34326)
9
+ * Bump `pymsalruntime` to 0.20.7 on Windows and macOS (#34359)
10
+ * Improve executable lookup consistency on Windows (#34329)
11
+ * Fix removal of a single specified user-assigned identity incorrectly removing all user-assigned identities (#34383)
12
+
13
+ 2.92.0
14
+ ++++++
15
+ * Add `get_safe_executable_path` to prevent binary planting when spawning subprocess (#34212)
16
+ * Resolve GHSA-6q48-6c7w-9gw2 (#34250)
17
+ * Add `core.output_newline` config (native|lf) and default to LF line endings on stdout when run from WSL or Git Bash on Windows (#34236)
18
+ * Resolve OpenSSL and Certifi related vulnerabilities (#34275)
19
+
6
20
  2.91.0
7
21
  ++++++
8
22
  * Remove AzureGermanCloud from hard-coded cloud list (#34042)
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azure-cli-core
3
- Version: 2.91.0
3
+ Version: 2.93.0
4
4
  Summary: Microsoft Azure Command-Line Tools Core Module
5
- Home-page: https://github.com/Azure/azure-cli
6
- Author: Microsoft Corporation
7
- Author-email: azpycli@microsoft.com
8
- License: MIT
5
+ Author-email: Microsoft Corporation <azpycli@microsoft.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Azure/azure-cli
9
8
  Classifier: Development Status :: 5 - Production/Stable
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: Intended Audience :: System Administrators
@@ -16,8 +15,8 @@ Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
19
- Classifier: License :: OSI Approved :: MIT License
20
18
  Requires-Python: >=3.10.0
19
+ Description-Content-Type: text/x-rst
21
20
  License-File: LICENSE.txt
22
21
  Requires-Dist: argcomplete~=3.5.2
23
22
  Requires-Dist: azure-cli-telemetry==1.1.0.*
@@ -39,16 +38,7 @@ Requires-Dist: PyJWT>=2.1.0
39
38
  Requires-Dist: pyopenssl>=17.1.0
40
39
  Requires-Dist: py-deviceid
41
40
  Requires-Dist: requests[socks]
42
- Dynamic: author
43
- Dynamic: author-email
44
- Dynamic: classifier
45
- Dynamic: description
46
- Dynamic: home-page
47
- Dynamic: license
48
41
  Dynamic: license-file
49
- Dynamic: requires-dist
50
- Dynamic: requires-python
51
- Dynamic: summary
52
42
 
53
43
  Microsoft Azure CLI Core Module
54
44
  ==================================
@@ -4,7 +4,7 @@
4
4
  # --------------------------------------------------------------------------------------------
5
5
  # pylint: disable=line-too-long
6
6
 
7
- __version__ = "2.91.0"
7
+ __version__ = "2.93.0"
8
8
 
9
9
  import os
10
10
  import sys
@@ -5,6 +5,7 @@
5
5
 
6
6
 
7
7
  _ENV_AZ_INSTALLER = 'AZ_INSTALLER'
8
+ _ENV_AZ_LAUNCHER = 'AZ_LAUNCHER'
8
9
  _ENV_AZ_BICEP_GLOBALIZATION_INVARIANT = 'AZ_BICEP_GLOBALIZATION_INVARIANT'
9
10
 
10
11
 
@@ -0,0 +1,82 @@
1
+ # --------------------------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+ # --------------------------------------------------------------------------------------------
5
+
6
+ import configparser
7
+ import os
8
+ import sys
9
+
10
+ import knack.output
11
+ from knack.log import get_logger
12
+
13
+ from azure.cli.core._environment import _ENV_AZ_LAUNCHER
14
+
15
+ logger = get_logger(__name__)
16
+
17
+ _OUTPUT_NEWLINE_NATIVE = 'native'
18
+ _OUTPUT_NEWLINE_LF = 'lf'
19
+ # core.output_newline value -> newline for stdout.reconfigure(); None leaves stdout untouched.
20
+ _OUTPUT_NEWLINES = {
21
+ _OUTPUT_NEWLINE_NATIVE: None,
22
+ _OUTPUT_NEWLINE_LF: '\n',
23
+ }
24
+
25
+
26
+ class AzOutputProducer(knack.output.OutputProducer):
27
+
28
+ def check_valid_format_type(self, format_type):
29
+ return format_type in self._FORMAT_DICT
30
+
31
+
32
+ def get_output_format(cli_ctx):
33
+ return cli_ctx.invocation.data.get("output", None)
34
+
35
+
36
+ def set_output_format(cli_ctx, desired_format):
37
+ if cli_ctx.output.check_valid_format_type(desired_format):
38
+ cli_ctx.invocation.data["output"] = desired_format
39
+
40
+
41
+ def get_output_newline(cli_ctx):
42
+ """Resolve `core.output_newline`: AZURE_CORE_OUTPUT_NEWLINE, then global config, then launcher default.
43
+
44
+ An empty value selects the default rather than falling back to the next source. The bash launcher shipped
45
+ with the Windows MSI (used by WSL and Git Bash) sets AZ_LAUNCHER=bash, which defaults to LF so
46
+ `$(az ... -o tsv)` does not capture a trailing carriage return.
47
+ """
48
+ value = (cli_ctx.config.get('core', 'output_newline', fallback=None) or '').strip().lower()
49
+ if not value:
50
+ return _OUTPUT_NEWLINE_LF if os.environ.get(_ENV_AZ_LAUNCHER) == 'bash' else _OUTPUT_NEWLINE_NATIVE
51
+ return value
52
+
53
+
54
+ def apply_output_newline(cli_ctx, **_):
55
+ """Stop Windows from translating '\\n' to '\\r\\n' in all text written to stdout (not just `-o` results)
56
+ when `core.output_newline` is `lf`.
57
+
58
+ Registered for EVENT_CLI_PRE_EXECUTE: logging is configured by then and no command output has been
59
+ written yet. Streams are reconfigured in place because knack keeps a reference to sys.stdout as `out_file`.
60
+ """
61
+ try:
62
+ value = get_output_newline(cli_ctx)
63
+ except configparser.Error as ex:
64
+ logger.warning("Ignoring unreadable core.output_newline value: %s", ex)
65
+ return
66
+ if value not in _OUTPUT_NEWLINES:
67
+ logger.warning("Ignoring invalid core.output_newline value '%s'. Allowed values: %s",
68
+ value, ', '.join(_OUTPUT_NEWLINES))
69
+ return
70
+ newline = _OUTPUT_NEWLINES[value]
71
+ if newline is None:
72
+ return
73
+ streams = []
74
+ for stream in (getattr(cli_ctx, 'out_file', None), sys.stdout):
75
+ if stream is not None and hasattr(stream, 'reconfigure') and all(stream is not s for s in streams):
76
+ streams.append(stream)
77
+ for stream in streams:
78
+ try:
79
+ stream.reconfigure(newline=newline)
80
+ except (OSError, ValueError) as ex:
81
+ # Line endings are cosmetic, so never fail the command (e.g. stdout closed or detached).
82
+ logger.debug("Unable to set stdout newline to %r: %s", newline, ex)
@@ -457,7 +457,7 @@ class AAZIdentityObject(AAZObject): # pylint: disable=too-few-public-methods
457
457
 
458
458
  if action == "remove":
459
459
  if user_assigned is not None:
460
- if len(user_assigned) > 1: # remove each
460
+ if user_assigned: # remove each
461
461
  identities -= set(user_assigned)
462
462
 
463
463
  else: # remove all
@@ -62,6 +62,10 @@ class AAZLROPoller:
62
62
  self._done = None
63
63
  self._exception = None
64
64
 
65
+ # MSAL lazily imports requests when the credential is created on the polling thread,
66
+ # which can raise _DeadlockError (seen on Python 3.14). Import it here on the main thread first.
67
+ import requests # pylint: disable=unused-import
68
+
65
69
  self._done = threading.Event()
66
70
  self._thread = threading.Thread(
67
71
  target=with_current_context(self._start),
@@ -50,6 +50,12 @@ class UserCredential: # pylint: disable=too-few-public-methods
50
50
  logger.debug("UserCredential.acquire_token: scopes=%r, claims_challenge=%r, kwargs=%r",
51
51
  scopes, claims_challenge, kwargs)
52
52
 
53
+ # Identify VM SSH by its explicit token_type rather than by the presence of 'data', because
54
+ # the agentic session logic below injects 'data' (client_session). Checking presence would
55
+ # misclassify every silent failure in an agentic session as VM SSH and launch interactive
56
+ # login. Evaluate on the caller's 'data' before that injection.
57
+ is_vm_ssh = (kwargs.get('data') or {}).get('token_type') == 'ssh-cert'
58
+
53
59
  # Apply agentic session parameters for user identity flows
54
60
  from .agentic_session import build_agentic_session_params, merge_access_token_claims
55
61
  agentic_session_id, agentic_claims = build_agentic_session_params()
@@ -82,12 +88,12 @@ class UserCredential: # pylint: disable=too-few-public-methods
82
88
  check_result(result, tenant=self._msal_app.authority.tenant, scopes=scopes,
83
89
  claims_challenge=claims_challenge)
84
90
  except AuthenticationError as ex:
85
- # For VM SSH ('data' is passed), if getting access token fails because
91
+ # For VM SSH (token_type is 'ssh-cert'), if getting access token fails because
86
92
  # Conditional Access MFA step-up or compliance check is required, re-launch
87
93
  # web browser and do auth code flow again.
88
94
  # We assume the `az ssh` command is run on a system with GUI where a web
89
95
  # browser is available.
90
- if 'data' in kwargs:
96
+ if is_vm_ssh:
91
97
  logger.warning(ex)
92
98
  result = self._acquire_token_interactive(scopes, **kwargs)
93
99
  # For other scenarios like Storage Conditional Access MFA step-up, do not
@@ -15,8 +15,8 @@ from knack.util import StatusTag, color_map
15
15
 
16
16
  logger = get_logger()
17
17
 
18
- NEXT_BREAKING_CHANGE_RELEASE = '2.92.0'
19
- NEXT_BREAKING_CHANGE_DATE = 'Nov 2026'
18
+ NEXT_BREAKING_CHANGE_RELEASE = '2.100.0'
19
+ NEXT_BREAKING_CHANGE_DATE = 'Jun 2027'
20
20
  DEFAULT_BREAKING_CHANGE_TAG = '[Breaking Change]'
21
21
 
22
22
 
@@ -356,6 +356,7 @@ class CloudNameEnum: # pylint: disable=too-few-public-methods
356
356
  AzureUSGovernment = 'AzureUSGovernment'
357
357
  AzureGermanCloud = 'AzureGermanCloud'
358
358
  AzureBleuCloud = 'AzureBleuCloud'
359
+ AzureDelosCloud = 'AzureDelosCloud'
359
360
 
360
361
 
361
362
  AZURE_PUBLIC_CLOUD = Cloud(
@@ -505,6 +506,7 @@ AZURE_BLEU_CLOUD = Cloud(
505
506
  vm_image_alias_doc='https://azcliprod.blob.core.windows.net/cli/vm/aliases_master.json',
506
507
  media_resource_id='https://rest.media.sovcloud-api.fr',
507
508
  ossrdbms_resource_id='https://ossrdbms-aad.database.sovcloud-api.fr',
509
+ synapse_analytics_resource_id='https://dev.azuresynapse.sovcloud-api.fr',
508
510
  portal='https://portal.sovcloud-azure.fr'),
509
511
  suffixes=CloudSuffixes(
510
512
  acr_login_server_endpoint='.azurecr.sovcloud-azure.fr',
@@ -519,7 +521,37 @@ AZURE_BLEU_CLOUD = Cloud(
519
521
  mariadb_server_endpoint='.mariadb.database.sovcloud-api.fr',
520
522
  synapse_analytics_endpoint='.dev.azuresynapse.sovcloud-api.fr'))
521
523
 
522
- HARD_CODED_CLOUD_LIST = [AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_BLEU_CLOUD]
524
+ AZURE_DELOS_CLOUD = Cloud(
525
+ CloudNameEnum.AzureDelosCloud,
526
+ endpoints=CloudEndpoints(
527
+ management='https://management.sovcloud-api.de/',
528
+ resource_manager='https://management.sovcloud-api.de',
529
+ sql_management='https://management.database.sovcloud-api.de:8443/',
530
+ batch_resource_id='https://batch.sovcloud-api.de/',
531
+ gallery='https://gallery.sovcloud-api.de/',
532
+ active_directory='https://login.sovcloud-identity.de',
533
+ active_directory_resource_id='https://management.sovcloud-api.de/',
534
+ active_directory_graph_resource_id='https://graph.svc.sovcloud.de/',
535
+ microsoft_graph_resource_id='https://graph.svc.sovcloud.de',
536
+ vm_image_alias_doc='https://azcliprod.blob.core.windows.net/cli/vm/aliases_master.json',
537
+ media_resource_id='https://rest.media.sovcloud-api.de',
538
+ ossrdbms_resource_id='https://ossrdbms-aad.database.sovcloud-api.de',
539
+ synapse_analytics_resource_id='https://dev.azuresynapse.sovcloud-api.de',
540
+ portal='https://portal.sovcloud.de'),
541
+ suffixes=CloudSuffixes(
542
+ acr_login_server_endpoint='.azurecr.sovcloud-azure.de',
543
+ attestation_endpoint='attest.sovcloud-api.de',
544
+ storage_endpoint='core.sovcloud-api.de',
545
+ storage_sync_endpoint='afs.sovcloud-api.de',
546
+ keyvault_dns='.vault.sovcloud-api.de',
547
+ mhsm_dns='.managedhsm.sovcloud-api.de',
548
+ sql_server_hostname='.database.sovcloud-api.de',
549
+ mysql_server_endpoint='.mysql.database.sovcloud-api.de',
550
+ postgresql_server_endpoint='.postgres.database.sovcloud-api.de',
551
+ mariadb_server_endpoint='.mariadb.database.sovcloud-api.de',
552
+ synapse_analytics_endpoint='.dev.azuresynapse.sovcloud-api.de'))
553
+
554
+ HARD_CODED_CLOUD_LIST = [AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_BLEU_CLOUD, AZURE_DELOS_CLOUD]
523
555
 
524
556
 
525
557
  def retrieve_arm_cloud_metadata():
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.91.0",
2
+ "version": "2.93.0",
3
3
  "cloudProfile": "latest",
4
4
  "commandIndex": {
5
5
  "account": [
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  # --------------------------------------------------------------------------------------------
5
-
5
+ # pylint: disable=line-too-long
6
6
  # pylint: disable=too-many-lines
7
7
 
8
8
  import argparse
@@ -75,7 +75,7 @@ class ArmTemplateBuilder:
75
75
  output_type='string', path=None):
76
76
 
77
77
  if provider and property_type:
78
- value = "[reference(resourceId('{provider}/{type}', '{property}'),providers('{provider}', '{type}').apiVersions[0])".format( # pylint: disable=line-too-long
78
+ value = "[reference(resourceId('{provider}/{type}', '{property}'),providers('{provider}', '{type}').apiVersions[0])".format(
79
79
  provider=provider, type=property_type, property=property_name)
80
80
  else:
81
81
  value = "[reference('{}')".format(property_name)
@@ -175,8 +175,7 @@ class ResourceId(str):
175
175
  return str.__new__(cls, val)
176
176
 
177
177
 
178
- def resource_exists(cli_ctx, subscription, resource_group, name, namespace, type,
179
- **_): # pylint: disable=redefined-builtin
178
+ def resource_exists(cli_ctx, subscription, resource_group, name, namespace, type, **_): # pylint: disable=redefined-builtin
180
179
  ''' Checks if the given resource exists. '''
181
180
  odata_filter = "resourceGroup eq '{}' and name eq '{}'" \
182
181
  " and resourceType eq '{}/{}'".format(resource_group, name, namespace, type)
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.91.0",
2
+ "version": "2.93.0",
3
3
  "cloudProfile": "latest",
4
4
  "helpIndex": {
5
5
  "groups": {
@@ -40,7 +40,7 @@
40
40
  "tags": ""
41
41
  },
42
42
  "aro": {
43
- "summary": "Manage Azure Red Hat OpenShift clusters.",
43
+ "summary": "Manage Azure Red Hat OpenShift resource types.",
44
44
  "tags": ""
45
45
  },
46
46
  "backup": {
@@ -76,7 +76,7 @@
76
76
  "tags": ""
77
77
  },
78
78
  "cognitiveservices": {
79
- "summary": "Manage Azure Cognitive Services accounts.",
79
+ "summary": "Manage Cognitive Services.",
80
80
  "tags": ""
81
81
  },
82
82
  "compute-fleet": {
@@ -89,7 +89,7 @@
89
89
  },
90
90
  "config": {
91
91
  "summary": "Manage Azure CLI configuration.",
92
- "tags": "[Experimental]"
92
+ "tags": ""
93
93
  },
94
94
  "connection": {
95
95
  "summary": "Commands to manage Service Connector local connections which allow local environment to connect Azure Resource. If you want to manage connection for compute service, please run 'az webapp/containerapp/spring connection'.",
@@ -48,7 +48,7 @@ DISALLOWED_USER_NAMES = [
48
48
 
49
49
  # AME Storage Account URL for version checking and VM image aliases (Network Isolation)
50
50
  # Files are stored as:
51
- # - https://azcliprod.blob.core.windows.net/cli/{package}/setup.py (CLI versions)
51
+ # - https://azcliprod.blob.core.windows.net/cli/{package}/pyproject.toml (CLI versions)
52
52
  # - https://azcliprod.blob.core.windows.net/cli/vm/aliases.json (VM image aliases)
53
53
  AME_STORAGE_BASE_URL = "https://azcliprod.blob.core.windows.net/cli"
54
54
 
@@ -295,29 +295,26 @@ def get_latest_version_from_ame_storage(package_path='azure-cli'):
295
295
  """Get the latest version from AME Storage Account.
296
296
 
297
297
  This replaces get_latest_from_github() due to network isolation requirements.
298
- The setup.py files are uploaded to AME Storage Account during release pipeline.
298
+ The pyproject.toml files are uploaded to AME Storage Account during release pipeline,
299
+ with the legacy setup.py files as a fallback.
299
300
 
300
301
  Args:
301
302
  package_path: Package name, e.g., 'azure-cli', 'azure-cli-core', 'azure-cli-telemetry', 'azure-cli-testsdk'
302
303
  """
303
- try:
304
- import requests
305
- storage_url = "{}/{}/setup.py".format(AME_STORAGE_BASE_URL, package_path)
306
-
307
- response = requests.get(storage_url, timeout=10)
308
- if response.status_code != 200:
309
- logger.info("Failed to fetch the latest version from '%s' with status code '%s' and reason '%s'",
310
- storage_url, response.status_code, response.reason)
311
- return None
312
- for line in response.iter_lines():
313
- txt = line.decode('utf-8', errors='ignore')
314
- if txt.startswith('VERSION'):
315
- match = re.search(r'VERSION = \"(.*)\"$', txt)
316
- if match:
317
- return match.group(1)
318
- except Exception as ex: # pylint: disable=broad-except
319
- logger.info("Failed to get the latest version from '%s'. %s", storage_url, str(ex))
320
- return None
304
+ import requests
305
+ for file_name, key in (('pyproject.toml', 'version'), ('setup.py', 'VERSION')):
306
+ storage_url = "{}/{}/{}".format(AME_STORAGE_BASE_URL, package_path, file_name)
307
+ try:
308
+ response = requests.get(storage_url, timeout=10)
309
+ if response.status_code != 200:
310
+ logger.info("Failed to fetch '%s' with status code '%s'", storage_url, response.status_code)
311
+ continue
312
+ match = re.search(r'^{}\s*=\s*"(.+)"'.format(key), response.text, re.MULTILINE)
313
+ if match:
314
+ return match.group(1)
315
+ except Exception as ex: # pylint: disable=broad-except
316
+ logger.info("Failed to get the latest version from '%s'. %s", storage_url, str(ex))
317
+ return None
321
318
 
322
319
 
323
320
  def get_latest_from_github(package_path='azure-cli'):
@@ -1634,6 +1631,47 @@ def should_encrypt_token_cache(cli_ctx):
1634
1631
  return encrypt
1635
1632
 
1636
1633
 
1634
+ def get_safe_executable_path(executable):
1635
+ """Resolve an executable name to an absolute path like ``shutil.which``, but never from the current working
1636
+ directory, which Windows searches first for bare names (binary planting, CWE-427).
1637
+ Return ``None`` if nothing trusted is found; never fall back to the bare name.
1638
+ """
1639
+ if os.path.dirname(executable):
1640
+ return executable
1641
+ try:
1642
+ cwd = os.getcwd()
1643
+ except OSError:
1644
+ return None # Fail closed: the directory to exclude is unknown.
1645
+
1646
+ search_dirs = os.environ.get('PATH', os.defpath).split(os.pathsep)
1647
+ names = [executable]
1648
+ is_windows_platform = sys.platform.startswith('win')
1649
+ if is_windows_platform:
1650
+ system_root = os.environ.get('SystemRoot', r'C:\Windows')
1651
+ search_dirs = [os.path.join(system_root, 'System32'), system_root] + search_dirs
1652
+ exts = [ext for ext in os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD').split(os.pathsep) if ext]
1653
+ if not os.path.splitext(executable)[1]:
1654
+ names = [executable + ext for ext in exts]
1655
+
1656
+ for directory in (d.strip('"') for d in search_dirs):
1657
+ # Relative entries ('', '.') resolve against the CWD as well.
1658
+ if not os.path.isabs(directory) or (is_windows_platform and not os.path.splitdrive(directory)[0]):
1659
+ continue
1660
+ try:
1661
+ if not os.path.isdir(directory) or os.path.samefile(directory, cwd):
1662
+ continue
1663
+ for name in names:
1664
+ path = os.path.join(directory, name)
1665
+ if not os.path.isfile(path) or not os.access(path, os.X_OK):
1666
+ continue
1667
+ if os.path.samefile(os.path.dirname(os.path.realpath(path)), cwd):
1668
+ continue
1669
+ return path
1670
+ except (OSError, ValueError) as ex:
1671
+ logger.debug("Skipping executable lookup in '%s': unable to verify path safety: %s", directory, ex)
1672
+ return None
1673
+
1674
+
1637
1675
  def run_cmd(args, *, capture_output=False, timeout=None, check=False, encoding=None, env=None):
1638
1676
  """Run command in a subprocess. It reduces (not eliminates) shell injection by forcing args to be a list
1639
1677
  and shell=False. Other arguments are keyword-only. For their documentation, see
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azure-cli-core
3
- Version: 2.91.0
3
+ Version: 2.93.0
4
4
  Summary: Microsoft Azure Command-Line Tools Core Module
5
- Home-page: https://github.com/Azure/azure-cli
6
- Author: Microsoft Corporation
7
- Author-email: azpycli@microsoft.com
8
- License: MIT
5
+ Author-email: Microsoft Corporation <azpycli@microsoft.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Azure/azure-cli
9
8
  Classifier: Development Status :: 5 - Production/Stable
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: Intended Audience :: System Administrators
@@ -16,8 +15,8 @@ Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
19
- Classifier: License :: OSI Approved :: MIT License
20
18
  Requires-Python: >=3.10.0
19
+ Description-Content-Type: text/x-rst
21
20
  License-File: LICENSE.txt
22
21
  Requires-Dist: argcomplete~=3.5.2
23
22
  Requires-Dist: azure-cli-telemetry==1.1.0.*
@@ -39,16 +38,7 @@ Requires-Dist: PyJWT>=2.1.0
39
38
  Requires-Dist: pyopenssl>=17.1.0
40
39
  Requires-Dist: py-deviceid
41
40
  Requires-Dist: requests[socks]
42
- Dynamic: author
43
- Dynamic: author-email
44
- Dynamic: classifier
45
- Dynamic: description
46
- Dynamic: home-page
47
- Dynamic: license
48
41
  Dynamic: license-file
49
- Dynamic: requires-dist
50
- Dynamic: requires-python
51
- Dynamic: summary
52
42
 
53
43
  Microsoft Azure CLI Core Module
54
44
  ==================================
@@ -2,8 +2,8 @@ HISTORY.rst
2
2
  LICENSE.txt
3
3
  MANIFEST.in
4
4
  README.rst
5
+ pyproject.toml
5
6
  setup.cfg
6
- setup.py
7
7
  azure/__init__.py
8
8
  azure/cli/__init__.py
9
9
  azure/cli/core/__init__.py
@@ -0,0 +1,66 @@
1
+ [build-system]
2
+ requires = ["setuptools>=78.1.1"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "azure-cli-core"
7
+ version = "2.93.0"
8
+ description = "Microsoft Azure Command-Line Tools Core Module"
9
+ readme = { file = "README.rst", content-type = "text/x-rst" }
10
+ requires-python = ">=3.10.0"
11
+ license = "MIT"
12
+ license-files = ["LICENSE.txt"]
13
+ authors = [{ name = "Microsoft Corporation", email = "azpycli@microsoft.com" }]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: System Administrators",
18
+ "Programming Language :: Python",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Programming Language :: Python :: 3.14",
25
+ ]
26
+ dependencies = [
27
+ 'argcomplete~=3.5.2',
28
+ 'azure-cli-telemetry==1.1.0.*',
29
+ 'azure-core~=1.39.0',
30
+ 'azure-mgmt-core>=1.2.0,<2',
31
+ 'cryptography',
32
+ # On Linux, the distribution (Ubuntu, Debian, etc) and version are logged in telemetry
33
+ 'distro; sys_platform == "linux"',
34
+ 'humanfriendly~=10.0',
35
+ 'jmespath',
36
+ 'knack~=0.14.0',
37
+ 'microsoft-security-utilities-secret-masker~=1.0.0b4',
38
+ 'msal-extensions==1.3.1',
39
+ 'msal[broker]==1.39.0; sys_platform == "win32" or sys_platform == "darwin"',
40
+ 'msal==1.39.0; sys_platform != "win32" and sys_platform != "darwin"',
41
+ 'packaging>=20.9',
42
+ # pkginfo>=1.12.0 reads the spec-defined wheel METADATA / unpacked .dist-info
43
+ # layout produced by modern wheel/setuptools (no metadata.json). Required so
44
+ # WheelExtension.get_metadata works without the legacy wheel==0.30.0 artifact.
45
+ 'pkginfo>=1.12.0',
46
+ # psutil can't install on cygwin: https://github.com/Azure/azure-cli/issues/9399
47
+ 'psutil>=5.9; sys_platform != "cygwin"',
48
+ 'PyJWT>=2.1.0',
49
+ 'pyopenssl>=17.1.0', # https://github.com/pyca/pyopenssl/pull/612
50
+ 'py-deviceid',
51
+ 'requests[socks]',
52
+ ]
53
+
54
+ [project.urls]
55
+ Homepage = "https://github.com/Azure/azure-cli"
56
+
57
+ [tool.setuptools]
58
+ include-package-data = false
59
+ zip-safe = false
60
+
61
+ [tool.setuptools.packages.find]
62
+ namespaces = false
63
+ exclude = ["*.tests", "*.tests.*", "tests.*", "tests", "azure", "azure.cli"]
64
+
65
+ [tool.setuptools.package-data]
66
+ "azure.cli.core" = ["auth/landing_pages/*.html", "commandIndex.latest.json", "helpIndex.latest.json"]
@@ -1,21 +0,0 @@
1
- # --------------------------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
- # --------------------------------------------------------------------------------------------
5
-
6
- import knack.output
7
-
8
-
9
- class AzOutputProducer(knack.output.OutputProducer):
10
-
11
- def check_valid_format_type(self, format_type):
12
- return format_type in self._FORMAT_DICT
13
-
14
-
15
- def get_output_format(cli_ctx):
16
- return cli_ctx.invocation.data.get("output", None)
17
-
18
-
19
- def set_output_format(cli_ctx, desired_format):
20
- if cli_ctx.output.check_valid_format_type(desired_format):
21
- cli_ctx.invocation.data["output"] = desired_format
@@ -1,92 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- # --------------------------------------------------------------------------------------------
4
- # Copyright (c) Microsoft Corporation. All rights reserved.
5
- # Licensed under the MIT License. See License.txt in the project root for license information.
6
- # --------------------------------------------------------------------------------------------
7
-
8
- from codecs import open
9
- from setuptools import setup, find_packages
10
-
11
- VERSION = "2.91.0"
12
-
13
- # If we have source, validate that our version numbers match
14
- # This should prevent uploading releases with mismatched versions.
15
- try:
16
- with open('azure/cli/core/__init__.py', 'r', encoding='utf-8') as f:
17
- content = f.read()
18
- except OSError:
19
- pass
20
- else:
21
- import re
22
- import sys
23
-
24
- m = re.search(r'__version__\s*=\s*[\'"](.+?)[\'"]', content)
25
- if not m:
26
- print('Could not find __version__ in azure/cli/core/__init__.py')
27
- sys.exit(1)
28
- if m.group(1) != VERSION:
29
- print('Expected __version__ = "{}"; found "{}"'.format(VERSION, m.group(1)))
30
- sys.exit(1)
31
-
32
- CLASSIFIERS = [
33
- 'Development Status :: 5 - Production/Stable',
34
- 'Intended Audience :: Developers',
35
- 'Intended Audience :: System Administrators',
36
- 'Programming Language :: Python',
37
- 'Programming Language :: Python :: 3',
38
- 'Programming Language :: Python :: 3.10',
39
- 'Programming Language :: Python :: 3.11',
40
- 'Programming Language :: Python :: 3.12',
41
- 'Programming Language :: Python :: 3.13',
42
- 'Programming Language :: Python :: 3.14',
43
- 'License :: OSI Approved :: MIT License',
44
- ]
45
-
46
- DEPENDENCIES = [
47
- 'argcomplete~=3.5.2',
48
- 'azure-cli-telemetry==1.1.0.*',
49
- 'azure-core~=1.39.0',
50
- 'azure-mgmt-core>=1.2.0,<2',
51
- 'cryptography',
52
- # On Linux, the distribution (Ubuntu, Debian, etc) and version are logged in telemetry
53
- 'distro; sys_platform == "linux"',
54
- 'humanfriendly~=10.0',
55
- 'jmespath',
56
- 'knack~=0.14.0',
57
- 'microsoft-security-utilities-secret-masker~=1.0.0b4',
58
- 'msal-extensions==1.3.1',
59
- 'msal[broker]==1.39.0; sys_platform == "win32" or sys_platform == "darwin"',
60
- 'msal==1.39.0; sys_platform != "win32" and sys_platform != "darwin"',
61
- 'packaging>=20.9',
62
- # pkginfo>=1.12.0 reads the spec-defined wheel METADATA / unpacked .dist-info
63
- # layout produced by modern wheel/setuptools (no metadata.json). Required so
64
- # WheelExtension.get_metadata works without the legacy wheel==0.30.0 artifact.
65
- 'pkginfo>=1.12.0',
66
- # psutil can't install on cygwin: https://github.com/Azure/azure-cli/issues/9399
67
- 'psutil>=5.9; sys_platform != "cygwin"',
68
- 'PyJWT>=2.1.0',
69
- 'pyopenssl>=17.1.0', # https://github.com/pyca/pyopenssl/pull/612
70
- 'py-deviceid',
71
- 'requests[socks]',
72
- ]
73
-
74
- with open('README.rst', 'r', encoding='utf-8') as f:
75
- README = f.read()
76
-
77
- setup(
78
- name='azure-cli-core',
79
- version=VERSION,
80
- description='Microsoft Azure Command-Line Tools Core Module',
81
- long_description=README,
82
- license='MIT',
83
- author='Microsoft Corporation',
84
- author_email='azpycli@microsoft.com',
85
- url='https://github.com/Azure/azure-cli',
86
- zip_safe=False,
87
- classifiers=CLASSIFIERS,
88
- packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "azure", "azure.cli"]),
89
- install_requires=DEPENDENCIES,
90
- python_requires='>=3.10.0',
91
- package_data={'azure.cli.core': ['auth/landing_pages/*.html', 'commandIndex.latest.json', 'helpIndex.latest.json']}
92
- )