Avoid RecursionError for circular_dependencies // Resolve #4228

This commit is contained in:
Ivan Kravets
2022-04-15 14:17:21 +03:00
parent 8d63591ce8
commit eaff7f307c
2 changed files with 60 additions and 1 deletions
+7 -1
View File
@@ -76,6 +76,9 @@ class PackageManagerInstallMixin(object):
pkg = None
if pkg:
# avoid RecursionError for circular_dependencies
self._INSTALL_HISTORY[spec] = pkg
self.log.debug(
click.style(
"{name}@{version} is already installed".format(
@@ -112,9 +115,12 @@ class PackageManagerInstallMixin(object):
)
self.memcache_reset()
# avoid RecursionError for circular_dependencies
self._INSTALL_HISTORY[spec] = pkg
if not skip_dependencies:
self.install_dependencies(pkg)
self._INSTALL_HISTORY[spec] = pkg
return pkg
def install_dependencies(self, pkg, print_header=True):