Skip to content

[http-client-python] playground wheel bundle - #12615

Merged
Libba Lawrence (l0lawrence) merged 1 commit into
mainfrom
l0lawrence-upstream-playground-test-pr
Nov 19, 2026
Merged

Libba Lawrence (l0lawrence) merged 1 commit into
mainfrom
l0lawrence-upstream-playground-test-pr

Conversation

@l0lawrence

@l0lawrence Libba Lawrence (l0lawrence) commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

change location of install to cfs for playground packages to bypass network isolation - pinning versions of dependencies and bundling their whls from cfs install for browser access

Copy the current changes from #12590 onto upstream main for same-repository draft PR checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Nov 18, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: efcf266

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/http-client-python
Show changes

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

Fix playground generation by bundling the generator's Python dependencies with the emitter instead of resolving them from PyPI in the browser. The playground build obtains hash-pinned dependencies from the configured Python feed and builds pure-Python PyYAML and MarkupSafe wheels without downloading from the Pyodide CDN. Update the generator's PyYAML dependency to 6.0.3.

@l0lawrence

Copy link
Copy Markdown
Member Author

/azp run typespec - http-client-python - publish

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
No pipelines were found matching this branch/path.

@l0lawrence

Copy link
Copy Markdown
Member Author

/azp run typespec - http-client-python - publish

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
No pipelines were found matching this branch/path.

@github-actions

Copy link
Copy Markdown
Contributor

Python emitter diff

Baseline gh:3b98b20aef4f9765d74eb637a1b0cc3688800e37 vs this PR.

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.

@azure-sdk-automation

azure-sdk-automation Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@l0lawrence Libba Lawrence (l0lawrence) changed the title [http-client-python] Test playground wheel bundle from upstream branch [http-client-python] playground wheel bundle Nov 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The only browser-wheel build test fails during download, leaving successful wheel/manifest generation and preservation of the previous bundle on dependency-check failure untested.

1 open issue
What changed in this PR

This PR makes the Python emitter’s playground dependencies available as published wheel assets, avoiding browser-side dependency resolution from external Python package feeds.

Changes:

  • Adds a playground build that downloads hash-pinned dependencies and bundles pure-Python wheels with a manifest.
  • Updates browser initialization to load those assets, validate the manifest, and report package-loading failures.
  • Wires publishing to the new build and adds tests, documentation, and a PyYAML dependency update.
File Description
packages/​http-client-python/​tests/​unit/​test_browser_feed.py Adds wheel-builder validation and failure-path tests.
packages/​http-client-python/​package.json Adds the playground build command and browser asset patterns.
packages/​http-client-python/​generator/​setup.py Updates PyYAML to 6.0.3.
packages/​http-client-python/​eng/​scripts/​setup/​build.ts Forwards build arguments to the Python script.
packages/​http-client-python/​eng/​scripts/​setup/​build_pygen_wheel.py Builds and validates the browser wheel bundle and manifest.
packages/​http-client-python/​eng/​playground-requirements.txt Pins browser dependencies and artifact hashes.
packages/​http-client-python/​eng/​pipeline/​publish.yml Selects the playground-specific build for publication.
packages/​http-client-python/​emitter/​test/​browser-pyodide.test.ts Tests asset loading, invalid manifests, failures, and retries.
packages/​http-client-python/​emitter/​src/​emitter.ts Loads browser wheels from the published manifest.
packages/​http-client-python/​ARCHITECTURE.md Documents browser dependencies, builds, and publication.
cspell.yaml Adds the pytokens package name to the dictionary.
.chronus/​changes/​python-playground-browser-wheels-offline-2026-10-16.md Records the playground fix and PyYAML update.

Review effort: Balanced

@l0lawrence
Libba Lawrence (l0lawrence) added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit b317c50 Nov 19, 2026
39 checks passed
@l0lawrence
Libba Lawrence (l0lawrence) deleted the l0lawrence-upstream-playground-test-pr branch November 19, 2026 18:35
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