Deprecate the --three flag

pipenv now uses python3 by default.
This commit is contained in:
Oz N Tiram
2022-09-04 00:19:43 +02:00
parent 7b9b1aeb1c
commit 822620bb30
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Add deprecation warning to the --three flag. Pipenv now uses python3 by default.
+7 -1
View File
@@ -11,6 +11,7 @@ from pipenv.vendor.click import (
echo,
make_pass_decorator,
option,
secho,
)
from pipenv.vendor.click import types as click_types
from pipenv.vendor.click_didyoumean import DYMMixin
@@ -309,6 +310,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
@@ -316,7 +322,7 @@ def three_option(f):
"--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)