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

Implement --freeze-outdated-packages argument #98

Merged
merged 2 commits into from Nov 29, 2022
Merged

Implement --freeze-outdated-packages argument #98

merged 2 commits into from Nov 29, 2022

Conversation

hueseyincelik
Copy link

This adds a new argument --freeze-outdated-packages or -f for saving all outdated packages to a requirements.txt file before upgrading them.

When used in combination with --interactive or -i, only the selected packages are saved.

Resolves #97.

Copy link
Owner

@jgonggrijp jgonggrijp left a comment

Choose a reason for hiding this comment

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

Thank you for going out of your way to contribute, @hueseyincelik!

As I wrote before in #97, I feel that this way of keeping track of dependencies is probably a bit backwards, but I will still accept the pull request.

Your current implementation holds a subtle breaking change for people who have been forwarding pip's -f option through pip-review in their scripts. See comment below for some additional details. Please fix that; this is my only condition for acceptance.

pip_review/__main__.py Outdated Show resolved Hide resolved
@hueseyincelik
Copy link
Author

hueseyincelik commented Nov 27, 2022

Thanks for the quick reply!

Personally, I'm not the biggest fan of this way of tracking package versions either, but since it was trivial to implement, I see no reason not to give users the option.

@jgonggrijp
Copy link
Owner

In my opinion, "trivial to implement" by itself is not enough justification to do something; it should also be a good idea. In fact, when it is a good idea, it does not even need to be trivial. In any other project, I would probably reject this feature.

For this particular project, I make an exception. pip-review only continues to exist to cater to the people who still want to use it, which no longer includes myself. With hindsight, I agree with @nvie's decision to remove pip-review from pip-tools, so I think I should not impose a "laser focus" and instead let the democratic forces reign free.

@jgonggrijp jgonggrijp merged commit 5ac6d16 into jgonggrijp:develop Nov 29, 2022
@jgonggrijp
Copy link
Owner

Just published as version 1.3.0: https://pypi.org/project/pip-review/1.3.0/

@hueseyincelik hueseyincelik deleted the freeze-outdated-packages branch November 29, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option and/or interactive question to serialize current package versions to a requirements.txt
2 participants