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

Rework the functionality of PIP_CONFIG_FILE #11850

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

dalebrydon
Copy link
Contributor

Fixes #11815. Properly document that PIP_CONFIG_FILE will override all other config files. Also make a minor modification and documentation change to iter_config_files to have the order match the override order.

I also documented the fact that setting PIP_CONFIG_FILE prevents the user config file from being loaded. This feels like very weird behaviour to me, but has probably existed for too long to change at this point.

@@ -29,11 +29,15 @@ pip has 4 "levels" of configuration files:
- `base` : per-base environment configuration file, shared across all virtualenvs with the same base. (available since pip 23.0)
- `site`: per-environment configuration file; i.e. per-virtualenv.

Additionally, environment variables can be specified which will override any of the above.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely also need to mention command line arguments also override configs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK to move that section around, if people think that's too late in the file.

@pradyunsg pradyunsg changed the title Fix documentation of PIP_CONFIG_FILE Rework the functionality of PIP_CONFIG_FILE Jul 2, 2023
Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming the PR is rebased. I retitled the PR, but I don't fully know if that's the best title for this. :)

@dalebrydon
Copy link
Contributor Author

pre-commit.ci autofix

@dalebrydon dalebrydon force-pushed the bugfix/11815-correct-docs-for-env-var branch from 2142220 to 8879dc4 Compare July 8, 2023 14:57
@dalebrydon
Copy link
Contributor Author

Is there anything else I need to do for this?

@dalebrydon dalebrydon force-pushed the bugfix/11815-correct-docs-for-env-var branch from 8879dc4 to 87878a8 Compare July 24, 2023 01:47
@dalebrydon dalebrydon force-pushed the bugfix/11815-correct-docs-for-env-var branch from 87878a8 to 08c973b Compare August 3, 2023 15:09
dalebrydon and others added 3 commits October 27, 2023 07:13
Also ensure iter_config_files behaves consistently with OVERRIDE_ORDER
@dalebrydon dalebrydon force-pushed the bugfix/11815-correct-docs-for-env-var branch from 207bef1 to 662246a Compare October 27, 2023 11:13
@pradyunsg pradyunsg merged commit fd77ebf into pypa:main Oct 27, 2023
26 checks passed
@pradyunsg
Copy link
Member

Thanks @dalebrydon, both for working on this and being patient & accomodating here! ^.^

fridex pushed a commit to fridex/pip that referenced this pull request Nov 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PIP_CONFIG_FILE overrides other configs in conflict with documentation
3 participants