Skip to content

fix: raise clear errors when no wheel is produced#2909

Open
henryiii wants to merge 1 commit into
pypa:mainfrom
henryiii:fix/no-wheel-error-handling
Open

fix: raise clear errors when no wheel is produced#2909
henryiii wants to merge 1 commit into
pypa:mainfrom
henryiii:fix/no-wheel-error-handling

Conversation

@henryiii

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

This addresses items 1-4 of #2908, replacing several bare tracebacks with clear FatalErrors when a build does not produce a wheel or platform resources are inconsistent.

Changes:

  • Add errors.BuildProducedNoWheelError (exit code 10) for the case where a build frontend exits successfully but produces no wheel.
  • Guard the built-wheel globs on Linux, macOS, Windows, iOS, and Pyodide so they raise BuildProducedNoWheelError instead of a bare IndexError / StopIteration. (Android already handled this via its glob1 helper.)
  • Wrap Pyodide's repaired-wheel glob in try/except StopIteration to raise RepairStepProducedNoWheelError, matching the existing macOS/Windows pattern.
  • Replace the assert statements that validate android.py env output with errors.FatalError, including the unexpected token in the message.
  • Raise errors.FatalError naming the missing macOS identifier when ios.py cannot find a matching macOS configuration, instead of an IndexError.

Part of #2908

🤖 Generated with Claude Code

Addresses items 1-4 of pypa#2908:

- Add errors.BuildProducedNoWheelError (exit code 10) for when a build
  frontend exits successfully without producing a wheel.
- Guard built-wheel globs on linux, macos, windows, ios, and pyodide so
  they raise BuildProducedNoWheelError instead of bare IndexError /
  StopIteration. (android already guards this via glob1.)
- Wrap pyodide's repaired-wheel glob in try/except StopIteration to raise
  RepairStepProducedNoWheelError, matching macos/windows.
- Replace android.py env-parsing asserts with errors.FatalError including
  the unexpected token.
- Raise errors.FatalError with the missing macOS identifier when ios.py
  cannot find a matching macOS configuration, instead of IndexError.

Assisted-by: ClaudeCode:claude-fable-5
@henryiii henryiii marked this pull request as ready for review June 12, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant