#13993·pip

Replace `resolvelib` with `nab-resolve` to do dependency resolution

Author: notatallshawCreated May 16, 2026Updated Sep 13, 2026
Labelsproject: vendored dependencystate: needs discussion

Yesterday at the packaging summit I just announced a project I've been working on called nab: https://github.com/notatallshaw/nab

nab is a tool that can generate lock files (pylock.toml and requirements with or without hashes) and download all dependencies.

It is supported by some libraries, including nab-resolve, a new generic dependency resolver built on top of the PubGrub algorithm but with specifically the problems of the Python packaging specifications and ecosystems in mind.

It is at least a few months from me being able to consider making a PR to replace resolvelib in pip, but I want to make this issue now to get the ball rolling on discussion.

There are a lot of details to discuss, but from my point of view there's one big architectural question to ask: Does pip want to just vendor the core dependency resolver library and be responsible for implementing all the Python package ecosystem optimizations, or should it also vendor the provider library (nab-python) and therefore have the optimizations vendored in?

At the moment pip is responsible for driving specific optimizations in the provider file: https://github.com/pypa/pip/blob/main/src/pip/_internal/resolution/resolvelib/provider.py

However resolvelib base algorithm is relatively simple, and doesn't have many levers to implement optimizations, nab-resolver provides many more levers and a lot more information to allow for optimizations for dependency graphs of specific shapes, and it does not make sense for them to be in the core algorithm, so they are left up to the provider to implement. So it might make sense for nab to provide a full provider to pip and then pip can drive that provider rather than driving the core algorithm.