From a6cd8e47f7f30499e0299fe2ca19bd4e2e178013 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Wed, 10 Jul 2024 23:08:48 -0700 Subject: [PATCH] Ignore `--require-virtualenv` for `check` and `freeze` commands --- news/12842.feature.rst | 1 + src/pip/_internal/commands/check.py | 1 + src/pip/_internal/commands/freeze.py | 1 + 3 files changed, 3 insertions(+) create mode 100644 news/12842.feature.rst diff --git a/news/12842.feature.rst b/news/12842.feature.rst new file mode 100644 index 00000000000..60ebc3245f2 --- /dev/null +++ b/news/12842.feature.rst @@ -0,0 +1 @@ +Ignore ``--require-virtualenv`` for ``pip check`` and ``pip freeze`` diff --git a/src/pip/_internal/commands/check.py b/src/pip/_internal/commands/check.py index 584df9f55c5..4a0297edd97 100644 --- a/src/pip/_internal/commands/check.py +++ b/src/pip/_internal/commands/check.py @@ -16,6 +16,7 @@ class CheckCommand(Command): """Verify installed packages have compatible dependencies.""" + ignore_require_venv = True usage = """ %prog [options]""" diff --git a/src/pip/_internal/commands/freeze.py b/src/pip/_internal/commands/freeze.py index fd9d88a8b01..885fdfeb83b 100644 --- a/src/pip/_internal/commands/freeze.py +++ b/src/pip/_internal/commands/freeze.py @@ -29,6 +29,7 @@ class FreezeCommand(Command): packages are listed in a case-insensitive sorted order. """ + ignore_require_venv = True usage = """ %prog [options]""" log_streams = ("ext://sys.stderr", "ext://sys.stderr")