Repository navigation
🐛 fix(seed): report a missing seed wheel instead of crashing - #3778
Merged
Merged
Conversation
…rsion_tuple get_wheel returns None without raising when no wheel can be acquired, e.g. --pip embed on a Python with no embedded wheel. _get stored that None into name_to_whl and run() then crashed with a bare AttributeError on None.version_tuple. Preset failure to a RuntimeError naming the distribution and only clear it when an attempt finds a wheel, so the lookup failure is reported through the existing failure path like any other lookup failure.
for more information, see https://pre-commit.ci
|
Checked the added regression test against the PR's exact base and head. On base |
A Python newer than every bundle reuses the newest one, so --pip embed never left get_wheel without a wheel; the comment and changelog now describe the case without that example, and the test drops the comment that repeated the source.
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.
get_wheeldocumentsNoneas its result when it acquires no wheel without an error, but the seeder stored thatNoneand crashed later, while installing, withAttributeError: 'NoneType' object has no attribute 'version_tuple', which names neither the package nor the cause. 🐛 Seeding now treats a lookup that ends without a wheel like a lookup that raised: it logscould not get wheel for distribution pipand fails with the seeder's usualseed failed due to failing to download wheels pip. A failure from the first lookup attempt is also no longer forgotten when the download attempt then finds nothing.With the bundled pip and setuptools wheels covering every supported Python, a real install never reaches this, so the example stands in for a lookup that finds nothing:
With each traceback cut to its last line, and the logged error now shown first: