Handle the case where there are multiple bundled pip wheels #1444
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.
In some older versions of Python multiple pip wheels have been accidentally bundled with the Python stdlib upstream. For example in Python 3.9.0 (which has been superseded by newer patch versions of Python 3.9.x):
https://github.com/python/cpython/tree/v3.9.0/Lib/ensurepip/_bundled
After #1442, this results in eg:
Whilst these affected Python versions are old/insecure and not available on newer stacks, we should still make sure they work as expected.
As such, the lookup of the bundled pip wheel needs to handle this case, which it now does by just picking the first found pip wheel.
This was spotted via https://heroku.support/1245122, which was from an app using the
main
branch of this buildpack (since #1442 hasn't yet been released to the buildpack registry).GUS-W-13111316.