Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow some mutually exclusive same name deps #234

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/poetry_plugin_export/walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_project_dependencies(
# Put higher versions first so that we prefer them.
for packages in packages_by_name.values():
packages.sort(
key=lambda package: package.version,
key=lambda package: package.version.without_local(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not feel like a valid fix. I think it is not sufficient to group packages by name. Probably, they should be grouped by name and source. Then, the correct locked package can be chosen no matter what's the order in the lockfile.

reverse=True,
)

Expand Down
1 change: 1 addition & 0 deletions tests/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
MARKER_PY37 = parse_marker('python_version >= "3.7" and python_version < "4.0"')

MARKER_PY = MARKER_PY27.union(MARKER_PY36)
MARKER_PY27_PY36_ONLY = MARKER_PY27.union(MARKER_PY36_ONLY)

MARKER_PY_WIN32 = MARKER_PY.intersect(MARKER_WIN32)
MARKER_PY_WINDOWS = MARKER_PY.intersect(MARKER_WINDOWS)
Expand Down
Loading