1from collections
import defaultdict
2from logging
import getLogger
3from typing
import Any, DefaultDict
7from .base
import Candidate, Requirement
9logger = getLogger(__name__)
14 self.reject_count_by_package: DefaultDict[str, int] = defaultdict(int)
18 "pip is looking at multiple versions of {package_name} to "
19 "determine which version is compatible with other "
20 "requirements. This could take a while."
23 "pip is still looking at multiple versions of {package_name} to "
24 "determine which version is compatible with other "
25 "requirements. This could take a while."
28 "This is taking longer than usual. You might need to provide "
29 "the dependency resolver with stricter constraints to reduce "
30 "runtime. See https://pip.pypa.io/warnings/backtracking for "
31 "guidance. If you want to abort this run, press Ctrl + C."
45 msg =
"Will try a different candidate, due to conflict:"
51 msg += f
"{parent.name} {parent.version} depends on "
53 msg +=
"The user requested "
59 """A reporter that does an info log for every event it sees."""
68 logger.info(
"Reporter.ending_round(%r, state)", index)
70 def ending(self, state: Any) ->
None:
74 logger.info(
"Reporter.adding_requirement(%r, %r)", requirement, parent)
77 logger.info(
"Reporter.rejecting_candidate(%r, %r)", criterion, candidate)
79 def pinning(self, candidate: Candidate) ->
None:
None adding_requirement(self, Requirement requirement, Candidate parent)
None ending(self, Any state)
None pinning(self, Candidate candidate)
None ending_round(self, int index, Any state)
None rejecting_candidate(self, Any criterion, Candidate candidate)
None starting_round(self, int index)
_messages_at_reject_count
None rejecting_candidate(self, Any criterion, Candidate candidate)