Skip to content

Commit

Permalink
Actually apply fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsajip committed Jul 9, 2022
1 parent 0f4e0f9 commit efdda9c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions distlib/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ def provides(self):

def _get_requirements(self, req_attr):
md = self.metadata
logger.debug('Getting requirements from metadata %r', md.todict())
reqts = getattr(md, req_attr)
logger.debug('%s: got requirements %r from metadata: %r', self.name, req_attr,
reqts)
return set(md.get_requirements(reqts, extras=self.extras,
env=self.context))

Expand Down Expand Up @@ -1323,14 +1324,17 @@ def get_required_dists(dists, dist):

req = set() # required distributions
todo = graph.adjacency_list[dist] # list of nodes we should inspect
seen = set(t[0] for t in todo) # already added to todo

while todo:
d = todo.pop()[0]
req.add(d)
for pred in graph.adjacency_list[d]:
if pred not in req:
pred_list = graph.adjacency_list[d]
for pred in pred_list:
d = pred[0]
if d not in req and d not in seen:
seen.add(d)
todo.append(pred)

return req


Expand Down

0 comments on commit efdda9c

Please sign in to comment.