Skip to content

chore: use ConfigurationError when package_dir is outside cwd#2898

Merged
henryiii merged 2 commits into
pypa:mainfrom
mayeut:ues-fatalerror
Jun 7, 2026
Merged

chore: use ConfigurationError when package_dir is outside cwd#2898
henryiii merged 2 commits into
pypa:mainfrom
mayeut:ues-fatalerror

Conversation

@mayeut

@mayeut mayeut commented Jun 6, 2026

Copy link
Copy Markdown
Member

This resolves one of the "Error Handling & Logic" items in #2854
Mostly, this changes the UX from raw traceback to a simple error log without traceback (by default) and a specific error code.

Test written with the assistance of copilot.

🤖 AI text below 🤖
Replace a generic Exception with errors.ConfigurationError when package_dir is not inside the working directory. This makes the error type consistent with the project's error handling and allows the CLI to treat this as a fatal error with the expected exit behavior.

Replace a generic Exception with errors. ConfigurationError when package_dir is not inside the working directory. This makes the error type consistent with the project's error handling and allows the CLI to treat this as a fatal error with the expected exit behavior.
Fold the standalone linux_build_test.py into the existing
linux_build_steps_test.py, which already covers the linux platform
build orchestration. Reuses the file's existing import boilerplate and
module-qualified build() call style.

Assisted-by: ClaudeCode:claude-opus-4.8
Co-Authored-By: Claude Opus 4.8 <[email protected]>
@henryiii

henryiii commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Moved the new test out of a standalone unit_test/linux_build_test.py and into the existing unit_test/linux_build_steps_test.py, which already covers the linux platform build orchestration. This avoids two near-identically-named test files for the same module. The merged test reuses the file's existing import boilerplate and uses the module-qualified cibuildwheel.platforms.linux.build(...) call style; also renamed it ..._raises_configuration_error to match what it asserts.

@henryiii henryiii merged commit 70975c2 into pypa:main Jun 7, 2026
73 of 74 checks passed
@mayeut mayeut deleted the ues-fatalerror branch June 7, 2026 05:26
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.

3 participants