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 Jul 13, 2022
1 parent 92dde5b commit f728412
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 @@ -272,8 +272,9 @@ def __walk_dependencies(
requirement.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 f728412

Please sign in to comment.