diff --git a/news/7297.removal b/news/7297.removal new file mode 100644 index 00000000000..663fd9ad609 --- /dev/null +++ b/news/7297.removal @@ -0,0 +1 @@ +Deprecate undocumented ``--skip-requirements-regex`` option. diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py index dad08c24ea7..6b404954044 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -131,6 +131,17 @@ def _main(self, args): ) + message deprecated(message, replacement=None, gone_in=None) + if options.skip_requirements_regex: + deprecated( + "--skip-requirements-regex is unsupported and will be removed", + replacement=( + "manage requirements/constraints files explicitly, " + "possibly generating them from metadata" + ), + gone_in="20.1", + issue=7297, + ) + # TODO: Try to get these passing down from the command? # without resorting to os.environ to hold these. # This also affects isolated builds and it should.