1) I have an editable package that had some .pyc files that were not ignored by .gitignore
2) I ran snakebasket once. Installation went fine.
3) I ran snakebasket again. It failed with: "Cannot be upgraded due to uncommitted git modifications."
I checked the source directory and found the problem there, but in looking at the snakebasket code, I see that there is no attempt to do a simple equality comparison between (package A, version X) and (package A, version X), which would have avoided this expensive (and errorneous) git comparison in the first place.
To fix, I propose in versions.py.get_available_substitute() using the set() operator on the packages. For set() to detect duplicates, PackageData needs the hash operator, which is simple to implement. Will submit a pull request shortly.
Here's my situation:
1) I have an editable package that had some .pyc files that were not ignored by .gitignore 2) I ran snakebasket once. Installation went fine. 3) I ran snakebasket again. It failed with: "Cannot be upgraded due to uncommitted git modifications."
I checked the source directory and found the problem there, but in looking at the snakebasket code, I see that there is no attempt to do a simple equality comparison between (package A, version X) and (package A, version X), which would have avoided this expensive (and errorneous) git comparison in the first place.
To fix, I propose in versions.py.get_available_substitute() using the set() operator on the packages. For set() to detect duplicates, PackageData needs the hash operator, which is simple to implement. Will submit a pull request shortly.