Remove index for which the base_url failed #697

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@adiroiban

Problem description

If an index is not available, pip will continue to try the index when installing each file.

When installing a long requirements file, the whole timeouts take a long time.

It would be nice if pip could remove the index and stop trying it.

This can be useful for development and when running continuous integration together with --find-links=file:/// . In case the index is down, pip will just use the cached files.

This can simplifies the build system, since there is no need to look for index failures and then to retry without the index.

I know that index lookup can be explicitly turned off, so I am not sure if this behavior is wanted.

Changes

When get_page will fail for index's base URL, the index url will be removed from the list of indexes.

How to test

There are no tests for now, since I don't know if such behavior is wanted in pip.

I will add the required tests.

Thanks!

Owner
dstufft commented Aug 30, 2014

Thanks for the patch! Sorry it's been so long but I'm going to be closing this. Ideally in the near future pip will be moving more towards a model where failures are not silently ignored and this change doesn't mesh well with that philosophy.

@dstufft dstufft closed this Aug 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment