Skip to content

Commit

Permalink
Deprecate the fallback to /simple/
Browse files Browse the repository at this point in the history
  • Loading branch information
dstufft committed Sep 26, 2014
1 parent 9c70565 commit f72a904
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pip/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
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,
Expand Down Expand Up @@ -238,6 +238,7 @@ def mkurl_pypi_url(url):
return loc

url_name = req.url_name

# Only check main index if index URL is given:
main_index_url = None
if self.index_urls:
Expand All @@ -249,6 +250,14 @@ def mkurl_pypi_url(url):

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
Expand Down

0 comments on commit f72a904

Please sign in to comment.