Skip to content

Commit 1185ce4

Browse files
author
ziebam
committed
Add link to appropriate doc in backtracking output
After consideration I included the `# noqa: E501` comment to retain readability since the URL is pretty verbose.
1 parent d91fecd commit 1185ce4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pip/_internal/resolution/resolvelib/reporter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class PipReporter(BaseReporter):
1313
def __init__(self) -> None:
1414
self.backtracks_by_package: DefaultDict[str, int] = defaultdict(int)
1515

16+
reduce_backtracking_url = "https://pip.pypa.io/en/latest/topics/dependency-resolution/#possible-ways-to-reduce-backtracking" # noqa: E501
1617
self._messages_at_backtrack = {
1718
1: (
1819
"pip is looking at multiple versions of {package_name} to "
@@ -27,8 +28,8 @@ def __init__(self) -> None:
2728
13: (
2829
"This is taking longer than usual. You might need to provide "
2930
"the dependency resolver with stricter constraints to reduce "
30-
"runtime. If you want to abort this run, you can press "
31-
"Ctrl + C to do so."
31+
f"runtime. See {reduce_backtracking_url} for tips and/or "
32+
"press Ctrl + C to abort this run."
3233
),
3334
}
3435

0 commit comments

Comments
 (0)