Skip to content

[AutoPR azure-iot-deviceupdate]-generated-from-SDK Generation - Python-6437603#47511

Open
azure-sdk wants to merge 3 commits into
mainfrom
sdkauto/azure-iot-deviceupdate-6437603
Open

[AutoPR azure-iot-deviceupdate]-generated-from-SDK Generation - Python-6437603#47511
azure-sdk wants to merge 3 commits into
mainfrom
sdkauto/azure-iot-deviceupdate-6437603

Conversation

@azure-sdk

Copy link
Copy Markdown
Collaborator

Configurations: 'specification/deviceupdate/data-plane/duiothub/tspconfig.yaml', SDK Release Type: stable, and CommitSHA: '292231b1131ff9fd070377372a0647c6ac7a6ce2' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6437603 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://azsdk-releaseplan-dashboard-hveph5aqhhcfhtgu.westus-01.azurewebsites.net/?releaseplan=2239 Submitted by: laonyango@microsoft.com

Copilot AI review requested due to automatic review settings June 15, 2026 21:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to be an auto-generated refresh of azure-iot-deviceupdate using the TypeSpec-based Python code generator, including packaging modernization and regeneration of the client/model surface for API version 2026-06-01.

Changes:

  • Migrates packaging from setup.py/sdk_packaging.toml to PEP 621 pyproject.toml and updates manifest metadata.
  • Regenerates sync/async clients, operation/model init/patch scaffolding, and introduces new _utils/* runtime helpers (serialization/model base).
  • Updates samples/tests formatting and bumps library version to 1.1.0.

Reviewed changes

Copilot reviewed 41 out of 43 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
sdk/deviceupdate/azure-iot-deviceupdate/tsp-location.yaml Adds TypeSpec source location metadata (spec repo path + commit).
sdk/deviceupdate/azure-iot-deviceupdate/tests/testcase.py Minor formatting updates in test client creation and preparer defaults.
sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py Formatting changes to test signatures and long calls.
sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py Formatting changes to test signatures and spacing.
sdk/deviceupdate/azure-iot-deviceupdate/setup.py Removes legacy setuptools setup.py packaging.
sdk/deviceupdate/azure-iot-deviceupdate/sdk_packaging.toml Removes legacy packaging metadata file (moved into pyproject.toml).
sdk/deviceupdate/azure-iot-deviceupdate/samples/ListUpdates/sample_list_updates.py Wraps error messages/strings for formatting consistency.
sdk/deviceupdate/azure-iot-deviceupdate/samples/ImportUpdate/sample_import_update.py Re-formats payload structure and error output (but introduces/retains a poller wait bug).
sdk/deviceupdate/azure-iot-deviceupdate/samples/GetUpdate/sample_get_update.py Wraps error messages/strings for formatting consistency.
sdk/deviceupdate/azure-iot-deviceupdate/samples/GetDevice/sample_get_device.py Wraps env-var error message; adds a file-level pylint disable.
sdk/deviceupdate/azure-iot-deviceupdate/samples/DeployUpdate/sample_deploy_update.py Re-formats deployment payload and error output.
sdk/deviceupdate/azure-iot-deviceupdate/samples/DeleteUpdate/sample_delete_update.py Wraps env-var error message and updates string quoting.
sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml Introduces PEP 621 metadata + dynamic version/readme and embeds [packaging].
sdk/deviceupdate/azure-iot-deviceupdate/MANIFEST.in Reorders/adjusts included files and py.typed inclusion.
sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md Adds 1.1.0 entry and updates version history header (currently with placeholder text).
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py Updates patch scaffold header and typing for __all__.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/init.py Updates generated init wiring, TYPE_CHECKING imports, and pyright ignores.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/models/_patch.py Adds models patch scaffold.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/models/_enums.py Adds generated enum definitions.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/models/init.py Adds generated models init wiring and exports.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py Updates async operations patch scaffold header and typing for __all__.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/init.py Updates async operations init wiring, TYPE_CHECKING imports, and pyright ignores.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py Replaces legacy patch stub with standardized customization scaffold.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py Regenerates async client configuration (policies, api_version, polling_interval).
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_client.py Regenerates async client pipeline/policy wiring and send_request signature.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/init.py Updates async package init wiring and patch export behavior.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_version.py Bumps version constant to 1.1.0.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_vendor.py Removes legacy helper _format_url_section.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/utils.py Adds ETag/match-condition helper utilities.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/serialization.py Replaces legacy serialization layer with updated generator implementation + typing.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/model_base.py Adds large generated model base/runtime for REST + XML serialization/deserialization.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/init.py Adds _utils package marker.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py Replaces legacy patch stub with standardized customization scaffold.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py Regenerates sync client configuration (policies, api_version, polling_interval).
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_client.py Regenerates sync client pipeline/policy wiring and send_request signature.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/init.py Updates package init wiring and patch export behavior.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/init.py Normalizes string quoting in namespace package path extension.
sdk/deviceupdate/azure-iot-deviceupdate/azure/init.py Normalizes string quoting in namespace package path extension.
sdk/deviceupdate/azure-iot-deviceupdate/apiview-properties.json Adds APIView cross-language mapping metadata for review.
sdk/deviceupdate/azure-iot-deviceupdate/_metadata.json Adds generator metadata (apiVersion, emitter versions, spec commit).

Comment thread sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml
Comment on lines 3 to 8
## 1.1.0 (2026-06-15)

skip changelog generation for data-plane package and please add changelog manually.

## 1.0.1 (Unreleased)

Comment on lines 108 to 113
request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str"),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
Comment on lines 110 to 115
request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str"),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
Comment on lines +32 to 35
:keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
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.
:paramtype api_version: str
Comment on lines +32 to 35
:keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
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.
:paramtype api_version: str
Comment on lines 62 to 64
response = client.device_update.begin_import_update(content)
response.wait
print(response.result())
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long,useless-suppression
- cspell: add 'deser' and 'duiothub' to the deviceupdate override block
  (deser is used as a parameter name in generated model_base.py; duiothub
  appears in tsp-location.yaml as the spec directory name).
- pyproject.toml: bump Development Status classifier from '4 - Beta' to
  '5 - Production/Stable' and flip is_stable to true to match the 1.1.0 GA
  release version (Verify sdist gate).
- CHANGELOG.md: replace placeholder text in the 1.1.0 entry with proper
  Features Added / Other Changes sections, and remove the stale
  '1.0.1 (Unreleased)' block that broke chronological date ordering.
- samples/GetDevice/sample_get_device.py, sample_deploy_update.py,
  sample_get_update.py, sample_import_update.py: use distinct variable
  names per call so mypy stops flagging incompatible reassignment of
  ItemPaged[T] / model types (7 mypy errors).
- api.md, api.metadata.yml: generated via 'azpysdk apistub --md
  --extract-metadata' to satisfy the consistency / API.md gate.

Known remaining failure: Run Tests jobs across all OS/Python matrices fail
because the recorded test-proxy sessions were captured against the old
generated client and no longer match the new TypeSpec-emitted wire shape
(x-request-mismatch-error). Re-recording requires live-service access and
will be done in a follow-up.
Reusing the loop variable 'item' across four for-loops over different
ItemPaged[T] types caused mypy to infer 'item' as Device from the first
loop, then fail on each subsequent loop because Group / DeviceClass /
DeviceClassSubgroupUpdatableDevices are not assignable to Device.

Use distinct loop variable names (device, group_item, device_class,
best_update) so each iteration is type-checked independently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants