Merge pull request #2712 from pypa/bugfix/python-version-warning

Bugfix/python version warning
This commit is contained in:
Dan Ryan
2018-08-10 04:53:01 -04:00
committed by GitHub
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ docutils==0.14
first==2.0.1
idna==2.6
imagesize==0.7.1
Jinja2==2.9.6
Jinja2==2.10
MarkupSafe==1.0
pbr==3.1.1
pip-tools==1.9.0
+8 -4
View File
@@ -550,15 +550,19 @@ def ensure_project(
):
click.echo(
"{0}: Your Pipfile requires {1} {2}, "
"but you are using {3} ({4}). Running"
"{5} and rebuilding the virtual environment"
"may resolve the issue".format(
"but you are using {3} ({4}).".format(
crayons.red("Warning", bold=True),
crayons.normal("python_version", bold=True),
crayons.blue(project.required_python_version),
crayons.blue(python_version(path_to_python)),
crayons.green(shorten_path(path_to_python)),
crayons.green("`pipenv --rm`"),
),
err=True,
)
click.echo(
" {0} and rebuilding the virtual environment "
"may resolve the issue.".format(
crayons.green("$ pipenv --rm"),
),
err=True,
)