-
Notifications
You must be signed in to change notification settings - Fork 28
Don't append #egg=foo to URLs in missing hashes output (fixes #76) #77
Conversation
This could use tests. I think it's fine to land after that. For reference, I added the |
Does a test make sense for this change? |
The test should make sure it prints out the right stuff for the various url possibilities. So, I think it's worth a test. |
I agree that a bunch of tests for this code is a good idea, but no tests for it was pre-existing, and unfortunately I don't think I'm going to have the time to figure out the peep tests and what the various URL permutations are (I only started using peep today, and I'm still not that familiar with pip install options), so someone else will need to drive this :-) |
I'll try to find time to look into this this week. I can at least test the various urls I wrote the original code to support. |
Thank you :-) |
Thank you for reporting it and writing up a PR! |
I started writing up tests, but haven't finished, yet. I need to get some other things done, then I'll circle back to this. If someone wants to grab this from me, let me know. |
The existing conditional was incorrect (it appended #egg=foo even if it was already present, due to filename_from_url() stripping away the fragment) and should have been replaced by a self._url().endswith() or similar. However peep already enforces that URLs have the package name specified ("Unable to determine package name from URL ...; add #egg=") so by the time we reach this point, self._url() will always have the package name specified & we'll never need to append it.
I have part of the tests stuff working, but the whole " Anyhow, sorry for blocking this so long. |
Thank you :-) |
And you! |
The existing conditional was incorrect (it appended #egg=foo even if it was already present, due to filename_from_url() stripping away the fragment) and should have been replaced by a self._url().endswith() or similar.
However peep already enforces that URLs have the package name specified ("Unable to determine package name from URL ...; add #egg=") so by the time we reach this point, self._url() will always have the package name specified & we'll never need to append it.