Staticsite could use it by default, and fallback to the internal implementation (currently in staticsite/toposort.py) for older Python versions that don't have it in the standard library.
It's also worth refactoring toposort to match the API of graphlib.TopologicalSorter, turning it into a polyfill kind of thing.
Python 3.9 introduced graphlib.TopologicalSorter.
Staticsite could use it by default, and fallback to the internal implementation (currently in
staticsite/toposort.py
) for older Python versions that don't have it in the standard library.It's also worth refactoring
toposort
to match the API ofgraphlib.TopologicalSorter
, turning it into a polyfill kind of thing.