@@ -223,7 +223,7 @@ def evaluate_link(self, link: Link) -> Tuple[bool, Optional[str]]:
223
223
ignore_requires_python = self ._ignore_requires_python ,
224
224
)
225
225
if not supports_python :
226
- reason = f' { version } Requires-Python { link .requires_python } '
226
+ reason = f" { version } Requires-Python { link .requires_python } "
227
227
return (False , reason )
228
228
229
229
logger .debug ("Found link %s, version: %s" , link , version )
@@ -685,6 +685,11 @@ def prefer_binary(self) -> bool:
685
685
def set_prefer_binary (self ) -> None :
686
686
self ._candidate_prefs .prefer_binary = True
687
687
688
+ def skipped_links_requires_python (self ) -> List [str ]:
689
+ return sorted (
690
+ {reason for _ , reason in self ._logged_links if "Requires-Python" in reason }
691
+ )
692
+
688
693
def make_link_evaluator (self , project_name : str ) -> LinkEvaluator :
689
694
canonical_name = canonicalize_name (project_name )
690
695
formats = self .format_control .get_allowed_formats (canonical_name )
@@ -698,18 +703,6 @@ def make_link_evaluator(self, project_name: str) -> LinkEvaluator:
698
703
ignore_requires_python = self ._ignore_requires_python ,
699
704
)
700
705
701
- def skipped_links_requires_python (self ):
702
- # type: () -> List[str]
703
- return sorted (
704
- {reason for _ , reason in self ._logged_links if 'Requires-Python' in reason }
705
- )
706
-
707
- def logged_links_rp (self ):
708
- # type: () -> List[str]
709
- skips = [skip for skip in self ._logged_links_rp ]
710
- skips .sort ()
711
- return skips
712
-
713
706
def _sort_links (self , links : Iterable [Link ]) -> List [Link ]:
714
707
"""
715
708
Returns elements of links in order, non-egg links first, egg links
@@ -730,7 +723,7 @@ def _log_skipped_link(self, link: Link, reason: str) -> None:
730
723
if (link , reason ) not in self ._logged_links :
731
724
# Put the link at the end so the reason is more visible and because
732
725
# the link string is usually very long.
733
- logger .debug (' Skipping link: %s: %s' , reason , link )
726
+ logger .debug (" Skipping link: %s: %s" , reason , link )
734
727
self ._logged_links .add ((link , reason ))
735
728
736
729
def get_install_candidate (
@@ -751,11 +744,6 @@ def get_install_candidate(
751
744
version = result ,
752
745
)
753
746
754
- def _log_skipped_link_rp (self , reason ):
755
- # type: (str) -> None
756
- if reason not in self ._logged_links_rp :
757
- self ._logged_links_rp .add (reason )
758
-
759
747
def evaluate_links (
760
748
self , link_evaluator : LinkEvaluator , links : Iterable [Link ]
761
749
) -> List [InstallationCandidate ]:
0 commit comments