@simon a lot of this is incorporating stuff from rye: https://github.com/astral-sh/rye/discussions/1342