Skip to content

Preserve legacy Python enum names after TypeSpec emitter casing fix #49975

Closed

Description

@msyyc

Background

microsoft/typespec#10329 changed how the Python emitter normalizes enum member names containing numeric segments and acronyms. Regenerating existing Azure SDK for Python packages with the updated emitter may rename public enum members and break customers who reference the previously released names.

For example, the emitter now preserves the underscore before date segments (WEB_SEARCH_PREVIEW2025_03_11 becomes WEB_SEARCH_PREVIEW_2025_03_11) and emits A2A instead of A2_A. These illustrate the naming change; the affected legacy SDKs still need to be identified.

Work to do

  • Identify existing Azure SDK for Python packages and enum members whose public names change when regenerated with the updated emitter. Compare against released SDKs and distinguish compatibility breaks from intentional changes.
  • In the corresponding TypeSpec definitions in Azure/azure-rest-api-specs, use Python-scoped @clientName overrides where needed to preserve the existing public enum member names without changing their wire values or other languages' APIs.
  • Regenerate the affected SDKs and verify that the previous Python enum member names and serialization values remain compatible. Add or update regression coverage as appropriate.
  • Track the affected packages and the associated spec and SDK PRs in this issue.

Activity

  1. added
    needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.
    on Nov 12, 2026
  2. added
    MgmtThis issue is related to a management-plane library.
    and removed
    needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.
    on Nov 12, 2026
  3. msyyc commented on Nov 12, 2026

    @msyyc
    MemberAuthor

    Audit data and enum-file diffs: Python management SDK enum casing audit (secret gist).

    Regenerated 175/175 eligible SDKs: azure-mgmt-* packages with root-level tsp-location.yaml and a released GA version >=1.0.0 in their changelog history. Of 315 management packages inspected, 96 lacked root TypeSpec inputs and 44 had never GAed.

    Found 106 underscore-only enum-member rename candidates across 12 SDKs, with unchanged paired wire values. The gist includes member-level CSVs, all 417 enum-member changes, raw enum-file diffs, per-SDK results, exclusions, spec SHAs, generation versions, and validation results.

    Latest-spec fallback rows are labeled review_latest_spec_drift because they can include unrelated service changes. GA history establishes package eligibility, not whether each member shipped in a GA release; check published versions before applying spec fixes. Neon was regenerated from its last pre-deletion spec snapshot. No spec fixes or PRs have been made.

  4. lirenhe commented on Nov 18, 2026

    @lirenhe
    Member

    close it as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

MgmtThis issue is related to a management-plane library.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions