Skip to content

App Config to TypeSpec#47178

Merged
mrm9084 merged 5 commits into
Azure:mainfrom
mrm9084:AppConfigToTypeSpec
Jun 3, 2026
Merged

App Config to TypeSpec#47178
mrm9084 merged 5 commits into
Azure:mainfrom
mrm9084:AppConfigToTypeSpec

Conversation

@mrm9084
Copy link
Copy Markdown
Member

@mrm9084 mrm9084 commented May 27, 2026

Description

Updates the Python sdk to actually use the typespec generation

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings May 27, 2026 21:28
@github-actions github-actions Bot added the App Configuration Azure.ApplicationModel.Configuration label May 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 migrates azure-appconfiguration to use TypeSpec-based (DPG) generated code, updating the generated client/models/operations (sync + async) and introducing new generation/metadata artifacts.

Changes:

  • Updates the TypeSpec source pin (tsp-location.yaml) and refreshes generated _generated/ code (operations, models, utilities, sync/async clients).
  • Introduces a packaging definition via pyproject.toml and adds new metadata files (_metadata.json, apiview-properties.json), plus an updated assets tag.
  • Applies minor formatting-only updates across samples/tests (extra blank lines, pylint suppressions).

Reviewed changes

Copilot reviewed 57 out of 58 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sdk/appconfiguration/azure-appconfiguration/tsp-location.yaml Updates the swagger/spec commit pin used for generation.
sdk/appconfiguration/azure-appconfiguration/tests/test_azure_appconfiguration_client.py Adds pylint suppression for large test module.
sdk/appconfiguration/azure-appconfiguration/tests/test_azure_appconfiguration_client_async.py Adds pylint suppression for large async test module.
sdk/appconfiguration/azure-appconfiguration/tests/consts.py Adds pylint suppressions.
sdk/appconfiguration/azure-appconfiguration/setup.py Minor formatting cleanup (blank line removal).
sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_entra_id_and_bleu.py Whitespace cleanup in docstring + newline.
sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/hello_world_entra_id_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample_async.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/samples/check_configuration_settings_sample.py Formatting-only newline adjustment.
sdk/appconfiguration/azure-appconfiguration/pyproject.toml Adds/expands PEP 517/518 packaging config and project metadata.
sdk/appconfiguration/azure-appconfiguration/MANIFEST.in Minor formatting/line-number normalization in diff (no behavior change).
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py Updates header to generated-style block; version unchanged.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/py.typed Removes redundant py.typed marker under _generated/.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_patch.py Adds minor formatting; retains customization hook.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_models.py Updates generated models to use new model base/utilities + typing/visibility metadata.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_enums.py Minor docstring punctuation tweaks in enums.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_vendor.py Removes vendor mixin/helpers (moved to shared utils).
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_patch.py Adds patching hook to copy customized members onto raw mixin.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py Updates customization layer to target the new raw operations mixin name.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_operations.py Refreshes async operations: paging, deserialization, api-version validation, stream/decompress handling.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/init.py Adjusts exports to match new raw mixin/patch approach.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_configuration.py Updates async configuration defaults/docs and version import path.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_client.py Updates async client wiring and conditional Self import.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_version.py Adds generated version module under _generated/.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_validation.py Adds API version validation decorator used by operations.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_utils/utils.py Introduces shared client mixin + etag helpers used by operations.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_utils/serialization.py Updates generated serialization helpers (typing, safety, perf tweaks).
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_utils/model_base.py Updates generated model base/deserialization/serialization and XML helpers.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_utils/init.py Adds _utils package marker.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_patch.py Adds patching hook to copy customized members onto raw mixin.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_patch.py Updates customization layer to target the new raw operations mixin name.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_operations.py Refreshes sync operations: request building defaults, paging, deserialization, api-version validation, stream/decompress handling.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/init.py Adjusts exports to match new raw mixin/patch approach.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_configuration.py Updates sync configuration defaults/docs and version import path.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_client.py Updates sync client wiring and conditional Self import.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/init.py Switches generated package version import to _generated/_version.py.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_requests.py Adds pylint suppressions.
sdk/appconfiguration/azure-appconfiguration/azure/init.py Adds type-ignore on pkgutil namespace extension.
sdk/appconfiguration/azure-appconfiguration/assets.json Updates the asset tag reference.
sdk/appconfiguration/azure-appconfiguration/apiview-properties.json Adds APIView cross-language mapping metadata.
sdk/appconfiguration/azure-appconfiguration/_metadata.json Adds API version metadata for generation.
Comments suppressed due to low confidence (2)

sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py:32

  • This aio patch module still imports ..._model_base and ..._serialization, but those modules no longer exist under _generated/ after the TypeSpec layout changes (the code now lives under _generated/_utils/). Importing _generated.aio._operations._patch will raise ModuleNotFoundError, which also breaks _patch_sdk() execution during package import. Update these imports (and corresponding usage) to reference _generated._utils.model_base / _generated._utils.serialization (or reintroduce the modules if they’re still required).
from ._operations import (
    _AzureAppConfigurationClientOperationsMixin as AzureAppConfigClientOpGenerated,
    ClsType,
    build_azure_app_configuration_get_key_values_request,
    build_azure_app_configuration_check_key_values_request,
)

sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_patch.py:15

  • _generated/models/_patch.py imports .._model_base / .._model_base.rest_field, but _generated/_model_base.py no longer exists in this PR (model helpers were moved under _generated/_utils/). Because models/__init__.py unconditionally imports _patch and runs _patch_sdk(), this will raise ModuleNotFoundError at import time. Update the patch to use _generated._utils.model_base.Model and rest_field (or re-add the removed modules).
import datetime
from typing import Any, Dict, List, Mapping, Optional, overload

from .. import _model_base
from .._model_base import rest_field

Comment thread sdk/appconfiguration/azure-appconfiguration/pyproject.toml
Comment thread sdk/appconfiguration/azure-appconfiguration/setup.py Outdated
Copy link
Copy Markdown
Member

@l0lawrence l0lawrence left a comment

Choose a reason for hiding this comment

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

few nits

Comment thread sdk/appconfiguration/azure-appconfiguration/pyproject.toml
Comment thread sdk/appconfiguration/azure-appconfiguration/assets.json
Copy link
Copy Markdown
Member

@l0lawrence l0lawrence left a comment

Choose a reason for hiding this comment

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

lgtm

Comment thread sdk/appconfiguration/azure-appconfiguration/_metadata.json
@mrm9084 mrm9084 merged commit 1cb7bd8 into Azure:main Jun 3, 2026
19 checks passed
@mrm9084 mrm9084 deleted the AppConfigToTypeSpec branch June 3, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Configuration Azure.ApplicationModel.Configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants