-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Return a better error message if a file:
URL is not found
#10263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
752c4f9
Return a better error message if a file is not found
DiddiLeija 5afb103
Create 10263.bugfix.rst
DiddiLeija 6854c25
Format the error message
DiddiLeija d1c19ed
Fix an ImportError
DiddiLeija 4473870
Adjust the error message
DiddiLeija f0086ac
Update the error message
DiddiLeija 538fb0d
Update the error message
DiddiLeija 1b674e6
Update the error message
DiddiLeija 1a0fb42
Create test_bad_url.py
DiddiLeija 8c72c9b
Style fixes to `test_bad_url.py`
DiddiLeija 99a316b
Update test_bad_url.py
DiddiLeija 1eac21e
Update test_bad_url.py
DiddiLeija 7141432
Update test_bad_url.py
DiddiLeija 2703119
Update test_bad_url.py
DiddiLeija b6e66ce
Update test_bad_url.py
DiddiLeija fa03122
Update test_bad_url.py
DiddiLeija b3a62af
Update test_bad_url.py
DiddiLeija 4f6eb30
Update test_bad_url.py
DiddiLeija aceefdc
Update test_bad_url.py
DiddiLeija de0452f
Update test_bad_url.py
DiddiLeija 029a113
Update test_bad_url.py
DiddiLeija 51274d4
Update test_bad_url.py
DiddiLeija 12971f4
Update test_bad_url.py
DiddiLeija b7bce7c
Update test_bad_url.py
DiddiLeija 9faf241
Update test_bad_url.py
DiddiLeija e7ca41e
Update test_bad_url.py
DiddiLeija 5877fbb
Update tests/functional/test_bad_url.py
DiddiLeija 5147c2c
Update test_bad_url.py
DiddiLeija 086b1c0
Update test_bad_url.py
DiddiLeija 2f1227b
Update test_bad_url.py
DiddiLeija 48884de
Update test_bad_url.py
DiddiLeija e14674c
Update test_bad_url.py
DiddiLeija 79a6507
Update test_bad_url.py
DiddiLeija 6f0369c
Update test_bad_url.py
DiddiLeija 37242e0
Update test_bad_url.py
DiddiLeija dee894b
Update news/10263.bugfix.rst
pradyunsg dd1103f
Update news/10263.bugfix.rst
pradyunsg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Present a better error message, when a ``file:`` URL is not found. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# test the error message returned by pip when | ||
# a bad "file:" URL is passed to it. | ||
|
||
from typing import Any | ||
|
||
|
||
def test_filenotfound_error_message(script: Any) -> None: | ||
# Test the error message returned when using a bad 'file:' URL. | ||
# make pip to fail and get an error message | ||
# by running "pip install -r file:nonexistent_file" | ||
proc = script.pip("install", "-r", "file:unexistent_file", expect_error=True) | ||
assert proc.returncode == 1 | ||
expect = ( | ||
"ERROR: 404 Client Error: FileNotFoundError for url: file:///unexistent_file" | ||
) | ||
assert proc.stderr.rstrip() == expect | ||
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.
Uh oh!
There was an error while loading. Please reload this page.