-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow non lowercase extras #4901
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
Changes from all commits
d6c806a
7aa42fd
61bf856
e51b13f
31f947a
7d3b57b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix bug that prevents pip from installing extras with names containing upper-case letters. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import sys | ||
import textwrap | ||
from os.path import join | ||
|
||
|
@@ -126,3 +127,22 @@ def test_install_special_extra(script): | |
assert ( | ||
"Could not find a version that satisfies the requirement missing_pkg" | ||
) in result.stderr, str(result) | ||
|
||
|
||
@pytest.mark.skipif(sys.version_info < (3, 0), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this test dependant on Py3? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really like having a test that:
I'd rather we tested this using an artificially-constructed example that we ship with the test suite, so we can control it better. |
||
reason="requires Python3") | ||
@pytest.mark.network | ||
def test_extras_with_mixed_case_name(script): | ||
""" | ||
Test installing a package | ||
""" | ||
extra_name = 'reST' | ||
dependency_with_extra = 'django-rest-swagger[{}]==0.3.10'.format( | ||
extra_name | ||
) | ||
result = script.pip( | ||
'install', dependency_with_extra, expect_stderr=True, | ||
) | ||
template = """markers 'extra == "{}"' don't match your environment""" | ||
error_message = template.format(extra_name) | ||
assert error_message not in result.stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really make sense to me. It seems to just be hiding an error rather than fixing it. The comment seems to be trying to justify doing so, but "in certain situations" doesn't exactly sound like we know what's going on here :-(