thoth.solver package

Submodules

thoth.solver.cli module

Thoth-solver CLI.

thoth.solver.exceptions module

Exception hierarchy used in thoth-solver.

exception thoth.solver.exceptions.NoReleasesFound[source]

Bases: thoth.solver.exceptions.SolverException

Exception raised if no releases were found for the given package.

exception thoth.solver.exceptions.SolverException[source]

Bases: Exception

Exception to be raised in Solver.

Module contents

Thoth’s solver package.

thoth.solver.resolve(requirements, index_urls, python_version, exclude_packages, transitive, virtualenv)[source]

Resolve given requirements for the given Python version.

thoth.solver.get_ecosystem_solver(ecosystem_name)[source]

Get Solver subclass instance for particular ecosystem.

Parameters

ecosystem_name – name of ecosystem for which solver should be get

Returns

Solver

class thoth.solver.PythonDependencyParser[source]

Bases: thoth.solver.python.base.DependencyParser

Python Dependency parsing.

parse(specs)[source]

Parse specs.

static parse_python(spec)[source]

Parse PyPI specification of a single dependency.

Parameters

spec – str, for example “Django>=1.5,<1.8”

Returns

requirement for the Python package

class thoth.solver.PythonReleasesFetcher(*, source: thoth.python.source.Source)[source]

Bases: thoth.solver.python.base.ReleasesFetcher

A releases fetcher based on PEP compatible simple API (also supporting Warehouse API).

fetch_releases(package_name)[source]

Fetch package and index_url for a package_name.

property index_url

Get URL to package source index from where releases are fetched.

source
class thoth.solver.PythonSolver(*, dependency_parser: thoth.solver.python.python_solver.PythonDependencyParser, releases_fetcher: thoth.solver.python.python_solver.PythonReleasesFetcher)[source]

Bases: thoth.solver.python.base.Solver

PyPI dependencies solver.

dependency_parser
releases_fetcher