From 3f231f2f7065806fa9cb40b90f2a8008191a47ba Mon Sep 17 00:00:00 2001 From: Denis Maciel Date: Mon, 9 Aug 2021 14:54:48 +0200 Subject: [PATCH] fix ValueError when unpacking (#2165) --- docs/changelog/2165.bugfix.rst | 1 + src/virtualenv/discovery/py_info.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/2165.bugfix.rst diff --git a/docs/changelog/2165.bugfix.rst b/docs/changelog/2165.bugfix.rst new file mode 100644 index 000000000..081bc3f34 --- /dev/null +++ b/docs/changelog/2165.bugfix.rst @@ -0,0 +1 @@ +Fix unpacking dictionary items in PythonInfo.install_path diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/discovery/py_info.py index 9b41d13fe..0de612814 100644 --- a/src/virtualenv/discovery/py_info.py +++ b/src/virtualenv/discovery/py_info.py @@ -122,7 +122,7 @@ def install_path(self, key): if result is None: # use sysconfig if distutils is unavailable # set prefixes to empty => result is relative from cwd prefixes = self.prefix, self.exec_prefix, self.base_prefix, self.base_exec_prefix - config_var = {k: "" if v in prefixes else v for k, v in self.sysconfig_vars} + config_var = {k: "" if v in prefixes else v for k, v in self.sysconfig_vars.items()} result = self.sysconfig_path(key, config_var=config_var).lstrip(os.sep) return result