Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Avoid infinite recursions. #60

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion caniusepython3/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def blocking_dependencies(projects, py3_projects):
"""
log = logging.getLogger('ciu')
check = []
checked = set()
for project in projects:
dist = distlib.locators.locate(project)
if dist is None:
Expand All @@ -90,6 +91,7 @@ def blocking_dependencies(projects, py3_projects):
while len(check) > 0:
new_check = []
for parent, deps in zip(check, executor.map(dependencies, check)):
checked.add(parent)
if deps is None:
# Can't find any results for a project, so ignore it so as
# to not accidentally consider indefinitely that a project
Expand All @@ -100,6 +102,9 @@ def blocking_dependencies(projects, py3_projects):
if dep in py3_projects:
continue
reasons[dep] = parent
new_check.append(dep)
if dep not in checked:
new_check.append(dep)
else:
log.info('{0} already checked'.format(dep))
check = new_check
return reasons_to_paths(reasons)