-
Notifications
You must be signed in to change notification settings - Fork 414
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
Support pip_args for shared_libs-enabled virtual environments #1256
Conversation
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.
That was quick! I generally agree with the behaviour change. You'll need to create a functional test for the behaviour.
cc @Gitznik |
Could you help me with some pointers for that ? I don't know how to properly test that we actually forwarded the correct pip-args all the way down |
You could parse the verbose output? |
Thanks: I added a test If the general principle is OK for you, I can work on adding the same concept to other affected pipx commands
Let me know if that fits your expectations, or if you have further advice for me |
Mmm my test methodology stops working at soon as multiple tests are executed. It looks like the shared libs mecanism is shared across tests ? If you have any advice on this that'd be helpful, on my side I'll keep on experimenting |
Thanks for the ping. I don't mind this change. Is there any clear benefit of upgrading shared packages unless you want to use them (e.g. install, ...)? If the |
Hey - getting back after a brief gap. I'm still up to carry this change and get to a change that would satisfy pipx team. I've seen you added the 'awaiting response' badge so I guess there is a misunderstanding - I was myself waiting for answers from you ^^ To clarify and unblock the discussion:
|
Let's make it so, then. |
Thanks for the clarifications, I reworked on this to polish it skip-maintenance CLI argument
tests |
I don't think we have to dive deeper into deprecation warnings, as #1278 plans to introduce a global flag for |
58b7fa6
to
918b1d9
Compare
I'm having trouble making the tests on windows pass - to be fully honest I don't understand the root cause of why this platform behaves differently from ubuntu+macOs (but hey, windows...), but it seems I've found a way for it to work by changing |
We've all been there
You can also enable workflows on your fork so you don't have to wait for us approving each run :) |
Hey there, first of all, thanks for this fix and great conversation so far! As I am waiting for this PR to be closed in order to start working on #1278, I would like to kindly ask when I may expect the merge? :) |
@chrysle , @Arpafaucon I actually don't think there's anything missing? |
28b0213
to
9d82bfe
Compare
AFAIK not on my side, I'm ready for merge if you guys are. There are 2 points by @chrysle waiting to be resolved
|
I added a comment on the general issue at #1256 (comment). This LGTM now, thanks for the work you invested into this piece! |
changelog.d/
(if the patch affects the end users)Summary of changes
Fix #964
My diagnostic of the issue is:
shared_libs
feature creates a verification task at eachVenv
instance creation that checks if shared libraries should be updatedpip
commands, and if so, we'd like to have it respect user-providedpip_args
optionsVenv
instances are created in a context where the user does not expect pip to run. An example of this is Option for thelist
command not to go out to the internet #1081list
command createsVenv
instances, those run the shared_lib verificationlist
CLI options do not enable--pip_args
(and IMHO even if it did, users would not expect those here)Change summary
Venv. check_upgrade_shared_libs
pip install/upgrade
operations (we can identify these because we havepip_args
available), just after theVenv
instance creationpipx list
, so--skip-maintenance
is a no-opTest plan
Tested as part of the main test suite. Added tests
test_install.py::test_pip_args_forwarded_to_shared_libs
test_reinstall_all.py::test_reinstall_all_triggers_shared_libs_upgrade
test_run.py::test_pip_args_forwarded_to_shared_libs
test_list.py
, renamedtest_skip_maintenance
->test_list_does_not_trigger_maintenance