@@ -132,6 +132,8 @@ operations:
132
132
* ` get_preference ` - this provides information to the resolver to help it choose
133
133
which requirement to look at "next" when working through the resolution
134
134
process.
135
+ * ` narrow_requirement_selection ` - this provides a way to limit the number of
136
+ identifiers passed to ` get_preference ` .
135
137
* ` find_matches ` - given a set of constraints, determine what candidates exist
136
138
that satisfy them. This is essentially where the finder interacts with the
137
139
resolver.
@@ -140,19 +142,26 @@ operations:
140
142
* ` get_dependencies ` - get the dependency metadata for a candidate. This is
141
143
the implementation of the process of getting and reading package metadata.
142
144
143
- Of these methods, the only non-trivial one is the ` get_preference ` method. This
144
- implements the heuristics used to guide the resolution, telling it which
145
- requirement to try to satisfy next. It's this method that is responsible for
146
- trying to guess which route through the dependency tree will be most productive.
147
- As noted above, it's doing this with limited information. See the following
148
- diagram
145
+ Of these methods, the only non-trivial ones are the ` get_preference ` and
146
+ ` narrow_requirement_selection ` methods. These implement heuristics used
147
+ to guide the resolution, telling it which requirement to try to satisfy next.
148
+ It's these methods that are responsible for trying to guess which route through
149
+ the dependency tree will be most productive. As noted above, it's doing this
150
+ with limited information. See the following diagram:
149
151
150
152
![ ] ( deps.png )
151
153
152
154
When the provider is asked to choose between the red requirements (A->B and
153
155
A->C) it doesn't know anything about the dependencies of B or C (i.e., the
154
156
grey parts of the graph).
155
157
158
+ Pip's current implementation of the provider implements
159
+ ` narrow_requirement_selection ` as follows:
160
+
161
+ * If Requires-Python is present only consider that
162
+ * If there are causes of resolution conflict (backtrack causes) then
163
+ only consider them until there are no longer any resolution conflicts
164
+
156
165
Pip's current implementation of the provider implements ` get_preference ` as
157
166
follows:
158
167
0 commit comments