-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix misuse of pretty_constraint, fix downstream test (poetry-core) #4932
Merged
neersighted
merged 1 commit into
python-poetry:master
from
radoering:fix-pretty-constraint-misuse
Jan 23, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you walk me through this set of changes and why they are needed? I can follow the line-by-line, but I'm not sure I'm groking the bigger picture.
Also, this file is going to be removed in favor of the exporter plugin. Can you please make a PR against that repo as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are wondering: I accidentally deleted my branch while porting the fix to the exporter plugin. Sorry about that. 😅
The changes in
exporter.py
are required becauseget_project_dependency_packages
returns objects of typeDependencyPackage
, which consist of aDependency
and aPackage
. There can be multiple dependency packages containing the same package for different dependencies, e.g. packagea(1.1)
for dependencya(>=1.0)
with markerssys_platform == "win32"
and packagea(1.1)
for dependencya(>=1.1)
with markerssys_platform == "linux"
. The changes are required in order to receive only one entry fora==1.1
in requirements.txt instead of two entries with different markers.This behaviour can be observed in the following test cases:
test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers
expected:
without changes:
test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any
expected:
without changes:
test_exporter_can_export_requirements_txt_pyinstaller
expected:
without changes: