Skip to content

Commit

Permalink
Deprecate the --three flag
Browse files Browse the repository at this point in the history
pipenv now uses python3 by default.
  • Loading branch information
oz123 committed Sep 5, 2022
1 parent 80222bc commit 6abc0e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/5328.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add deprecation warning to the --three flag. Pipenv now uses python3 by default.
8 changes: 7 additions & 1 deletion pipenv/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -290,14 +291,19 @@ 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

return option(
"--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)
Expand Down

0 comments on commit 6abc0e0

Please sign in to comment.