-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Explicit support and tests for hg+file
scheme for pip install
.
#5955
Conversation
The linting jobs don't seem to be happy with these changes. :) |
How could |
I only see us using these schemes in a handful of places and it looks like, for editable installs, we split base on the To confirm, I ran pip under hunter like
before and after the change in this PR and can see virtually no difference in behavior between the two runs. |
pkg_path = _create_test_package(script, name='testpackage', vcs='hg') | ||
args = ['install', '-e', 'hg+%s#egg=testpackage' % path_to_url(pkg_path)] | ||
result = script.pip(*args, **{"expect_error": True}) | ||
result.assert_installed('testpackage', with_files=['.hg']) | ||
assert path_to_url(pkg_path).startswith("file://") |
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.
I would save this into a variable and use it in the construction of args
and in the assert
. It may also make more sense to move the assert
above the args
declaration. Normally we assert as close as possible to the place where something could've failed.
@@ -17,7 +17,9 @@ class Mercurial(VersionControl): | |||
name = 'hg' | |||
dirname = '.hg' | |||
repo_name = 'clone' | |||
schemes = ('hg', 'hg+http', 'hg+https', 'hg+ssh', 'hg+static-http') | |||
schemes = ( | |||
'hg', 'hg+http', 'hg+https', 'hg+ssh', 'hg+static-http', 'hg+file' |
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.
It looks like these where alphabetized before.
I still don't see an answer to the question I asked before. If this was already working before (without |
This should be added so that It currently works because we are pretty flexible when it comes to input URL parsing. In several places we just check if "+" is in the scheme to determine if something is a VCS URL, or split on |
Reworking #5935 to be more complete for #4358
The
hg+file
scheme was already functioning implicitly (with test coverage) but inconsistently documented. This change is to make the scheme support explicit, including tests and docs.