Skip to content

Commit

Permalink
prefer to use _features than _extras
Browse files Browse the repository at this point in the history
anticipating that
<python-poetry/poetry-core#370> will remove
_extras
  • Loading branch information
dimbleby committed May 25, 2022
1 parent 53f2d42 commit 1a14e91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/poetry/packages/locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def __walk_dependencies(
extras = requirement.extras
requirement = locked_package.to_dependency()
requirement.marker = requirement.marker.intersect(marker)
requirement._extras = extras
requirement._features = extras

requirement.set_constraint(constraint)

Expand All @@ -289,7 +289,7 @@ def __walk_dependencies(
combined_requirement.marker = combined_requirement.marker.union(
requirement.marker
)
combined_requirement._extras |= requirement.extras
combined_requirement._features |= requirement._features

return nested_dependencies

Expand Down Expand Up @@ -370,8 +370,8 @@ def get_project_dependency_packages(
project_requires=selected,
locked_packages=repository.packages,
):
if dependency.extras:
package = package.with_features(dependency.extras)
if dependency.features:
package = package.with_features(dependency.features)

yield DependencyPackage(dependency=dependency, package=package)

Expand Down

0 comments on commit 1a14e91

Please sign in to comment.