Repository navigation
Load Python generator wheels alongside browser bundles - #12507
Timothee Guerin (timotheeguerin) wants to merge 3 commits into
Conversation
commit: |
|
All changed packages have been documented.
Show changes
|
Python emitter diffBaseline No changes to generated output. Rendered diff: inline on the run summary, or the emitter-diff-html artifact. Informational check (eng/emitter-diff); does not block the PR. |
|
You can try these changes here
|
|
Hi @Timothee Guerin (@timotheeguerin). Your PR has had no update for 14 days and it is marked as a stale PR. If it is not updated within 14 additional days, the PR will automatically be closed. The |
Python browser generation constructs a global wheel URL from the emitter version, independently of where its JavaScript was loaded. This breaks stable npm releases and makes local and PR-preview bundles depend on separately published assets.
Import the wheel as a browser bundle asset and resolve it relative to the emitted JavaScript. The same layout now works for stable deployments, PR previews, and local development, including when Python is bundled inside the Azure emitter:
The bundler, Vite plugin, and bundle uploader carry the wheel alongside JavaScript without decoding its binary contents. Native Python execution and Pyodide's runtime/dependency loading are unchanged. Browser builds need this bundler's wheel-asset support or equivalent file-asset handling.
Verified real Azure client generation at root and nested preview URLs in Chromium/Firefox, plus native generation. The normal code build, 64 existing Python tests, and focused bundler unit tests pass; no playground smoke tests were added.
This is needed by Azure/typespec-azure#5989, which will consume the upstream Python and bundler changes instead of carrying a dependency patch.