1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

197 commits

Author SHA1 Message Date
Donald Stufft dd640f23b5 Merge pull request #1529 from dongweiming/bugfix_for_all_versions_duplicate
Bugfix: when not find a version that satisfies the requirement. show all versions but duplicate
2014-05-03 07:52:48 -04:00
Matthew Iversen aa129ffc51 underscore unused variables 2014-04-03 13:39:43 +11:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00
dongweiming 1644c283b2 Delete list() transform 2014-03-08 02:19:14 -05:00
dongweiming e430b58ceb Bugfix: when not find a version that satisfies the requirement.
show all versions but duplicate
2014-03-07 17:05:33 -05:00
Daniele Procida 68cacfb71d fixes #1615 2014-03-05 18:17:43 -05:00
Donald Stufft 95ac4c16f5 Remove dependency links support from pip 2014-02-25 18:39:40 -05:00
Donald Stufft 95035fc5c4 Turn on everything in flake8
flake8 ignores some errors by default, these ignored by defaults
change sometimes. This will make things stabler by selecting
everything.
2014-02-24 16:52:23 -05:00
Donald Stufft 3c455a0a28 This is no longer in use 2014-02-16 20:33:21 -05:00
Donald Stufft 2743768b7b Fix the style of the code base to better match pep8 2014-01-27 14:11:29 -05:00
Donald Stufft 57acb26498 If --allow-unverified is used assume it also means --allow-external 2014-01-10 10:35:55 -05:00
Donald Stufft b2a60f9088 Dont' fail on ConnectionErrors 2014-01-07 14:36:13 -05:00
Donald Stufft cb7af82f20 Remove the setuptools version check
With the vendoring of pkg_resources we no longer need to worry
about the version of the installed setuptools.
2014-01-07 08:11:28 -05:00
Donald Stufft 073ae0d0b1 Switch to importing the vendored pkg_resources 2014-01-07 04:47:04 -05:00
Donald Stufft 325cd513aa Add Accept: text/html header when processing an index 2014-01-07 03:12:52 -05:00
Marcus Smith 73b8692d86 a single path_to_url function with tests 2013-11-18 22:12:41 -08:00
Marcus Smith 3dc40cad46 - if installing directly from a wheel, fail if it has an invalid name or is unsupported
- when walking links, skip invalid wheel filenames, don't crash
2013-11-14 16:35:24 -08:00
Donald Stufft 787a9b11dd Enable Downloading Wheels by Default
* Switches the default in pip.index.PackageFinder to True
* Supresses --use-wheel
* Adds --no-use-wheel which prevents the use of Wheel
2013-11-07 12:29:14 -05:00
Marcus Smith ebb52ee12c use "INSTALLED_VERSION" (not "InfLink") as the name for the object that represents the "link" for the installed version of a requirement 2013-11-06 09:35:57 -08:00
Donald Stufft 62776e0d3d Merge pull request #1278 from qwcode/allow_mac_wheels
allow pip to install mac wheels from pypi
2013-11-04 13:45:51 -08:00
Donald Stufft 14d83f5333 Add a deprecation warning for dependency links 2013-11-02 13:27:10 -04:00
Marcus Smith 04f78cc71f allow pip to install Mac wheels from pypi (in addition to Windows wheels) 2013-10-31 20:54:25 -07:00
Donald Stufft 12ee7cc6d9 Do not respect dependency links by default 2013-10-27 18:34:46 -04:00
Donald Stufft dd160beb0b Better name the need_allow_insecure variable 2013-10-26 23:53:21 -04:00
Donald Stufft 840db882de Remove the allow_all_unverified 2013-10-26 23:52:04 -04:00
Donald Stufft 616ce39061 Rename --allow-insecure to --allow-unverified 2013-10-26 23:47:57 -04:00
Donald Stufft 814514e1bd Rename pip.vendor.* to pip._vendor.* to ensure it's obviously private 2013-10-22 21:32:25 -04:00
Donald Stufft 7cf21c6d2c Merge pull request #1213 from dstufft/deprecate-regex-parsing
Deprecate the regex <th> finding
2013-10-14 12:33:48 -07:00
Paul Moore 55272b264e Clarify setuptools requirement message by including the minimum version 2013-10-10 16:32:05 +01:00
Paul Moore 2902ce7985 Make the check for wheel support in setuptools test for DistInfoDistribution rather than check the version 2013-10-06 20:15:47 +01:00
Marcus Smith 3c0072cc00 merge from 1.4.X 2013-10-05 21:49:41 -07:00
Marcus Smith 11a178fda2 1) If the wheel name != search_name, then return immediately. Not doing so,
exposes wheel link matching unnecessarily to Issue #1217.
2) If somehow the pip code is broken, and unsupported wheels are being
passed to the sorter, then atleast fail with a meaningful error.
2013-10-01 21:33:26 -07:00
Donald Stufft 0530d555e0 Deprecate the regex <th> finding 2013-09-28 12:18:17 -04:00
Donald Stufft 74889a5413 Remove unused imports 2013-09-24 23:32:03 -04:00
Donald Stufft a2dffaf3a7 Remove old error handling that is no longer required 2013-09-24 23:32:03 -04:00
Donald Stufft f34d02d09f Refactor error hnadling into a function 2013-09-24 23:32:03 -04:00
Donald Stufft 13ba411c72 Add a missing text from the exception message 2013-09-24 23:32:03 -04:00
Donald Stufft cf0c6e74dd Move the requests.HTTPError into it's own exception handler 2013-09-24 23:32:03 -04:00
Donald Stufft 059ef170ee Catch the requests SSLError instead of ssl.SSLError 2013-09-24 23:32:03 -04:00
Donald Stufft 92c40c3e06 Ensure that we successfully utilize requests timeout functionality 2013-09-24 23:32:03 -04:00
Donald Stufft a8b94878f3 Remove threaded page downloads
Threaded page downloads was causing issues with the requests
pool being closed. It also makes this area of code harder to debug
and quite often the pool has a size of 1.

Further more the pool only affects the scaning of the index which
should not have as great of a need for parallezation now that there
is only a single request per download by default.
2013-09-24 23:32:03 -04:00
Donald Stufft ff2854a855 Use requests instead of urllib2 2013-09-24 23:32:03 -04:00
Donald Stufft 3c61ba7040 Warn when using an insecure transport for index or find-links 2013-08-15 09:29:11 -04:00
Donald Stufft 3ef4ee4693 Remove direct support for PEP381 Mirrors
* PEP381 Mirroring support was never fully implemented leaving
  users of it trivially exploitable to a MITM or malicious mirror
  operator.
* 2 out of 6 of the mirrors have been removed from the pool and
  will never resolve.
* The remaining mirrors often fall behind
* The mirrors will likely never be available under HTTPS
* People who wish to use a mirror of PyPI can still do so by
  manually specifying a mirror url for --index-url or
  --extra-index-url which is more flexible, allowing for
  mirrors to be hosted under any domain.
2013-07-29 12:42:33 -04:00
Donald Stufft 84ea16cd58 Don't ignore already installed pre-releases 2013-07-23 19:44:13 -04:00
Donald Stufft 44e43e250e Merge pull request #1075 from dstufft/always-consider-installed
Don't ignore already installed pre-releases
2013-07-23 16:43:56 -07:00
Donald Stufft 65342ef37b Don't ignore already installed pre-releases 2013-07-23 19:19:19 -04:00
Marcus Smith 9a22f06d18 merge from release-1.4 branch 2013-07-21 23:53:47 -07:00
David Aguilar bafcf59b2e pip.index: fix crash getting Content-Type header
Returned headers may not always have the "Content-Type"
field available.  Avoid KeyError exceptions by using
dict.get() instead of blindly grabbing the header value.

Closes #32
2013-07-15 13:09:09 -04:00
Donald Stufft 1aff8f53df Default to disallowing external and insecurely hosted files 2013-07-14 12:52:32 -04:00
Donald Stufft 8cef363327 --pre flag should affect the finder and not the requirements
Storing the --pre flag on the finder enables easily being able
to have it affect all package discoveries made with that finder.
The previous method of passing it into the InstallRequirement
meant that only top level dependencies were controlled by
--pre
2013-07-11 12:28:15 -04:00
Daniel Holth 05035e9258 fix #1029 (urlparse.urlparse() instead of just urlparse()) 2013-07-04 19:46:02 -04:00
Daniel Holth 07da91c842 cleaner "don't install pypi-hosted binary wheels on linux" feature 2013-06-30 14:15:03 -04:00
Donald Stufft 899d48021b Filter out binary Wheels for non Windows 2013-06-28 19:37:00 -04:00
Marcus Smith fb397cd1ec have "pip wheel" only be satisfied by setuptools 2013-06-27 00:20:28 -07:00
Marcus Smith 72f0ec9419 wheel is also supported now with setuptools>=0.7.2 2013-06-13 22:04:05 -07:00
Donald Stufft fb24b3eaaa Change --allow-external to work per project and add --allow-all-external 2013-06-07 10:43:52 -04:00
Donald Stufft d3638aa7a0 Change wording from "unsafe" to "insecure" 2013-06-07 10:43:52 -04:00
Donald Stufft 2731f06474 Default to allowing unsafe urls and allow disabling them via option 2013-06-07 10:43:52 -04:00
Donald Stufft cc46cdc8b3 Differentiate between safe and unsafe urls where possible
* Links and HTMLPages know if they are "trusted"
* File Links know if they are safe or not
* A "Safe" file Link comes from a trusted Link/HTMLPage and has
  a hash allowing verification of the download
* Adds a --allow-unsafe PACKAGE argument to allow unsafe files on
  a per package basis
* Optimizes scraping external sites by short circuiting if
  the current trust rules won't allow using it's files anyways
2013-06-07 10:43:52 -04:00
Donald Stufft 9ccd5f0bb3 In accordance with PEP438 default to allowing external urls
* After one release has been made allowing external urls, future
  releases will disallow by default
2013-06-07 10:42:55 -04:00
Donald Stufft 0e1da584f4 Differentiate between internal and external links where possible
* By default ignore external links
* Add the ``--allow-external`` flag that enables external links
  globally
* Fallback to allowing all links if we cannot determine the
  API version of the parsed page
* Inform the user of ``--allow-external`` if nothing was found
  to install
2013-06-07 10:42:55 -04:00
Donald Stufft 75cef55df7 Do a check prior to returning HTMLPage that it is indeed html
Previously pip would check with a HEAD request if the url looked
like it contained an archive and skip the file. However this didn't
work if the url didn't look like an archive and instead just
redirected to an archive.

This will therefore, after the url has been fetched, inspect the
headers and look to see if the Content-Type is text/html.
2013-06-07 08:42:49 -04:00
Donald Stufft 2eb43b25ab Use html5lib to parse HTML instead of using regexs
HTML is not a regular language and thus cannot be accurately parsed
with a regex. The regexs that pip had were gnarly, and required
multiple levels of them in order to "work".

Using html5lib instead of regexs makes the parsing step simpler,
better tested, and much more robust.

There is still some use of regex to parse html. Namely the hack
that looks for a <th> tag with a "rel" after it. This hack is
required to work inside of HTML comments so it cannot be parsed
as HTML.
2013-06-02 10:01:40 -04:00
Marcus Smith c721a735b5 wheel finder priority based on supported_tags order 2013-05-02 15:28:32 -07:00
Marcus Smith 6e2bfe8323 remove python 2.5 logic 2013-04-17 22:50:22 -07:00
Marcus Smith f1fb4b4fda wheel requirement checks with tests 2013-04-05 14:21:11 -07:00
Daniel Holth 0ea48dcf5a check for proper distribute when using wheels 2013-04-05 11:16:03 -07:00
Marcus Smith 00fa9bea96 merge with develop 2013-03-15 23:46:46 -07:00
Donald Stufft 4d5c5f8f97 Only install stable releases by default
* Adds the --pre flag to pip install to specify that you wish
  to install pre-releases
* If the version spec contains any pre-releases then continue to
  install pre-releases
2013-03-09 10:27:19 -05:00
Jannis Leidel 06e65d826a Revert "Update method description to match expected behaviour."
This reverts commit 6a483a3778.
2013-03-08 00:09:05 +01:00
Jannis Leidel a3584d1766 Revert "Explicitly ignore rel='download' links while looking for html pages."
This reverts commit 0bb9c31aea.
2013-03-08 00:08:51 +01:00
Marcus Smith 72812c52ff close socket upon CertificateError 2013-03-03 22:38:37 -08:00
Marcus Smith 50e2662bb4 ssl errors should show by default w/o -v 2013-03-01 11:07:29 -08:00
Marcus Smith cf3a5619b0 fix mirror url parsing and add tests 2013-02-19 11:49:19 -08:00
Marcus Smith 1857ece79b fix import syntax 2013-02-16 15:40:43 -08:00
Marcus Smith 22bf924b52 merge with develop 2013-02-16 14:17:22 -08:00
Jannis Leidel 8a4458bf56 Fixed a whole bunch of cosmetic problems, mostly to adhere to PEP8. 2013-02-16 19:02:41 +01:00
Marcus Smith a4a9197e7e py25 import fixes 2013-02-06 02:08:23 -08:00
Marcus Smith b2e0b6dfb0 log relevant message if URLError.reason is SSLError or CertificateError 2013-02-06 01:48:28 -08:00
Marcus Smith dff849ce27 existing install has priority over wheels 2012-11-03 22:10:58 -07:00
Marcus Smith 7ad52b423d link sort key as instance method; guard when link is InfLink 2012-11-03 21:35:56 -07:00
Paul Moore 4b01b90df2 Give wheels priority over sdists when installing 2012-10-28 22:02:48 +00:00
Marcus Smith be12f79ab4 merge pypa/develop 2012-10-25 12:51:07 -07:00
Paul Nasrat 32f0be7a96 Merge pull request #702 from qwcode/link_sort2
put back finder link priority (with tests)
2012-10-24 23:53:39 -07:00
Paul Nasrat f54f422e11 Merge pull request #677 from blaze33/develop
Explicitly ignore rel='download' links while looking for html pages.
2012-10-24 06:02:37 -07:00
Marcus Smith c770ad66db let installed version be it's own item 2012-10-13 23:03:09 -07:00
Paul Moore 50c21119e5 Add platform checks to wheel location code 2012-10-12 09:36:05 +01:00
Marcus Smith 758c3368e9 finder link priority 2012-10-10 21:49:29 -07:00
Alex Grönholm 47af6d4094 Append / to the PyPI URL to reduce unnecessary redirects 2012-10-02 21:19:56 +03:00
Daniel Holth aa5b33dbf4 experimental support for installing wheel archives 2012-10-01 22:50:24 -07:00
Maxime Rouyrre 6a483a3778 Update method description to match expected behaviour. 2012-10-02 03:33:29 +02:00
Marcus Smith 93bdb858d8 fix finder version sorting with Inf object 2012-09-25 07:56:09 -07:00
Marcus Smith e066d36de8 don't add local dirs that are not findlinks to url list 2012-09-16 22:41:51 -07:00
Marcus Smith af7bd9ccdb index file:// urls that are dirs should not have listdir run against them 2012-09-16 17:41:27 -07:00
Maxime Rouyrre 0bb9c31aea Explicitly ignore rel='download' links while looking for html pages.
This way we avoid requesting archive headers just to see they're not
HTML pages.
2012-09-14 17:27:58 +02:00
Carl Meyer f2df551094 Merge pull request #671 from pfmoore/develop
Fix for issue 670 (unorderable Link types under Python 3)
2012-09-10 18:20:56 -07:00
Paul Moore 1dee479184 Code changes for fix to issue 670 2012-09-10 21:04:00 +01:00
Carl Meyer 895bfee767 Allow --no-index and --find-links relative path in reqs file. 2012-09-10 00:48:48 -06:00
Paul Moore 04f01f227e Support local file paths in --find-links arguments 2012-09-09 21:15:32 +01:00