Skip to content

salt-pip should disable pip's periodic version check #70024

Closed

Description

@dwoz

salt-pip at salt/scripts.py:768 shells out to python -m pip <argv> without --disable-pip-version-check and without PIP_DISABLE_PIP_VERSION_CHECK=1 in _pip_environment. Every invocation therefore hits pip's periodic "A new release of pip is available" check — a network round-trip that is:

Proposal

In salt/scripts.py::_pip_environment add:

new_env.setdefault("PIP_DISABLE_PIP_VERSION_CHECK", "1")

Env-var form (vs --disable-pip-version-check on argv) keeps user-passed pip subcommands untouched and lets an operator still opt back in by exporting PIP_DISABLE_PIP_VERSION_CHECK=0 before invoking salt-pip.

No config option needed; the check has no legitimate purpose against a packaged-pinned pip in an onedir.

Scope

Applies to all supported branches (3006.x / 3007.x / 3008.x / master) — _pip_environment is unchanged across all four.

/cc @dwoz

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions