[python] Fix @clientDefaultValue serialization regression from #10476#10546
[python] Fix @clientDefaultValue serialization regression from #10476#10546
Conversation
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/91e8124d-723d-42e3-a606-d2e9fa8cd443 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
commit: |
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
|
@copilot the changes in the pipeline setup is causing these errors Stage CSharp_Build job DetectApiChanges depends on unknown job Build_linux_20. |
... Reverted the unrelated pipeline changes from commit |
|
@copilot we still need to do 22 and up, with your last change, we got this failure on the
##[error]PowerShell exited with code '1'. |
Agreed — upgraded the emitter pipelines to drop Node 20 entirely in |
Pull request was converted to draft
d462382 to
f56d56f
Compare
…ft/typespec into copilot/fix-issue-with-typespec
|
@iscai-msft CI is fixed and pls help review again, thanks! |
Fix follow-up for #10476: restore client default value materialization for serialization, plus a couple of regenerator-tooling changes that landed on the same branch.
Addresses review comment r3160211783 on PR #10476.
Changes
Model.__init__(generator/pygen/codegen/templates/model_base.py.jinja2) so@clientDefaultValuedefaults are present in_dataand serialized on the wire (the_RestField.__get__fallback for unset fields is kept intact).eng/scripts/ci/regenerate.tsinto a neweng/scripts/ci/regenerate-common.tsmodule so the file can be kept byte-identical with the@azure-tools/typespec-pythonwrapper copy (pnpm sync). Per-repo divergence (paths, emitter name, single- vs two-phase orchestration, argv/help text) stays in each repo's ownregenerate.ts, which now builds aRegenerateContextand feeds it into the shared helpers.@azure-tools/azure-http-specsfrom0.1.0-alpha.39to0.1.0-alpha.40-dev.12inpackage.json