sdispater / mixology

A generic dependency-resolution library written in pure Python
MIT License
79 stars 11 forks source link

Bug in version solver when using a hashable object to represent a package, not just a string. #14

Open Greedquest opened 2 years ago

Greedquest commented 2 years ago

I believe it's this line:

https://github.com/sdispater/mixology/blob/067c5aef14d7caeb733adff2b34e9489797f5113/mixology/version_solver.py#L130

self._propagate_incompatibility will return the _conflict type which is the hashable type used to represent a package (in my usecase this is not a string). The line converts it to str which is a problem since then it is no longer a valid key in the self._incompatibilities dictionary (line 113 of the same function).

https://github.com/sdispater/mixology/blob/067c5aef14d7caeb733adff2b34e9489797f5113/mixology/version_solver.py#L98-L133