From 1e60aed30ff55cd409dc012ecf799e07094d1e26 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Wed, 30 Nov 2022 09:46:50 +0100 Subject: [PATCH] core: fix bug introduced with rich.console The status object isn't callable. Instead one should use the update method, or the print method of the console object. --- pipenv/core.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index eec11a80c0..af1e79255e 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -405,8 +405,9 @@ def abort(msg=""): click.style("...", bold=True), ) ) - # TOOD: pass project settings to console.status - with console.status("Installing python...") as st: + with console.status( + "Installing python...", spinner=project.s.PIPENV_SPINNER + ): try: c = installer.install(version) except InstallerError as e: @@ -416,7 +417,9 @@ def abort(msg=""): click.echo(fix_utf8("Something went wrong..."), err=True) click.secho(e.err, fg="cyan", err=True) else: - st(environments.PIPENV_SPINNER_OK_TEXT.format("Success!")) + console.print( + environments.PIPENV_SPINNER_OK_TEXT.format("Success!") + ) # Print the results, in a beautiful blue... click.secho(c.stdout, fg="cyan", err=True) # Clear the pythonfinder caches