From 8124d10cfaceafd21774ca9257e031330b135c55 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Sun, 23 Dec 2018 08:37:45 +0200 Subject: [PATCH 1/5] Prevent a crash in version check error message Fixes #3407 --- pipenv/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/core.py b/pipenv/core.py index 4fb7939e..24e94443 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -566,7 +566,7 @@ def ensure_project( 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.blue(python_version(path_to_python) or "unknown"), crayons.green(shorten_path(path_to_python)), ), err=True, From 04a10c87dc70d571bd042b69d1d0d4a12259a65d Mon Sep 17 00:00:00 2001 From: David Beitey Date: Tue, 12 Feb 2019 12:50:15 +1000 Subject: [PATCH 2/5] Ensure docs show nav on small-screen devices Fixes #3527 --- docs/_templates/hacks.html | 1 - news/3527.doc.rst | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 news/3527.doc.rst diff --git a/docs/_templates/hacks.html b/docs/_templates/hacks.html index 0ec542fa..9736d409 100644 --- a/docs/_templates/hacks.html +++ b/docs/_templates/hacks.html @@ -18,7 +18,6 @@ /* Remain Responsive! */ @media screen and (max-width: 1008px) { - div.sphinxsidebar {display: none;} div.document {width: 100%!important;} /* Have code blocks escape the document right-margin. */ diff --git a/news/3527.doc.rst b/news/3527.doc.rst new file mode 100644 index 00000000..b6043a08 --- /dev/null +++ b/news/3527.doc.rst @@ -0,0 +1 @@ +Ensure docs show navigation on small-screen devices From 35b2101770daa21b12f37768d03dc08ab85be443 Mon Sep 17 00:00:00 2001 From: Cologler <10906962+Cologler@users.noreply.github.com> Date: Mon, 20 May 2019 18:45:28 +0800 Subject: [PATCH 3/5] Update core.py #3694 --- pipenv/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pipenv/core.py b/pipenv/core.py index 7f04ac49..425c784a 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -1775,6 +1775,13 @@ def ensure_lockfile(keep_outdated=False, pypi_mirror=None): def do_py(system=False): + if not project.virtualenv_exists: + click.echo( + crayons.red("location not created nor specified"), + err=True, + ) + return + try: click.echo(which("python", allow_global=system)) except AttributeError: From a3556e9d7fa4cfad4013d022efa8d33e9026cd05 Mon Sep 17 00:00:00 2001 From: Cologler <10906962+Cologler@users.noreply.github.com> Date: Mon, 20 May 2019 22:40:16 +0800 Subject: [PATCH 4/5] Update core.py --- pipenv/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pipenv/core.py b/pipenv/core.py index 425c784a..2ba8af7f 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -1777,7 +1777,11 @@ def ensure_lockfile(keep_outdated=False, pypi_mirror=None): def do_py(system=False): if not project.virtualenv_exists: click.echo( - crayons.red("location not created nor specified"), + "{}({}){}".format( + crayons.red("No virtualenv has been created for this project "), + crayons.white(project.project_directory, bold=True), + crayons.red(" yet!") + ), err=True, ) return From 78029a6d134683e79275255b4acc7c9c9db93a7b Mon Sep 17 00:00:00 2001 From: frostming Date: Mon, 27 May 2019 08:53:51 +0800 Subject: [PATCH 5/5] news entry --- news/3753.trivial.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/3753.trivial.rst diff --git a/news/3753.trivial.rst b/news/3753.trivial.rst new file mode 100644 index 00000000..2ab71d38 --- /dev/null +++ b/news/3753.trivial.rst @@ -0,0 +1 @@ +Improve the error message of ``pipenv --py`` when virtualenv can't be found.