python-nab-resolver
Port variant v13
Summary Generic PubGrub dependency-resolver core (3.13)
Package version 0.0.28
Homepage https://github.com/notatallshaw/nab
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v14
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 11 NOV 2026, 00:33:11 UTC
Port created 24 JUL 2026, 16:11:02 UTC
Subpackage Descriptions
single # nab-resolver Find a combination of package versions that satisfies their dependency constraints, using the PubGrub algorithm. A `ResolverProvider` supplies the package rules, so the solver needs no Python-specific knowledge. The Python provider lives in [`nab-provider`] and the user-facing CLI in [`nab`]. It has no runtime dependencies: the standard library is all it needs. ## When to use it Use `nab-resolver` when you are building some kind of package resolver, Python or otherwise. There is a worked example in the docs: ## The public API The supported API is the module paths below. They will not move without a major version bump. Everything else in the package is internal and may be renamed or relocated in any release. ```text nab_resolver.errors ResolutionError, ResolutionInvariantError, ResolutionLimitError, ResolutionStalledError, ResolutionTerminatedError nab_resolver.ranges Range nab_resolver.resolver BaseProvider, DEFAULT_MAX_ITERATIONS, Resolver, ResolverObserver, ResolverProvider, Solution nab_resolver.root ROOT nab_resolver.types Incompatibility, IncompatibilityCause, RangeProtocol, RootRequirement, Term ``` The package root binds no names, so importing `nab_resolver` pulls in no submodules and a caller loads only what it imports. ## Checking preferred versions `try_resolve_preferred` checks a proposed assignment against the current provider's version choices, dependencies and emitted incompatibilities. It returns the reachable pins on success, or `None` when ordinary resolution is needed. Requirements or constraints can force a different version from the preference. If the preferred version remains in range but the provider chooses another, the trial refuses and leaves the choice to ordinary search. ```python trial = Resolver(make_provider()) pins = trial.try_resolve_preferred(requirements, preferred, constraints) if pins is None: pins = Resolver(make_provider()).resolve(requirements, constraints) ``` The trial consumes its resolver and provider. Create both again before falling back; provider callbacks may have queued facts during the trial. Nab's project layer owns these attempts for each target and retains package names and alignment preferences between targets.
Configuration Switches (platform-specific settings discarded)
PY313 ON Build using Python 3.13 PY314 OFF Build using Python 3.14
Package Dependencies by Type
Build (only) python313:dev:std
python-pip:single:v13
autoselect-python:single:std
Build and Runtime python313:primary:std
Download groups
main mirror://PYPIWHL/10/75/8f0b7100cd3728f81d29e4126bf7e66afe1d31bb4e8ad12c275ab23ce978
Distribution File Information
6470c215b40c42141ced71d4d16dbd2f44ea5bd4e95b0dfe634192f3945e35f8 69192 python-src/nab_resolver-0.0.28-py3-none-any.whl
Ports that require python-nab-resolver:v13
python-nab-index:v13 Simple-API client and on-disk cache (3.13)
python-nab-markersets:v13 PEP 508 marker algebra (3.13)
python-nab-provider:v13 IO-free resolution core for nab (3.13)
python-nab-python:v13 Nab package index provider (3.13)