diff --git a/pip/index.py b/pip/index.py index 0db8c28b94f..9ba6f02ef7f 100644 --- a/pip/index.py +++ b/pip/index.py @@ -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, @@ -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: @@ -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