-
Notifications
You must be signed in to change notification settings - Fork 28
The 'port' command returns a package name instead of the original link. #116
Conversation
Hi; thanks for the patch! The peep port tests are over here, and it should be pretty easy for you to add one: https://github.com/erikrose/peep/blob/master/tests/__init__.py#L374. |
@@ -920,7 +920,11 @@ def peep_port(paths): | |||
if not hashes: | |||
print(req.req) | |||
else: | |||
print('%s' % req.req, end='') | |||
if req.original_link: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, I added the original_link
attr only in pip 8, so this will crash in older versions. Also req_string
isn't a string in the case of req.req
. One way we could fix both is by replacing this whole if
with an inline ternary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erikrose I'm sorry it took so log, but i had to skim through a lot of pip versions in order to make me more confident regarding this changes.
It looks like at some point, urls were stored in a property called url
. However, contents of this property were inconsistent between versions of pip, that's why decided to support only versions above 6.1.0. Is that okay with you? Or do you have any suggestions about direction i should take?
Tests should pass from now on.
Other than the small tweak above, this looks good to me. |
hi @edmorley, could you review my PR again? |
FWIW, I think using |
@erikrose I totally agree. Is there anything I can do to help you with this PR? |
I'm going to have a look at it later today and probably merge it in (if @edmorley doesn't get there first), then do a release. |
The 'port' command returns a package name instead of the original link.
@erikrose Awesome, thanks! |
Hi @erikrose,
During our migration from peep to pip 8 i've discovered that
peep port
can't port requirements that rely on the urls to the remote resources.Could you review my patch?
Unfortunately i couldn't find any tests for
peep port
but I can add them if you wish so.Thanks for your hard work on peep and pip8!