pipx - fixed bug in state=inject (#3611) (#3634)

* pipx - fixed bug in state=inject

* added changelog fragment

* copy/paste error in the integration test

* replaced injected package with simpler one

* testing force_lang = None

* disable UTF-8 emojis in pipx output

* better way to achieve the same outcome

* Adjsuted the changelog fragment

(cherry picked from commit 40ccd1501b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-10-30 08:30:13 +02:00 committed by GitHub
commit 6959847701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 1 deletions

View file

@ -176,6 +176,9 @@ class PipX(CmdStateModuleHelper):
_list=dict(fmt=('list', '--include-injected', '--json'), style=ArgFormat.BOOLEAN),
)
check_rc = True
run_command_fixed_options = dict(
environ_update={'USE_EMOJI': '0'}
)
def _retrieve_installed(self):
def process_list(rc, out, err):
@ -188,7 +191,7 @@ class PipX(CmdStateModuleHelper):
results[venv_name] = {
'version': venv['metadata']['main_package']['package_version'],
'injected': dict(
(k, v['package_version']) for k, v in venv['metadata']['injected_packages']
(k, v['package_version']) for k, v in venv['metadata']['injected_packages'].items()
),
}
return results