Skip to content

[typespec-python] simplify eng#4399

Merged
msyyc merged 48 commits into
mainfrom
python-update-eng
Jun 8, 2026
Merged

[typespec-python] simplify eng#4399
msyyc merged 48 commits into
mainfrom
python-update-eng

Conversation

@msyyc

@msyyc msyyc commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

Reduce duplication between typespec-python (a thin wrapper) and upstream @typespec/http-client-python so we don't keep maintaining two copies of the same eng/test scaffolding by hand.

Approach

  • eng/scripts/sync.ts — new allow-list mirror that copies a curated set of shared files from a sibling checkout (<repo-root>/core/packages/http-client-python/) into this package. Supports --check for CI drift detection.
  • eng/scripts/ci/regenerate-common.ts — shared helpers / spec tables / prepareBaselineOfGeneratedCode, byte-identical with the upstream copy. Synced.
  • eng/scripts/ci/regenerate.ts — kept per-repo: wrapper does single-phase in-process regen; upstream does two-phase. Imports common helpers, owns only paths/argv/orchestration.
  • dev_requirements.txt — synced as a section (everything before the # additional dependency needed for development marker is replaced from upstream; wrapper-only deps like setuptools are preserved).
  • Synced shared CI runners: run_apiview.py, run_mypy.py, run_pylint.py, run_pyright.py, run_sphinx_build.py, util.py, plus mypy.ini, pylintrc, pyrightconfig.json.
  • Synced shared test assets / drivers: tests/data/, tests/mock_api/, tests/requirements/, tests/conftest.py, tests/install_packages.py, tests/tox.ini, and the generator/ (pygen) tree.
  • eng/scripts/setup/* is intentionally not synced — the wrapper owns its own setup pipeline (install.py, prepare.py, venvtools.py, …).

@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:python Issues for @azure-tools/typespec-python emitter label May 8, 2026
@azure-sdk

azure-sdk commented May 8, 2026

Copy link
Copy Markdown
Collaborator

All changed packages have been documented.

  • @azure-tools/typespec-python
Show changes

@azure-tools/typespec-python - internal ✏️

Simplify eng system for typespec-python

@github-actions

This comment was marked as off-topic.

@pkg-pr-new

pkg-pr-new Bot commented May 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-python@4399

commit: 683a535

@azure-sdk

azure-sdk commented May 8, 2026

Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

@Azure Azure deleted a comment from github-actions Bot May 8, 2026
msyyc and others added 5 commits May 9, 2026 14:20
Backmerge of hotfix release tcgc@0.69.0 from `release/may-2026` into
`main`.

This ensures the version bump and fixes are reflected in main.

⚠️ **Rebase merge** this PR (do not squash).

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Co-authored-by: tadelesh <chenjieshi@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label May 26, 2026
@msyyc
msyyc enabled auto-merge June 2, 2026 08:10
@msyyc
msyyc added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit a04ee76 Jun 8, 2026
33 checks passed
@msyyc
msyyc deleted the python-update-eng branch June 8, 2026 05:35
l0lawrence added a commit that referenced this pull request Jun 30, 2026
Upstream PR #4399 moved/rewrote the python regenerate driver to
eng/scripts/ci/regenerate.ts (in-process compilation). Re-apply the
emitter-diff overrides on the new wrapper and point the adapter at it:

- regenerate.ts: add --httpSpecsDir/--azureSpecsDir/--use-pyodide/--no-baseline
  options; thread use-pyodide into emitter task options; gate the
  azure-sdk-for-python baseline clone behind --no-baseline. All overrides live
  in the non-synced wrapper so regenerate-common.ts stays identical upstream.
- python adapter: drive eng/scripts/ci/regenerate.ts with --pluginDir
  (emitter build) + --generatedFolder (output root, anchored so files land in
  <outputDir>/tests/generated); pin specs to the current checkout so only the
  emitter varies; pass --no-baseline. Update runTests sync source for the new
  nested layout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:python Issues for @azure-tools/typespec-python emitter eng lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants