In a situation where an HTTP proxy is required to access the Internet:
$ export http_proxy=username:password@proxy_host:8080 $ easy_install -i http://pypi.python.org/simple ipython Searching for ipython Reading http://pypi.python.org/simple/ipython/ No local packages or download links found for ipython error: Could not find suitable distribution for Requirement.parse('ipython')
Because PackageIndex suppresses HTTP errors, there is no indication that the cause of the failure is an HTTP error response (in this case 407 Proxy Authentication Required).
We handle 404 specially, by parsing the main package listing to see if the package is available under a name equivalent up to the safe_name transformation, but I cannot see a good reason to suppress other HTTP errors that could provide useful information to the user as to why the command fails.
The logic behind the current code can be traced back to the following commits:
- Suppressing HTTP errors: http://svn.python.org/view?view=revision&revision=41041 (easy_install.py, class Opener)
- Special-casing 404: http://svn.python.org/view?view=revision&revision=50550
I suggest warning the user on errors other than 404, and not attempting to scrape the error page for download links; patch to follow.
The original code is by @pje; let me know if you think this issue could benefit from his input as to rationale.