Skip to content

Commit 5f8a352

Browse files
authored
Merge pull request #13561 from meet-vasita/fix-doc-dependency-example
Fix inconsistent examples in dependency resolution docs
2 parents ed05518 + 39e92c7 commit 5f8a352

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/html/topics/dependency-resolution.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ will avoid performing dependency resolution during deployment.
165165

166166
## Dealing with dependency conflicts
167167

168+
This section uses hypothetical packages (`package_coffee`, `package_tea`, and
169+
`package_water`) to explain how pip resolves conflicts.
170+
168171
This section provides practical suggestions to pip users who encounter
169172
a `ResolutionImpossible` error, where pip cannot install their specified
170173
packages due to conflicting dependencies.
@@ -194,6 +197,11 @@ because they each depend on different versions of the same package
194197
- ``package_tea`` version ``4.3.0`` depends on version ``2.3.1`` of
195198
``package_water``
196199

200+
Note: `package_coffee`, `package_tea`, and `package_water` are hypothetical
201+
packages used only to illustrate dependency conflicts. They are not real
202+
projects you can install.
203+
204+
197205
Sometimes these messages are straightforward to read, because they use
198206
commonly understood comparison operators to specify the required version
199207
(e.g. `<` or `>`).
@@ -252,10 +260,10 @@ the same version of `package_water`, you might consider:
252260

253261
In the second case, pip will automatically find a version of both
254262
`package_coffee` and `package_tea` that depend on the same version of
255-
`package_water`, installing:
263+
`package_water`, for example:
256264

257265
- `package_coffee 0.44.1`, which depends on `package_water 2.6.1`
258-
- `package_tea 4.4.3` which _also_ depends on `package_water 2.6.1`
266+
- `package_tea 4.4.3`, which also depends on `package_water 2.6.1`
259267

260268
If you want to prioritize one package over another, you can add version
261269
specifiers to _only_ the more important package:

news/13561.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarified dependency resolution docs: added note on hypothetical packages, fixed version mismatch, and added introduction line.

0 commit comments

Comments
 (0)