Skip to content

Commit ead674b

Browse files
dimblebyCopilot
andauthored
fix: check all extras in version solver dependency filter (#10798)
in_extras[0] only checked the first extra. Dependencies tied to multiple extras were undercounted when requested via a secondary extra, affecting resolution priority ordering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 95cd84c commit ead674b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/poetry/mixology/version_solver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,8 @@ def _get_comp_key(self, dependency: Dependency) -> CompKey:
535535
relevant_dependencies = [
536536
r
537537
for r in package.requires
538-
if not r.in_extras or r.in_extras[0] in dependency.extras
538+
if not r.in_extras
539+
or any(extra in dependency.extras for extra in r.in_extras)
539540
]
540541
has_deps = bool(relevant_dependencies)
541542
num_deps_upper_bound = sum(

0 commit comments

Comments
 (0)