-
Notifications
You must be signed in to change notification settings - Fork 23.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
pip module - editable now applies to all packages #78039
base: devel
Are you sure you want to change the base?
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
- 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. |
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.
- 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'], |
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.
Add a documentation note about this change.
if extra_args: | ||
cmd.extend(shlex.split(extra_args)) | ||
|
||
if name: | ||
cmd.extend(to_native(p) for p in packages) | ||
for p in packages: |
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.
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.
This branch needs a rebase. |
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. |
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
-e
flag was being passed when using requirements file with editable options on. This results in an error. To avoid having this error,requirements
andeditable
are now mutually exclusive.This is the error: