From d948f63fe266d275f1f421dbc440b26c7933de70 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 27 Jul 2019 02:46:08 +0300 Subject: [PATCH 1/3] Document that `--ignore-installed` is dangerous --- src/pip/_internal/commands/install.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index 927e7817be2..7835606714f 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -187,7 +187,11 @@ def __init__(self, *args, **kw): '-I', '--ignore-installed', dest='ignore_installed', action='store_true', - help='Ignore the installed packages (reinstalling instead).') + help='Ignore the installed packages, overwriting them. ' + 'This can break your system if the existing package ' + 'is of a different version or was installed ' + 'with a different package manager!' + ) cmd_opts.add_option(cmdoptions.ignore_requires_python()) cmd_opts.add_option(cmdoptions.no_build_isolation()) From 125aae08efeb9097c48309599fbbe75dbb84dc87 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 27 Jul 2019 03:08:21 +0300 Subject: [PATCH 2/3] add a NEWS entry --- news/6794.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/6794.doc diff --git a/news/6794.doc b/news/6794.doc new file mode 100644 index 00000000000..55bc01404dd --- /dev/null +++ b/news/6794.doc @@ -0,0 +1 @@ +Document that ``--ignore-installed`` is dangerous. From 6c7d309a1cfb99b8a0ea463de028cf9cd7f9e28a Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 27 Jul 2019 03:19:11 +0300 Subject: [PATCH 3/3] fix flake8 violation --- src/pip/_internal/commands/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index 7835606714f..e7e16809646 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -191,7 +191,7 @@ def __init__(self, *args, **kw): 'This can break your system if the existing package ' 'is of a different version or was installed ' 'with a different package manager!' - ) + ) cmd_opts.add_option(cmdoptions.ignore_requires_python()) cmd_opts.add_option(cmdoptions.no_build_isolation())