def find_candidates( self, requirement: Requirement, requires_python: PySpecSet = ALLOW_ALL_PYTHON, allow_prereleases: Optional[bool] = None, allow_all: bool = False, ) -> Iterable[Candidate]: for key, info in self.candidate_info.items(): if key[0] != requirement.identify(): continue if not (requires_python & PySpecSet(info[1])).contains( str(self.environment.interpreter.version)): continue can = self.packages[key] can.requires_python = info[1] yield can
def find_candidates( self, requirement: Requirement, allow_prereleases: bool | None = None, ignore_requires_python: bool = False, ) -> Iterable[Candidate]: for key, info in self.candidate_info.items(): if key[0] != requirement.identify(): continue if not PySpecSet(info[1]).contains( str(self.environment.interpreter.version), True ): continue can = self.packages[key] can.requires_python = info[1] can.prepare(self.environment) can.req = requirement yield can