-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Refactor and cleannup some cruft code around no_deps flag. #5164
Conversation
@@ -1459,7 +1457,7 @@ def pip_install( | |||
r=None, | |||
allow_global=False, | |||
ignore_hashes=False, | |||
no_deps=None, |
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.
Nothing that calls this ever passed anything other than True/False and the default behavior is False
-- meaning install all dependencies. Skipping dependency installs is the special case of True
being passed.
@@ -720,7 +720,6 @@ def batch_install( | |||
if sequential_deps is None: | |||
sequential_deps = [] | |||
failed = not retry | |||
install_deps = not no_deps |
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.
Essentially moving this to line 759 is what the original PR did that this replaces -- the reason why is because line 757 can override this for a specific artifact, but we should not use that flag for all iterations of the loop.
@@ -1503,14 +1501,6 @@ def pip_install( | |||
extra_indexes = list(project.sources) | |||
if requirement and requirement.vcs or requirement.editable: | |||
requirement.index = None | |||
# Install dependencies when a package is a non-editable VCS dependency. | |||
# Don't specify a source directory when using --system. | |||
if not requirement.editable and no_deps is not True: |
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.
The comment indicated this first block was due to really really old Pipfile.lock and no tests fail around this.
# Leave this off because old Pipfile.lock don't have all deps included | ||
# TODO: When can it be turned back on? | ||
no_deps = False | ||
elif requirement.editable and no_deps is None: |
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.
no_deps
was never actually None
.
The issue
Replacement PR for really old PR: #3985
The fix
Cleans up some impossible code paths and a logical bug where a flag gets overwritten once in a loop and then retries are caused.
The checklist
news/
directory to describe this fix with the extension.bugfix
,.feature
,.behavior
,.doc
..vendor
. or.trivial
(this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.