thoth.adviser.python.dependency_graph.walking package

Submodules

thoth.adviser.python.dependency_graph.walking.dependency_graph module

An adapter implementation for talking to libdependency_graph.so (C/C++ implementation of dependency graph).

exception thoth.adviser.python.dependency_graph.walking.dependency_graph.DependenciesCountOverflow[source]

Bases: thoth.adviser.python.dependency_graph.walking.dependency_graph.DependencyGraphWalkerException

An exception raised if number of dependencies cannot be processed due to overflow.

Based on internal representation of packages (fixed size unsigned integers).

class thoth.adviser.python.dependency_graph.walking.dependency_graph.DependencyGraph(direct_dependencies: List[Tuple[str, str, str]], paths: List[List[Tuple[str, str, str]]])[source]

Bases: object

Adapter for C implementation of dependency graph.

MAX_DEPENDENCIES_COUNT = 65534
STREAM_DELIMITER = 65534
STREAM_STOP = 65535
property stacks_estimated

Estimate number of software stacks we could end up with (the upper bound).

walk() → Generator[[List[Tuple[str, str, str]], None], None][source]

Generate a software stack by traversing the graph.

exception thoth.adviser.python.dependency_graph.walking.dependency_graph.DependencyGraphWalkerException[source]

Bases: Exception

A base class for dependency graph exception hierarchy.

exception thoth.adviser.python.dependency_graph.walking.dependency_graph.NoDependenciesError[source]

Bases: thoth.adviser.python.dependency_graph.walking.dependency_graph.DependencyGraphWalkerException

An exception raised if no direct dependencies were provided to dependency graph.

exception thoth.adviser.python.dependency_graph.walking.dependency_graph.PrematureStreamEndError[source]

Bases: thoth.adviser.python.dependency_graph.walking.dependency_graph.DependencyGraphWalkerException

An exception raised if the stack stream was closed prematurely.

This can happen for example due to OOM, which can kill stack producer. In that case we would like to report to user what we have computed so far.

Module contents

Interface to libdependencygraph.so.