Skip to content

Document the environment variables which influence pip's behaviour #8044

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

Closed
wimglenn opened this issue Apr 14, 2020 · 5 comments · Fixed by #12576
Closed

Document the environment variables which influence pip's behaviour #8044

wimglenn opened this issue Apr 14, 2020 · 5 comments · Fixed by #12576
Labels
good first issue A good item for first time contributors to work on state: awaiting PR Feature discussed, PR is needed type: docs Documentation related type: enhancement Improvements to functionality

Comments

@wimglenn
Copy link
Contributor

wimglenn commented Apr 14, 2020

The Python docs detail exactly what environment variables are usable and how they influence python's behavior: https://docs.python.org/3/using/cmdline.html?highlight=pythonpath#environment-variables

A similar section for pip's docs would be very helpful. The environment configuration section is not as useful: https://pip.pypa.io/en/stable/user_guide/#environment-variables

It just says to use PIP_<UPPER_LONG_NAME> but it's pretty much guesswork what UPPER_LONG_NAME are possible here, if you don't already have good familiarity with all the options and subcommands of the CLI.

The docs then go on to give an example of export PIP_DEFAULT_TIMEOUT=60 being equivalent to pip --default-timeout=60, but nothing in pip --help mentions --default-timeout (and the configuration section itself seems to be the only docs reference about it), so how would a user discover that in the first place?

@ghost ghost added the S: needs triage Issues/PRs that need to be triaged label Apr 14, 2020
@pradyunsg pradyunsg added state: needs discussion This needs some more discussion type: docs Documentation related labels Apr 14, 2020
@ghost ghost removed S: needs triage Issues/PRs that need to be triaged labels Apr 14, 2020
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label Apr 14, 2020
@pralkarz
Copy link
Contributor

Is there a way to dynamically alter that section so it gets updated based on the # options # section?

###########
# options #
###########

I'd tackle this issue, but it would be a waste of time to type it out manually if a more optimal solution was available, so I'm open to any advice! 😄

@uranusjr
Copy link
Member

uranusjr commented Sep 23, 2021

There is always a way with Sphinx plugins. Whether it’s easy or not, is another question (that I don’t know the answer of).

@pradyunsg pradyunsg added type: enhancement Improvements to functionality and removed S: needs triage Issues/PRs that need to be triaged state: needs discussion This needs some more discussion labels Sep 24, 2021
@pradyunsg
Copy link
Member

We have a bunch of logic already, for preventing such duplication with Sphinx plugins. See:

class PipCommandOptions(PipOptions):

This is worth exploring, but as @uranusjr said -- it's not easy to know whether this is worth doing yet.

@pralkarz
Copy link
Contributor

pralkarz commented Sep 24, 2021

All right, then I'm going to wait until there's a consensus whether this is worth implementing or not. Another solution would be to simply link the documentation page for pip's command line options along with the current explanation on the feature, however there are separate URLs for every command, so that might not be suitable/optimal.

@abe-101
Copy link

abe-101 commented Apr 8, 2022

The docs then go on to give an example of export PIP_DEFAULT_TIMEOUT=60 being equivalent to pip --default-timeout=60, but nothing in pip --help mentions --default-timeout (and the configuration section itself seems to be the only docs reference about it), so how would a user discover that in the first place?

Is it possible that is a mistake in the documentation and it is meant to be "export PIP_TIMEOUT=60 being equivalent to pip --timeout=60"?

There seems to be a pull request fixing this #9697

@pradyunsg pradyunsg added the state: awaiting PR Feature discussed, PR is needed label Sep 1, 2022
@pradyunsg pradyunsg added the good first issue A good item for first time contributors to work on label Apr 22, 2023
ctg123 added a commit to ctg123/pip that referenced this issue Apr 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue A good item for first time contributors to work on state: awaiting PR Feature discussed, PR is needed type: docs Documentation related type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants