Skip to content

Commit

Permalink
Fix PackageFinder to respect allow_all_prereleases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sauhard Gupta committed Oct 26, 2018
1 parent 116c3b1 commit 5c2c407
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pip/_internal/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,11 @@ def find_all_candidates(self, project_name):
)

# This is an intentional priority ordering
return (
file_versions + find_links_versions + page_versions +
dependency_versions
)
all_candidates = file_versions + find_links_versions + page_versions + dependency_versions
if (not self.allow_all_prereleases):
all_candidates = [candidate for candidate in all_candidates
if not candidate.version.is_prerelease]
return (all_candidates)

def find_requirement(self, req, upgrade):
"""Try to find a Link matching req
Expand Down

0 comments on commit 5c2c407

Please sign in to comment.