Correct usage of invalid file URL in test #12964
Merged
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 the process of diagnosing test failures in #12962, I discovered that there has been a change in Python 3.13.0rc2 (that wasn't in rc1) that breaks the pip test suite.
The underlying cause is python/cpython#85110, which has been back ported to 3.13 and 3.12. Previously, the following code:
whereas it now returns:
This poses a problem because the absence of the
file://
means that the appropriate URL handler isn't installed, resulting in a failure of "ERROR: Could not install packages due to an OSError: No connection adapters were found for 'file:unexistent_file'" rather than "ERROR: 404 Client Error: FileNotFoundError for url: file:///unexistent_file".The new behavior seems correct -
file:unexistent_file
isn't a valid File URL; and it definitely isn't equivalent tofile:///unexistent_file
(at best, it would be equivalent tofile://unexistent_file
).This PR updates the test case to use a valid, but non-existent file URL (which seems to be the point of the test).