Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the --three flag #5328

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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