Skip to content

[python] update python emitter install with helpful 401 error output - #10720

Merged
Yuchao Yan (msyyc) merged 2 commits into
microsoft:mainfrom
JennyPng:cfs-error-message
May 25, 2026
Merged

Yuchao Yan (msyyc) merged 2 commits into
microsoft:mainfrom
JennyPng:cfs-error-message

Conversation

@JennyPng

@JennyPng jenny (JennyPng) commented May 18, 2026 •

Copy link
Copy Markdown
Member

closes Azure/azure-sdk-for-python#46964

Because the python emitter's install.ts may use uv pip to install packages, it can run into authentication errors if a package version isn't cached in our central feed service, which we now default to pulling from instead of PyPI (see Azure/azure-sdk-for-python#46281 )

updates the error point to link to python repo's authentication docs

@pkg-pr-new

pkg-pr-new Bot commented May 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 62fb7bb

@github-actions

github-actions Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

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

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

When python emitter install fails due to 401 error, output informative instructions linking to resolution steps in the Python SDK's repo docs.

@azure-sdk-automation

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

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

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.

Pull request overview

Improves the Python http-client emitter’s installation experience by surfacing more actionable diagnostics when package installation fails, particularly for authentication-related (401) failures against the Azure feed.

Changes:

  • Switch install_packages to capture subprocess output and include it in raised errors.
  • Add special-case guidance (linking to Azure SDK for Python contributing/auth docs) when failure output indicates a 401/Unauthorized.
  • Add a Chronus entry documenting the internal change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/http-client-python/eng/scripts/setup/package_manager.py Capture pip/uv install output and enhance errors with 401-specific guidance.
.chronus/changes/cfs-error-message-2026-4-18-15-8-34.md Add changelog entry describing the improved 401 failure messaging.

@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue May 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 25, 2026
@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue May 25, 2026
Merged via the queue into microsoft:main with commit d72f4f1 May 25, 2026
41 checks passed
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.

Improve troubleshooting when updating the python emitter version in emitter-package.json

4 participants