sarugaku / resolvelib

Resolve abstract dependencies into concrete ones
ISC License
138 stars 31 forks source link

Looking for feedback on narrow backtrack causes approach #140

Closed notatallshaw closed 10 months ago

notatallshaw commented 10 months ago

This PR is an approach to https://github.com/sarugaku/resolvelib/issues/139 and fixes https://github.com/pypa/pip/issues/12305#issuecomment-1743976704

However, as the test suite shows it's using methods that are not guaranteed to exist.

I am looking for feedback on how this could be implemented in a way that does not create brand new requirements on downstream libraries.

notatallshaw commented 10 months ago

Actually I realized, as I woke up this morning, the solution is quite obvious.

As only the downstream library can know the shape of their own requirements then this must be implemented there with resolvelib simply making a call to ask the library to narrow the causes if it can.

Once I get a chance I will make an issue on Pip side, and once agreed this is a good idea I will edit this PR to simply call a narrow causes method on the downstream library.

notatallshaw commented 10 months ago

I've created an issue on Pip side (https://github.com/pypa/pip/issues/12318), once I have feedback there I will make a clean PR here.