Deprecate the fallback to /simple/

This commit is contained in:
Donald Stufft 2014-09-17 21:21:14 -04:00
parent 9c70565707
commit f72a9042f9
1 changed files with 10 additions and 1 deletions

View File

@ -15,7 +15,7 @@ from pip._vendor.six.moves.urllib import request as urllib_request
from pip.utils import (
Inf, cached_property, normalize_name, splitext, is_prerelease,
)
from pip.utils.deprecation import RemovedInPip7Warning
from pip.utils.deprecation import RemovedInPip7Warning, RemovedInPip8Warning
from pip.utils.logging import indent_log
from pip.exceptions import (
DistributionNotFound, BestVersionAlreadyInstalled, InvalidWheelFilename,
@ -238,6 +238,7 @@ class PackageFinder(object):
return loc
url_name = req.url_name
# Only check main index if index URL is given:
main_index_url = None
if self.index_urls:
@ -249,6 +250,14 @@ class PackageFinder(object):
page = self._get_page(main_index_url, req)
if page is None:
warnings.warn(
"One or more of your dependencies required using a "
"deprecated fallback to looking at /simple/ to discover "
"it's real name. It is suggested to upgrade your index to "
" support normalized names as the name in /simple/{name}.",
RemovedInPip8Warning,
)
url_name = self._find_url_name(
Link(self.index_urls[0], trusted=True),
url_name, req