@@ -160,19 +160,22 @@ Pip's current implementation of the provider implements
160
160
161
161
* If Requires-Python is present only consider that
162
162
* If there are causes of resolution conflict (backtrack causes) then
163
- only consider them until there are no longer any resolution conflicts
164
-
165
- Pip's current implementation of the provider implements ` get_preference ` as
166
- follows:
167
-
168
- * Prefer if any of the known requirements is "direct", e.g. points to an
169
- explicit URL.
170
- * If equal, prefer if any requirement is "pinned", i.e. contains
171
- operator `` === `` or `` == `` without a wildcard.
172
- * Prefer requirements that are "upper-bounded" using operators that do
173
- not allow all future versions, i.e. `` < `` , `` <= `` , `` ~= `` , and `` == ``
174
- with a wildcard.
175
- * Order user-specified requirements by the order they are specified.
176
- * If equal, prefers "non-free" requirements, i.e. contains at least one
163
+ only consider them until there are no longer any resolution conflicts
164
+
165
+ Pip's current implementation of the provider implements ` get_preference `
166
+ for known requirements with the following preferences in following order:
167
+
168
+ * Any requirement that is "direct", e.g., points to an explicit URL.
169
+ * Any requirement that is "pinned", i.e., contains the operator `` === ``
170
+ or `` == `` without a wildcard.
171
+ * Any requirement that imposes an upper version limit, i.e., contains the
172
+ operator `` < `` , `` <= `` , `` ~= `` , or `` == `` with a wildcard. Because
173
+ pip prioritizes the latest version, preferring explicit upper bounds
174
+ can rule out infeasible candidates sooner. This does not imply that
175
+ upper bounds are good practice; they can make dependency management
176
+ and resolution harder.
177
+ * Order user-specified requirements as they are specified, placing
178
+ other requirements afterward.
179
+ * Any "non-free" requirement, i.e., one that contains at least one
177
180
operator, such as `` >= `` or `` != `` .
178
- * If equal, order alphabetically for consistency (helps debuggability).
181
+ * Alphabetical order for consistency (aids debuggability).
0 commit comments