-
-
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
Full implementation of --keep-outdated
#3304
Conversation
- Fixes #3244 Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
This is an exciting feature. If this can be merged, let's update docs reflecting the changes and we also should add tests. :D |
It looks like it is full support for
This does not work perfectly for I think probably it is better to add one more step for |
That sounds like maybe we want it for |
If I understand correclty, one more thing with such kind of design is that |
It's not documented because it's not implemented, the documentation is outlined in the discussion linked in the PEEP. The only additional element I am adding in this PEEP is that It is possible we should think of another flag to use to say "I don't mind updating the dependencies I have, but don't remove anything if it's in my lockfile". I'm not totally sure what that flag would be. |
…nto feature/keep-outdated-peep
Signed-off-by: Dan Ryan <[email protected]>
This looks good to me, so the main things would be test and documentation updates. |
Signed-off-by: Dan Ryan <[email protected]>
- Bring in changes from bugfix/3148 Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
- Lost numerous changes in the rebase, this brings them back - Should work for both sets of fixes now Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
/cc @ncoghlan on the tests |
--keep-outdated
--keep-outdated
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.
Yep, those new tests look good to me - good idea to check the behaviour when the Pipfile
change is to remove a pin rather than adding a new dependency.
peeps/PEEP-005.md
Outdated
|
||
## Necessary Changes | ||
|
||
In order to make these changes, we will need to modify the dependency resolution process. Overall, locking will require the following implementaiton changes: |
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.
Typo in "implementaiton"
pipenv/core.py
Outdated
if dep.is_vcs or dep.editable: | ||
c.block() | ||
# if dep.is_vcs or dep.editable: | ||
# c.block() |
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.
If this genuinely isn't needed any more, better to just delete it than comment it out
@@ -92,6 +93,55 @@ def test_lock_keep_outdated(PipenvInstance, pypi): | |||
assert lock['default']['pytest']['version'] == "==3.1.0" | |||
|
|||
|
|||
@pytest.mark.keep_outdated | |||
@pytest.mark.lock |
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.
Minor cosmetic thing: since the order to the marks doesn't matter, shorter-first looks tidier.
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Signed-off-by: Dan Ryan <[email protected]>
Pin removal is one of the things I added a test for at the end: check out pipenv/tests/integration/test_lock.py Lines 129 to 139 in 0b5826e
Is that what you had in mind? |
@techalchemy Sorry, I was overly terse in my review summary, which made it ambiguous - it was meant to mean "that was a good idea to ..." (i.e. praising the inclusion of that particular test, since it covered a case that hadn't occurred to me), but could be read as "it would be a good idea to ..." (which would have meant that I had missed the fact that the test was already part of the PR). |
hah, no worries, thanks for the reviews! |
@uranusjr @ncoghlan my only concern here is that the command now does too much from a design standpoint -- as a user of the tool myself, I personally would want to separate the functionality because as it stands
I'll probably merge this as is for release but I want to continue thinking about splitting this up |
nice work on this @techalchemy! do you know when the next release for pipenv is planned? would love to try this feature out :) |
Introduces both a PEEP and a fully functional implementation of most features discussed
005
in case of merges ahead of this one--keep-outdated
behavior and provides a full working implementation