def find_all_candidates(self, project_name):<EOL>
index_locations = self._get_index_urls_locations(project_name)<EOL>index_file_loc, index_url_loc = self._sort_locations(index_locations)<EOL>fl_file_loc, fl_url_loc = self._sort_locations(<EOL>self.find_links, expand_dir=True,<EOL>)<EOL>file_locations = (Link(url) for url in itertools.chain(<EOL>index_file_loc, fl_file_loc,<EOL>))<EOL>url_locations = [<EOL>link for link in itertools.chain(<EOL>(Link(url) for url in index_url_loc),<EOL>(Link(url) for url in fl_url_loc),<EOL>)<EOL>if self._validate_secure_origin(logger, link)<EOL>]<EOL>logger.debug('<STR_LIT>',<EOL>len(url_locations), project_name)<EOL>for location in url_locations:<EOL><INDENT>logger.debug('<STR_LIT>', location)<EOL><DEDENT>canonical_name = canonicalize_name(project_name)<EOL>formats = self.format_control.get_allowed_formats(canonical_name)<EOL>search = Search(project_name, canonical_name, formats)<EOL>find_links_versions = self._package_versions(<EOL>(Link(url, '<STR_LIT>') for url in self.find_links),<EOL>search<EOL>)<EOL>page_versions = []<EOL>for page in self._get_pages(url_locations, project_name):<EOL><INDENT>try:<EOL><INDENT>logger.debug('<STR_LIT>', page.url)<EOL><DEDENT>except AttributeError:<EOL><INDENT>continue<EOL><DEDENT>with indent_log():<EOL><INDENT>page_versions.extend(<EOL>self._package_versions(page.iter_links(), search)<EOL>)<EOL><DEDENT><DEDENT>file_versions = self._package_versions(file_locations, search)<EOL>if file_versions:<EOL><INDENT>file_versions.sort(reverse=True)<EOL>logger.debug(<EOL>'<STR_LIT>',<EOL>'<STR_LIT:U+002CU+0020>'.join([<EOL>url_to_path(candidate.location.url)<EOL>for candidate in file_versions<EOL>])<EOL>)<EOL><DEDENT>return file_versions + find_links_versions + page_versions<EOL>
Find all available InstallationCandidate for project_name

        This checks index_urls and find_links.
        All versions found are returned as an InstallationCandidate list.

        See _link_package_versions for details on which files are accepted