From f9471d8e7e533bc71e00ca622609c15f4ffb2eab Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Tue, 7 Aug 2018 12:13:14 +0800 Subject: [PATCH 1/3] Fix Jinja2 mismatching --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 92110aa5d5..71c586449c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -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 From 1a5133c6f8457576a64b593c8ac577aba9771970 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Tue, 7 Aug 2018 12:14:35 +0800 Subject: [PATCH 2/3] Fix spaces in the warning message --- pipenv/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index db60ee941f..e84bafd560 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -550,8 +550,8 @@ def ensure_project( ): click.echo( "{0}: Your Pipfile requires {1} {2}, " - "but you are using {3} ({4}). Running" - "{5} and rebuilding the virtual environment" + "but you are using {3} ({4}). Running " + "{5} and rebuilding the virtual environment " "may resolve the issue".format( crayons.red("Warning", bold=True), crayons.normal("python_version", bold=True), From 908ad9d1bcb49eed20f6e439fd24f9c3a26db3c9 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Tue, 7 Aug 2018 12:21:49 +0800 Subject: [PATCH 3/3] Split the message into multiple lines --- pipenv/core.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index e84bafd560..31adf6998e 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -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, )