Skip to content

Commit

Permalink
don't export unwanted extras
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Jun 9, 2022
1 parent 2afe984 commit 891aee6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/poetry/packages/locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ def __walk_dependencies(
requirement.set_constraint(constraint)

for require in locked_package.requires:
if require.in_extras and locked_package.features.isdisjoint(
require.in_extras
if require.is_optional() and not any(
require in locked_package.extras[feature]
for feature in locked_package.features
):
continue

Expand Down

0 comments on commit 891aee6

Please sign in to comment.