[AutoPR azure-mgmt-workloadorchestration]-generated-from-SDK Generation - Python-6318756#46982
Open
azure-sdk wants to merge 1 commit into
Open
[AutoPR azure-mgmt-workloadorchestration]-generated-from-SDK Generation - Python-6318756#46982azure-sdk wants to merge 1 commit into
azure-sdk wants to merge 1 commit into
Conversation
…er.Management/tspconfig.yaml', API Version: 2025-06-01, SDK Release Type: beta, and CommitSHA: 'b373ded4a6c77a9f541ca8f020fd2072db632751' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6318756 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Auto-generated SDK update for azure-mgmt-workloadorchestration from a new TypeSpec spec commit, bumping the beta version to 1.0.0b2 and refreshing models, samples, and tests for API version 2025-06-01.
Changes:
- Regenerated client code: dropped Python 3.9 support (now 3.10+), migrated to PEP 585 generic types (
list/dict), addedcloud_settingparameter, and bumped emitter/version. - Added new
*Update/*UpdatePropertiesmodels,unique_identifierfields, and newSchemaReferencescreate/update/delete operations. - Breaking renames of
schema_version_name→dynamic_schema_version_nameonDynamicSchemaVersionsOperations, with corresponding sample/test updates.
Reviewed changes
Copilot reviewed 53 out of 55 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tsp-location.yaml, _metadata.json | Updated commit SHA and emitter version |
| pyproject.toml, setup.py, sdk_packaging.toml, MANIFEST.in, README.md | Migrated from setup.py to pyproject.toml-based build; bumped min Python to 3.10 |
| _version.py, CHANGELOG.md | Version bump to 1.0.0b2 with changelog entries |
| azure/mgmt/workloadorchestration/_client.py, aio/_client.py, _configuration.py, aio/_configuration.py | Added cloud_setting kwarg; py3.11+ uses typing.Self |
| azure/mgmt/workloadorchestration/models/_models.py, _enums.py, init.py | Added Update models, unique_identifier fields; PEP 585 generics; minor doc tweaks |
| azure/mgmt/workloadorchestration/_utils/model_base.py, serialization.py | Various serialization/deserialization updates; PEP 585 generics; XML namespace handling |
| azure/mgmt/workloadorchestration/{_patch,aio/_patch,operations/_patch,aio/operations/_patch,models/_patch}.py | Switched List[str] to list[str] |
| azure/init.py, azure/mgmt/init.py | Added type: ignore comment |
| apiview-properties.json | Added mappings for new models/operations |
| generated_samples/dynamic_schema_versions_.py, schema_references_.py | Renamed parameter; added new schema_references samples |
| generated_tests/test_workload_orchestration_mgmt_*.py | Updated tests for renamed parameter, new operations, and slimmer update payloads |
Comments suppressed due to low confidence (1)
sdk/workloadorchestration/azure-mgmt-workloadorchestration/pyproject.toml:1
- A top-level
[packaging]table inpyproject.tomlis non-standard and not recognized by the build backend (setuptools.build_meta). This content was previously insdk_packaging.toml(which this PR deletes). If this metadata is consumed by repo tooling, it should likely live under[tool.azure-sdk-build]or remain insdk_packaging.toml; otherwise it will be ignored. Please confirm the consumer of these keys and move them under an appropriate[tool.*]namespace.
| ) -> None: | ||
| _endpoint = "{endpoint}" | ||
| _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore | ||
| _cloud = cloud_setting or settings.current.azure_cloud # type: ignore |
Comment on lines
+37
to
38
| and None. Default value is None. If not set, the operation's default API version will be used. | ||
| Note that overriding this default value may result in unsupported behavior. |
| from typing import List | ||
|
|
||
| __all__: List[str] = [] # Add all objects you want publicly available to users at this package level | ||
| __all__: list[str] = [] # Add all objects you want publicly available to users at this package level |
Comment on lines
834
to
+841
| return cls.serialize_unicode(data) | ||
| return eval(data_type)(data) # nosec # pylint: disable=eval-used | ||
| if data_type == "int": | ||
| return int(data) | ||
| if data_type == "float": | ||
| return float(data) | ||
| if data_type == "bool": | ||
| return bool(data) | ||
| raise TypeError("Unknown basic data type: {}".format(data_type)) |
Comment on lines
1053
to
+1060
| deserializer: typing.Any, | ||
| value: typing.Any, | ||
| response: HttpResponse, | ||
| module: typing.Optional[str] = None, | ||
| rf: typing.Optional["_RestField"] = None, | ||
| format: typing.Optional[str] = None, | ||
| ) -> typing.Any: | ||
| try: | ||
| return _deserialize(deserializer, value, module, rf, format) | ||
| except DeserializationError: | ||
| return _deserialize(deserializer, response.json(), module, rf, format) |
Comment on lines
+1124
to
+1128
| # Use _data.get() directly to avoid triggering __getitem__ which clears the cache | ||
| item = obj._data.get(self._rest_name, _UNSET) | ||
| if item is _UNSET: | ||
| # Field not set by user; return the client default if one exists, otherwise None | ||
| return self._default if self._default is not _UNSET else None |
Comment on lines
378
to
+394
| def __getitem__(self, key: str) -> typing.Any: | ||
| # If this key has been deserialized (for mutable types), we need to handle serialization | ||
| if hasattr(self, "_attr_to_rest_field"): | ||
| cache_attr = f"_deserialized_{key}" | ||
| if hasattr(self, cache_attr): | ||
| rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) | ||
| if rf: | ||
| value = self._data.get(key) | ||
| if isinstance(value, (dict, list, set)): | ||
| # For mutable types, serialize and return | ||
| # But also update _data with serialized form and clear flag | ||
| # so mutations via this returned value affect _data | ||
| serialized = _serialize(value, rf._format) | ||
| # If serialized form is same type (no transformation needed), | ||
| # return _data directly so mutations work | ||
| if isinstance(serialized, type(value)) and serialized == value: | ||
| return self._data.get(key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configurations: 'specification/edge/Microsoft.Edge.ConfigurationManager.Management/tspconfig.yaml', API Version: 2025-06-01, SDK Release Type: beta, and CommitSHA: 'b373ded4a6c77a9f541ca8f020fd2072db632751' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6318756 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.