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

Reimplement pip-review on top of pip list --outdated #32

Closed
jgonggrijp opened this issue Jan 15, 2017 · 8 comments
Closed

Reimplement pip-review on top of pip list --outdated #32

jgonggrijp opened this issue Jan 15, 2017 · 8 comments

Comments

@jgonggrijp
Copy link
Owner

jgonggrijp commented Jan 15, 2017

Instead of using pip freeze to get a list of installed packages and then running custom code to fetch the latest version from pypi.python.org, simply call pip list --outdated to get all the necessary information at once. Forward arguments like --pre, --local and --user directly to the call to pip list --outdated.

Will allow us to replace the load_pkg_info, guess_pkg_name, get_pkg_info, latest_version, get_latest_versions and get_installed_pkgs by a single short function that does the call to pip list --outdated.

Will resolve #6, #18, #21 and #27 at once.

After this change, pip-review will formally depend on pip>=1.3. This is the first version of pip that shipped with the list subcommand and the corresponding --outdated option.

@bilelmoussaoui
Copy link

I've fixed #32 #6 #18 and #21, should i open separate PR or just one is enough ?
It need some testing :)

@jgonggrijp
Copy link
Owner Author

That's great! I think one pull request is sufficient, because (I believe) all these issues are tightly coupled.

Please be prepared for some review rounds before it gets accepted. This is something I want to get right from the first moment and I happen to be opinionated on the matter. I should emphasize that I'm glad you took up on this, though. ;-)

@jgonggrijp jgonggrijp changed the title Use pip list -o under the hood Reimplement pip-review on top of pip list --outdated Jan 22, 2017
@jgonggrijp
Copy link
Owner Author

Updated the title and the opening post because of #41.

@ghost
Copy link

ghost commented Jan 23, 2017

Not going to do this myself, but this should be trivial with the --format option:

pip list --outdated --format=freeze

@ghost
Copy link

ghost commented Jan 23, 2017

And then I read the PR and find out that --format is too new.

@jgonggrijp
Copy link
Owner Author

It's complicated.

jgonggrijp added a commit that referenced this issue Jan 23, 2017
This state of the codebase depends on #32 and #41 and
everything that is linked from those tickets. When we don't
depend on `pip freeze` anymore, this branch can be merged
and testing will finally be enabled for Python 3.
@jgonggrijp
Copy link
Owner Author

New related PR: #53.

@jgonggrijp
Copy link
Owner Author

Closed in version 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants