Skip to content
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

pip list --not-required --outdated should list only outdated packages… #6116

Merged
merged 2 commits into from
Jan 9, 2019

Conversation

peterlisak
Copy link
Contributor

This PR solves #5737. Filtering out of not-required packages should be done before getting outdated here:

if options.outdated:
packages = self.get_outdated(packages, options)
elif options.uptodate:
packages = self.get_uptodate(packages, options)
if options.not_required:
packages = self.get_not_required(packages, options)

Current behaviour, for example: Outdated package B is required by up-to-date package A. The list of outdated packages passed to self.get_not_required contains only package B. Therefore package B is not detected as the requirement of any other package in the list and therefore is not considered as dependency.

… that are not dependencies of installed packages
@peterlisak peterlisak force-pushed the bug-fix-outdated-not-required branch from dcccea6 to 4f35981 Compare January 6, 2019 09:05
@@ -384,6 +384,22 @@ def test_outdated_editables_columns_flag(script, data):
)


@pytest.mark.network
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are using --no-index option, this mark should not be necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -134,14 +134,14 @@ def run(self, options, args):
include_editables=options.include_editable,
)

if options.not_required:
packages = self.get_not_required(packages, options)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment explaining why this should stay before the other filter operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for comments. The explanation added.

@xavfernandez xavfernandez merged commit 4771470 into pypa:master Jan 9, 2019
@xavfernandez
Copy link
Member

Thanks for the PR 👍

@peterlisak peterlisak deleted the bug-fix-outdated-not-required branch January 10, 2019 07:42
@lock
Copy link

lock bot commented May 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants