Skip to content

Support index preference. #264

Closed
wants to merge 5 commits into from

8 participants

@fairview

This is for #12; should be easier to review and integrate than my old fork on bitbucket.

@pnasrat
Python Packaging Authority member
pnasrat commented May 1, 2011

Thanks for the patch for Issue #12, I'm currently triaging bugs, as this is a slightly bigger enhancement I want to get some discussion on it.

@SnowLprd

How's the discussion on this patch progressing? It'd be great to see this incorporated into the 1.1 release. =)

@hltbra
Python Packaging Authority member
hltbra commented Aug 2, 2011

The patch looks good.

The only thing I would like to do is trying to extract some methods to make it easier to do unit tests, not only functional behavior tests - I don't know if it is so easy, because PackageFinder is too coupled and find_requirement is a big monster.

@pnasrat
Python Packaging Authority member
pnasrat commented May 13, 2012

Sorry for the delay in getting back to this. Can you ensure your change is against current develop branch.

@jezdez jezdez and 1 other commented on an outdated diff Jun 25, 2012
pip/index.py
@@ -48,6 +49,10 @@ def __init__(self, find_links, index_urls,
else:
self.mirror_urls = []
+ all_origins = self.index_urls + self.mirror_urls + self.find_links
+ self.origin_preferences = dict([(e[1], e[0]) for e in enumerate(all_origins)])
@jezdez
jezdez added a note Jun 25, 2012

Given the fact dicts are unordered this needs to be something else, e.g. a tuple of two-tuples that can be later turned into a dict for easier access.

@fairview
fairview added a note Jun 25, 2012

Thanks for looking at this, Jannis. I need to update this as Paul requested, to refamiliarize myself with my own patch, but I don't believe this is necessary. The origin_preferences dict is only used to get the numeric preference value for the index URL, then that's used to sort the applicable versions.

@jezdez
jezdez added a note Jun 27, 2012

Ah, gotcha. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@fairview

I've updated my fork and improved the patch. All tests pass. Let me know if it needs anything else.

@travisbot

This pull request fails (merged 8a65d62 into 6ed502c).

@pnasrat
Python Packaging Authority member
pnasrat commented Jun 26, 2012

Can you look at the failures:

FAIL: Verify that indexes will be used in the order defined.
@travisbot

This pull request fails (merged 8e8b55f into 6ed502c).

@fairview fairview Try to fix some Python 3 issues.
Dunno what to do about the Mercurial/Bazaar test failures under it.
a6171f3
@travisbot

This pull request passes (merged a6171f3 into 6ed502c).

@fairview

OK, I guess the VCS failures were specific to my local environment.

@jezdez
jezdez commented Jun 27, 2012

LGTM :)

@justinmayer

@pnasrat Hey Paul. Any chance we could get this merged? :smile:

@pnasrat
Python Packaging Authority member
pnasrat commented Jul 7, 2012

Sure - at wedding this weekend. Will look next week.

@justinmayer

No problem. Hope you had a great time at the wedding. Looking forward to getting this merged. :smile:

@justinmayer

Hi @pnasrat. Just checking in. Any chance we can get this merged?

@justinmayer

Hi @pnasrat and @jezdez. Is there anything holding up the merge for this pull request?

@pnasrat
Python Packaging Authority member
pnasrat commented Nov 25, 2012

Mostly been life stuff (which I've more of currently). I'm happy with the code and tests - you probably need to ensure mergable and I'll merge on green (but may be a week or so on that due to afore-said life)

@qwcode
Python Packaging Authority member
qwcode commented Nov 26, 2012

@fairview, the conflict resolution will likely be required in part due to pull #702, so that description might be helpful to read.

John Hensley Merge from pip/develop, update patch.
Only apply index preference to index, mirror, and find-links sources.

Add 1-second delay to test_upgrade tests, to prevent occasional failures
when mtime resolution is insufficient.

Change test_finder.test_finder_priority_nonegg_over_eggfragments to use
file:// URLs instead of HTTP; the non-existent host caused a roughly
20-second delay.
e9709f1
@fairview

OK, I think I've completely borked this pull request with my mad Github skills. I'm closing this one out and attempting to attach a new one to issue #12.

@fairview fairview closed this Nov 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.