Commit Graph

250 Commits

Author SHA1 Message Date
Xavier Fernandez d48bc5ce2d Drop the level argument
it is useless since 52ca02608e
2015-11-30 22:11:02 +01:00
Xavier Fernandez b018c9ab4d Fix exception catch order
SSLError inherits from ConnectionError
2015-11-30 22:03:16 +01:00
Xavier Fernandez 4782ffeab8 use packaging.version.parse
not setuptools version
2015-11-04 22:52:44 +01:00
Xavier Fernandez 113631c0aa rename to candidates 2015-11-04 22:52:44 +01:00
Xavier Fernandez f1bf7515c2 pip.index: remove INSTALLED_VERSION
closes #703
2015-11-04 22:52:44 +01:00
Roy Wellington Ⅳ 059e934746 Adopt comments and ordering from @pykler's implementation.
See: 723da87562
2015-09-09 20:23:39 -07:00
Roy Wellington Ⅳ 2b3386afaf Compute the protocol to check against outside the loop.
And improve the comment a bit.
2015-09-09 18:59:03 -07:00
Roy Wellington Ⅳ 455f3b4e74 SSH is a secure protocol, and allow repository links ("git+") to validate. 2015-09-09 18:59:03 -07:00
Roy Wellington Ⅳ 99b68f977e Allow SSH as a secure protocol. 2015-09-09 18:59:03 -07:00
Xavier Fernandez c73b1f9fd5 rename to canonicalize_name 2015-09-08 00:18:54 +02:00
Xavier Fernandez 414c2d62fd supplied name does not need to be normalized 2015-09-06 19:20:17 +02:00
Xavier Fernandez 2ff59d1cc0 Add canonical utils function 2015-09-06 19:20:14 +02:00
Xavier Fernandez 8c67bccb2c Remove now useless code
since a23a65cee4
2015-09-04 23:24:08 +02:00
Xavier Fernandez 7d596224cd Improve some PackageFinder methods' docstrings 2015-09-04 22:36:32 +02:00
Xavier Fernandez 9c43dbcac4 Merge pull request #3035 from arindamchoudhury/patch-1
Update PackageFinder.find_requirement docstring
2015-09-04 22:19:08 +02:00
Donald Stufft 6afc718307 Remove items slated for removal in pip 8.0 2015-09-03 10:55:11 -04:00
Donald Stufft e26d930b0a PEP 470: Remove support for searching rel links 2015-09-03 01:04:06 -04:00
Donald Stufft 0f5d4286a5 Deprecate and Noop the PEP 438 functionality due to PEP 470 2015-09-02 23:47:05 -04:00
Arindam Choudhury f9907d6e77 Update index.py 2015-08-18 15:30:58 +02:00
Donald Stufft 2912910b44 Do a (slightly) less insane thing to handle debundling
Previously we attempt to do some crazy things with import hooks
in order to attempt to automatically alias normally installed
dependencies as our vendored dependencies. This turned out to be
fairly fragile, so instead we'll manually patch sys.modules to
trigger the aliasing.

As part of this, we also drop support for the
PIP_NO_VENDOR_FOR_DOWNSTREAM environment variable because it was
never fully supported and now that we have wheel caching, actually
using it could possibly trigger a bad wheel to be cached. The new
mechanism requires some light patching by downstream to opt into
the mechanism, so they can also easily remove all of the files
in pip/_vendor/ except for __init__.py.
2015-06-23 22:27:47 -04:00
Donald Stufft fc5746a34c Don't cache wheels for links which do not point to release artifacts 2015-05-22 17:13:26 -04:00
Xavier Fernandez 1cde090bd4 fix typos: Search docstring and an empty line 2015-05-10 23:45:54 +02:00
Donald Stufft 22e059556d Add a warning that'll tell people when their Python doesn't support TLS 2015-05-06 18:48:04 -04:00
Robert Collins 582af6e684 Issue #2677: Disable wheels for setup.py options.
Using --install-options, --build-options, --global-options changes
the way that setup.py behaves, and isn't honoured by the wheel code.
The new wheel autobuilding code made this very obvious - disable
the use of wheels when these options are supplied.
2015-04-24 16:14:48 +12:00
Robert Collins 6aec23cafe Issue #2675: Granular control over wheels/sdists
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes #2084
2015-04-24 08:52:48 +12:00
Robert Collins e6cced6026 Consolidate listification of _package_versions.
All uses but one of _package_versions want a list, and the last one
is not special in terms of memory footprint: just return a list from
_package_versions.
2015-04-23 06:43:28 +12:00
Robert Collins 86b375c742 Create a Search object.
We currently recalculate safe_name on every archive we assess, and
with the upcoming per-package check for binary and source use we
either need to recalculate that too, or - as this patch does - hoist
this essentially static data out of the helper function innards into a
static data structure.
2015-04-22 07:42:41 +12:00
Robert Collins 0b54000dc6 Remove spurious use_wheel use.
We can use the same sort algorithm always, as long as we don't add
wheels to the collection we can't ever select them. We need to have
the same sort algorithm always since we're getting rid of use_wheel,
and being much more sophisticated.
2015-04-20 20:12:03 +12:00
Robert Collins 786ff8c607 Break out version extraction for reuse.
This is needed for determining the wheel-cachability of a requirement.
2015-04-13 18:33:07 +12:00
Marc Abramowitz 0684a9f478 Move InstallationCandidate to pip.index
Move InstallationCandidate from `pip.req.req_requirement` to
`pip.index`, the one place where it's used.
2015-04-07 11:56:57 -07:00
Donald Stufft 7113e434a6 Merge pull request #2629 from xavfernandez/index_cleanup
Index cleanup
2015-04-07 06:10:40 -04:00
Xavier Fernandez 2aa9f53e9a Deal with indexes, find-links and dep-links the same way 2015-04-07 11:10:00 +02:00
Xavier Fernandez a1451b192d add expand_dir arg to _sort_locations 2015-04-07 10:59:14 +02:00
Xavier Fernandez d8609a5890 Log all skipped link the same way 2015-04-07 10:41:03 +02:00
Xavier Fernandez 6253c12308 Remove useless code
splitext already has a special case for .tar
2015-04-07 10:41:03 +02:00
Xavier Fernandez 33753fb887 Centralize archive extensions list 2015-04-07 10:41:03 +02:00
Xavier Fernandez 2d14e4ec8b Remove useless _egg_fragment_re 2015-04-07 10:39:49 +02:00
Donald Stufft b7309c6bcc Remove the items deprecated for removal in 7.0 2015-04-07 04:20:51 -04:00
Xavier Fernandez e6a249b9ac Prefer project_name to req_name 2015-03-27 17:44:29 +01:00
Xavier Fernandez 1683f2caf6 PackageFinder._find_all_versions only needs the project_name 2015-03-27 17:38:50 +01:00
Xavier Fernandez 8bff8b5411 PackageFinder._get_index_urls_locations only needs req_name
and InstallRequirement does not need its url_name property anymore
2015-03-27 17:31:05 +01:00
Xavier Fernandez 02c6d2117e PackageFinder._get_pages only needs a req_name
and normalize_name already performs lower()
2015-03-27 17:05:39 +01:00
Xavier Fernandez 8daaf67c31 _find_url_name does not need a req arg anymore
it's always called with url_name=req.url_name and its req arg is only
used to get req.url_name
2015-03-27 16:46:27 +01:00
Xavier Fernandez 9fcda74012 PackageFinder._get_page does not accept req anymore 2015-03-27 16:42:22 +01:00
Xavier Fernandez 1e89191909 HTMLPage.get_page does not accept a req anymore
This removes the "Will skip URL %s when looking for download links for %s" log.
2015-03-27 16:40:37 +01:00
Robert Collins dd3afd20ec Cleanup link handling in req_set.
* Move the caching of find_requirement into find_requirement.

* Move the decision to set / not-set link into InstallRequirement.
2015-03-24 14:46:23 +13:00
Marc Abramowitz d0a495c49c Show # of locations to be searched in debug log
Because I saw this:

      URLs to search for versions for setuptools:
      Skipping link . (from -f); not a file
      Skipping link /Users/marca/dev/git-repos/virtualenv (from -f); not a file
      Skipping link /Users/marca/dev/git-repos/virtualenv/virtualenv_support (from -f); not a file

and I didn't know if there were no URLs to search or if the code was
buggy and it was forgetting to list them (it turned out to be the
former).
2015-03-18 10:02:21 -07:00
Xavier Fernandez 9dd1852c16 remove DistributionNotFound when no version is found
- and rely on if not applicable_versions test instead
- fixes #2502
- rephrase the DistributionNotFound error message to fix other tests
2015-03-15 12:07:36 +01:00
Xavier Fernandez e5b447b14f add docstring for _find_all_versions 2015-03-15 12:07:29 +01:00
Xavier Fernandez b7cfcb0a43 refix find_requirement docstring 2015-03-15 12:07:06 +01:00