pip module - editable now applies to all packages#78039
Closed
nirmal-j-patel wants to merge 1 commit intoansible:develfrom
Closed
pip module - editable now applies to all packages#78039nirmal-j-patel wants to merge 1 commit intoansible:develfrom
nirmal-j-patel wants to merge 1 commit intoansible:develfrom
Conversation
When editable is set to true, -e flag should be passed to all packages. This change passes -e flag before each package name. However, if a requirements file is used, then editable flag raises errors. Therefore, editable and requirements are now mutually exclusive. Fixes ansible#77755 Signed-off-by: Nirmal Patel <nirmal@nirmal.dev>
da338a1 to
bb12409
Compare
Akasurde
requested changes
Sep 1, 2023
Comment on lines
+2
to
+4
| - pip - when editable set to true, '-e' flag is passed before each package. | ||
| When requirments file is used, editable flag does not pass '-e' to avoid | ||
| errors. |
Member
There was a problem hiding this comment.
Suggested change
| - pip - when editable set to true, '-e' flag is passed before each package. | |
| When requirments file is used, editable flag does not pass '-e' to avoid | |
| errors. | |
| - pip - when editable is set to true, '-e' flag is passed before each package. | |
| When the requirements file is used, the editable flag does not pass '-e' to avoid | |
| errors. |
| mutually_exclusive=[ | ||
| ['name', 'requirements'], | ||
| ['executable', 'virtualenv'], | ||
| ['editable', 'requirements'], |
Member
There was a problem hiding this comment.
Add a documentation note about this change.
|
|
||
| if name: | ||
| cmd.extend(to_native(p) for p in packages) | ||
| for p in packages: |
Member
There was a problem hiding this comment.
Please create a changelog fragment. See this fragment as an example. Also, add tests for this change.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
This branch needs a rebase. |
Author
|
Apologies for the delay. I'm the next few days, I will rebase this branch and add a test case. I believe I don't need to add a new change log fragment because I already added one. Please correct me if I am wrong. |
Contributor
|
@nirmal-j-patel Any plans to finish polishing this up? |
Member
|
superseded by #86732 |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
SUMMARY
When editable is set to true, -e flag should be passed to all packages. This change passes -e flag before each package name. However, if a requirements file is used, then editable flag raises errors. Therefore, editable and requirements are now mutually exclusive.
Fixes #77755
ISSUE TYPE
ADDITIONAL INFORMATION
While fixing the bug, I noticed that
-eflag was being passed when using requirements file with editable options on. This results in an error. To avoid having this error,requirementsandeditableare now mutually exclusive.This is the error: