-
-
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
Lock requirements enhancement #972
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@erinxocon I think with
--dev
it includes also normal packages? Should change this text to "Include dev packages into requirements.txt output"? Now it makes one think that only dev packages will be outputted.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.
Hmm, I think my assumption is wrong, as you wrote:
Ok, then the help text is according to this specification.
Apparently it's impossible to create such requirements.txt files now, that would include both standard and dev packages. I don't have use case for that, so I think it's ok. Someone else might want that, though.
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 current functionality separates them.
--dev
does only development dependencies, and-r
only does anything listed under the default section! Is this not what was needed?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 the all packages is needed I can add it at a later time!
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.
Indeed, this change should fulfill my needs. Thanks :)
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.
In this case is that the wanted use case though? I'll let my fellow contributors put in their 2 cents!
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.
So to clarify, I needed
requirements.txt
file that excludes dev packages. After the change you've made here, I can do that withpipenv lock -r
as you've instructed. So yeah, my use is now supported.I have no opinion if
pipenv lock -r -d
should include only dev packages or also dev packages. I personally have no use case for neither. I was just pointing out that there's now slight inconsistency in API, compared toinstall
andupdate
. So you might want to consider changing--dev
behavior here accordingly.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.
I appreciate the input @tuukkamustonen! A very keen eye on the api discrepancies!
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.
It seems
--dev
inpipenv lock -r --dev
should be consistent withpipenv install --dev
andpipenv update --dev
indeed. In the future, if there's a need, additonal flag like--only-dev
could be added topipenv lock -r
.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.
I just came here to post a bug stating that
lock -r -d
only outputs dev dependencies. In isolation, I don't think there's anything inherently wrong with the current behavior, but the fact thatlock -d
is inconsistent withinstall -d
andupdate -d
makes it seem like a bug. Not only that, but if I runpipenv lock -h
, the help text for--dev
says "Install both develop and default packages.", further adding to the confusion.