From 543dd1a6fe194bcf9dee16c23df280c97479f507 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sat, 17 Dec 2022 14:07:48 -0500 Subject: [PATCH 1/3] Deprecate --keep-outdated flag. --- pipenv/cli/options.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index 928c64deca..5040165376 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -13,6 +13,7 @@ option, secho, ) +from pipenv.vendor import click from pipenv.vendor.click import types as click_types from pipenv.vendor.click_didyoumean import DYMMixin @@ -156,6 +157,12 @@ def keep_outdated_option(f): def callback(ctx, param, value): state = ctx.ensure_object(State) state.installstate.keep_outdated = value + if value: + click.echo(click.style( + "Use of --keep-outdated has been deprecated for removal." + "The flag does not respect package resolver results and leads to inconsistent lock files. " + "Please pin relevant requirements in your Pipfile and discontinue use of this flag.", + fg="yellow", bold=True), err=True) return value return option( From 3c4a67a86a5572c5e05862c07923b24391181d33 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Mon, 19 Dec 2022 10:33:24 -0500 Subject: [PATCH 2/3] fix lint --- pipenv/cli/options.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index 5040165376..d1bdc8080e 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -2,6 +2,7 @@ from pipenv.project import Project from pipenv.utils.internet import is_valid_url +from pipenv.vendor import click from pipenv.vendor.click import ( BadArgumentUsage, BadParameter, @@ -13,7 +14,6 @@ option, secho, ) -from pipenv.vendor import click from pipenv.vendor.click import types as click_types from pipenv.vendor.click_didyoumean import DYMMixin @@ -158,11 +158,16 @@ def callback(ctx, param, value): state = ctx.ensure_object(State) state.installstate.keep_outdated = value if value: - click.echo(click.style( - "Use of --keep-outdated has been deprecated for removal." - "The flag does not respect package resolver results and leads to inconsistent lock files. " - "Please pin relevant requirements in your Pipfile and discontinue use of this flag.", - fg="yellow", bold=True), err=True) + click.echo( + click.style( + "Use of --keep-outdated has been deprecated for removal." + "The flag does not respect package resolver results and leads to inconsistent lock files. " + "Please pin relevant requirements in your Pipfile and discontinue use of this flag.", + fg="yellow", + bold=True, + ), + err=True, + ) return value return option( From 3ab2f73d4b8f3b1155e2a4ee69fa44a02223281c Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Tue, 20 Dec 2022 02:20:49 -0500 Subject: [PATCH 3/3] PR feedback. --- pipenv/cli/options.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index d1bdc8080e..55aed0c186 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -158,14 +158,12 @@ def callback(ctx, param, value): state = ctx.ensure_object(State) state.installstate.keep_outdated = value if value: - click.echo( - click.style( - "Use of --keep-outdated has been deprecated for removal." - "The flag does not respect package resolver results and leads to inconsistent lock files. " - "Please pin relevant requirements in your Pipfile and discontinue use of this flag.", - fg="yellow", - bold=True, - ), + click.secho( + "The flag --keep-outdated has been deprecated for removal." + "The flag does not respect package resolver results and leads to inconsistent lock files. " + "Please pin relevant requirements in your Pipfile and discontinue use of this flag.", + fg="yellow", + bold=True, err=True, ) return value