diff --git a/news/5872.bugfix.rst b/news/5872.bugfix.rst new file mode 100644 index 0000000000..94cffb2bf8 --- /dev/null +++ b/news/5872.bugfix.rst @@ -0,0 +1 @@ +Fix regression that caused printing non-printable ascii characters when help was called. diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py index 3fdac10920..5e7d88a721 100644 --- a/pipenv/cli/command.py +++ b/pipenv/cli/command.py @@ -189,7 +189,7 @@ def cli( # Check this again before exiting for empty ``pipenv`` command. elif ctx.invoked_subcommand is None: # Display help to user, if no commands were passed. - console.print(format_help(ctx.get_help())) + print(format_help(ctx.get_help())) @cli.command( diff --git a/pipenv/utils/funktools.py b/pipenv/utils/funktools.py index 4599445472..de5668b0ab 100644 --- a/pipenv/utils/funktools.py +++ b/pipenv/utils/funktools.py @@ -71,8 +71,7 @@ def unnest(elem: Iterable) -> Any: for el in target: if isinstance(el, Iterable) and not isinstance(el, str): el, el_copy = tee(el, 2) - for sub in unnest(el_copy): - yield sub + yield from unnest(el_copy) else: yield el