Skip to content
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

Improve docs for --root-user-action option #12066

Merged
merged 3 commits into from Mar 26, 2024

Conversation

Mr-Pepe
Copy link
Contributor

@Mr-Pepe Mr-Pepe commented Jun 1, 2023

#11201 was too verbose, so this change just adds a note to the warning message itself and shows allowed values for the option when using pip install --help. The warning message now contains all information from the proposed alternative in the rejected PR but is easier to discover.

Closes #11179.

@pfmoore
Copy link
Member

pfmoore commented Jun 1, 2023

I'm not actually sure we want to make the option more discoverable. After all, we strongly recommend not using it, so it seems perfectly reasonable to me to require anyone who wants this option to have to do a bit of research to discover it. This isn't just "security by obscurity" - the hope is that by doing the research, the user will be exposed to the arguments against what they are trying to do and discussions of alternative approaches.

@Mr-Pepe
Copy link
Contributor Author

Mr-Pepe commented Jun 1, 2023

I see where you are coming from but doing a quick search of "pip as root user" yields this as the first result, with the most upvoted answer just saying to use --root-user-action. I personally think it's okay to let the user know that they are doing something risky (like sudo giving the "With great power comes great responsibility" lecture on first usage) but also give them clear instructions for when they know what they are doing. Maybe pip's warning could be clearer about the consequences of "conflicting behavior with the system package manager", which is basically "you might brick your system". If someone takes that risk without doing basic research first, they'd probably also just use the first answer on Stackoverflow.

@Mr-Pepe Mr-Pepe force-pushed the docs/improve-root-user-action-docs branch from 9b952ab to d7ec820 Compare July 20, 2023 06:03
@Mr-Pepe
Copy link
Contributor Author

Mr-Pepe commented Jul 20, 2023

Trying to unblock this PR. Feel free to close it if the proposed changes are fundamentally not desired.

@Mr-Pepe Mr-Pepe force-pushed the docs/improve-root-user-action-docs branch from 3b481f3 to 234c4c8 Compare August 23, 2023 03:13
@Mr-Pepe
Copy link
Contributor Author

Mr-Pepe commented Aug 23, 2023

Python 3.9 on MacOS failed but I don't know how what I did could have triggered that and I don't have a MacBook to reproduce the error locally. Is that test flaky? Please let me know if there is anything I can do.

@uranusjr
Copy link
Member

I reran and it fixed itself. Just a hiccup in CI, it seems.

@Mr-Pepe
Copy link
Contributor Author

Mr-Pepe commented Oct 18, 2023

Just curious, what's missing to get this merged and out of my list of open pull requests? 😋

@Mr-Pepe Mr-Pepe force-pushed the docs/improve-root-user-action-docs branch from d50d864 to 27042f9 Compare January 31, 2024 12:43
@Mr-Pepe
Copy link
Contributor Author

Mr-Pepe commented Jan 31, 2024

I have rebased the branch one last time and will close this PR at some point in a few weeks if nothing happens.

@uranusjr uranusjr merged commit 0a6662e into pypa:main Mar 26, 2024
26 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better document --root-user-action
4 participants