Skip to content

[python] fix gen internal models - #11639

Merged
Yuchao Yan (msyyc) merged 4 commits into
mainfrom
fix/python-typeddict-generation
Aug 13, 2026
Merged

[python] fix gen internal models#11639
Yuchao Yan (msyyc) merged 4 commits into
mainfrom
fix/python-typeddict-generation

Conversation

@l0lawrence

@l0lawrence Libba Lawrence (l0lawrence) commented Aug 12, 2026

Copy link
Copy Markdown
Member

We are currently generating typeddict models unrelated to the operations (specifically for azure-storage-fileshare I noticed typeddicts generated that were not referenced in any operation even transitively) is this intended? They are input models so the is_usage_input flag tags them as things we should generate, but they are not actively referenced in an operation overload

Supersedes #11567 (moved head branch to upstream so emitter-diff runs).

@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@11639

commit: 9d1201f

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - fix ✏️

Only generate TypedDict definitions in types.py when they are referenced by operation inputs or required by those input models, omitting unused response-only models.

@github-actions

Copy link
Copy Markdown
Contributor

Python emitter diff

Baseline gh:63a9469a9133193fbbc38b4fd4e86864c13871e6 vs this PR.

Diff summary: 5 file(s), +2 / -169

Rendered diff: inline on the run summary, or the emitter-diff-html artifact.

Informational check (eng/emitter-diff); does not block the PR.

@azure-sdk-automation

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 9953b07 Aug 13, 2026
59 of 61 checks passed
@msyyc
Yuchao Yan (msyyc) deleted the fix/python-typeddict-generation branch August 13, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants