From 6abc0e0bef432b03cca6361c119496dc7d97b717 Mon Sep 17 00:00:00 2001 From: Oz N Tiram Date: Sun, 4 Sep 2022 00:19:43 +0200 Subject: [PATCH] Deprecate the --three flag pipenv now uses python3 by default. --- news/5328.removal.rst | 1 + pipenv/cli/options.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 news/5328.removal.rst diff --git a/news/5328.removal.rst b/news/5328.removal.rst new file mode 100644 index 0000000000..d98725f42c --- /dev/null +++ b/news/5328.removal.rst @@ -0,0 +1 @@ +Add deprecation warning to the --three flag. Pipenv now uses python3 by default. diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index bd2196486b..c25388902c 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -11,6 +11,7 @@ echo, make_pass_decorator, option, + secho, ) from pipenv.vendor.click import types as click_types from pipenv.vendor.click_didyoumean import DYMMixin @@ -290,6 +291,11 @@ def three_option(f): def callback(ctx, param, value): state = ctx.ensure_object(State) if value is not None: + secho( + "WARNING: --three is deprecated! pipenv uses python3 by default", + err=True, + fg="yellow", + ) state.three = value return value @@ -297,7 +303,7 @@ def callback(ctx, param, value): "--three", is_flag=True, default=None, - help="Use Python 3 when creating virtualenv.", + help="Use Python 3 when creating virtualenv. Deprecated", callback=callback, expose_value=False, )(f)