From 9697688ca45ccebc66726bef585eeba147886396 Mon Sep 17 00:00:00 2001 From: Richard Si Date: Tue, 7 May 2024 21:11:11 -0400 Subject: [PATCH] Disable self version check in PEP 517 pip subprocesses This eliminates a (very) small unnecessary performance penalty and reduces output clutter when the pip subprocess errors out. --- news/12683.feature.rst | 2 ++ src/pip/_internal/build_env.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 news/12683.feature.rst diff --git a/news/12683.feature.rst b/news/12683.feature.rst new file mode 100644 index 00000000000..2e949cd0762 --- /dev/null +++ b/news/12683.feature.rst @@ -0,0 +1,2 @@ +Disable pip's self version check when invoking a pip subprocess to install +PEP 517 build requirements. diff --git a/src/pip/_internal/build_env.py b/src/pip/_internal/build_env.py index 838de86474f..5cb903fa531 100644 --- a/src/pip/_internal/build_env.py +++ b/src/pip/_internal/build_env.py @@ -241,6 +241,7 @@ def _install_requirements( "--prefix", prefix.path, "--no-warn-script-location", + "--disable-pip-version-check", ] if logger.getEffectiveLevel() <= logging.DEBUG: args.append("-vv")