Repository navigation
fix: minor robustness fixes from code review - #1121
Merged
Merged
Conversation
henryiii
force-pushed
the
fix/minor-robustness
branch
from
July 1, 2026 20:25
ac1a5af to
cce9133
Compare
henryiii
commented
Jul 2, 2026
henryiii
force-pushed
the
fix/minor-robustness
branch
from
July 2, 2026 22:22
e6c1d1a to
84a6947
Compare
gaborbernat
approved these changes
Jul 2, 2026
- env: parse macOS release with split() so a dot-less release (e.g. '15') is not truncated and an empty release no longer raises ValueError - _builder: return a fresh copy of the default build-system table so a caller mutating requires cannot corrupt later builders in the process - env: set self._path before os.path.realpath so a failure there does not mask the original exception with AttributeError and leak the temp dir - _builder: raise BuildException (not ValueError) for an invalid wheel so the CLI renders it nicely - _builder: drop stray trailing spaces in two error messages Assisted-by: ClaudeCode:claude-opus-4.8
Assisted-by: ClaudeCode:claude-opus-4.8
The with-statement body in test_isolated_env_enter_failure_before_path_set never ran (the mocked __enter__ raises first), failing the 100% coverage gate on test files. Assisted-by: ClaudeCode:claude-opus-4.8
henryiii
force-pushed
the
fix/minor-robustness
branch
from
July 2, 2026 22:38
84a6947 to
9d01415
Compare
henryiii
marked this pull request as ready for review
July 2, 2026 22:43
layday
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I need to edit this a bit, leaving it in draft until I do.
🤖 AI text below 🤖
A batch of minor robustness fixes found during code review.
Part of the code review in #1116.
env._get_minimum_pip_version_str: parse the macOS release withsplit(".", 1)[0]instead of slicing atfind("."). The old code truncated the last digit of a dot-less release (e.g."15"became"1") and raisedValueErroron an empty release. An empty release now falls back to the generic minimum._builder._parse_build_system_table: return a fresh copy of the default build-system table (including a freshrequireslist) so a caller mutating the result cannot corrupt the shared module-level default for every later builder in the process.env.DefaultIsolatedEnv.__enter__: assignself._pathbefore callingos.path.realpath, so a failure there no longer masks the original exception with anAttributeErrorfrom__exit__and no longer leaks themkdtempdirectory._builder.metadata_path: raiseBuildException(not a bareValueError) for an invalid wheel, so the CLI renders it nicely like every other failure in this package._builder._read_pyproject_toml: remove stray trailing spaces from two error messages.Regression tests were added for items 1-4 (test-first, confirmed failing before the fixes).