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

Fix crash when exported requirements contain Poetry warnings #392

Merged
merged 6 commits into from
Jun 11, 2021

Conversation

cjolowicz
Copy link
Owner

@cjolowicz cjolowicz commented Jun 11, 2021

This PR changes the Poetry.export helper to detect and remove warnings in the command output. Any warnings found are written to standard error, so the user can see them.

Background: Poetry writes warnings to standard output when exporting the requirements. This results in a parse error from packaging when it attempts to parse the warning as a requirement. A common case is the warning about an outdated lock file.

Fixes #349

@cjolowicz cjolowicz added the bug Something isn't working label Jun 11, 2021
@cjolowicz cjolowicz force-pushed the fix-crash-for-stale-lockfiles branch from b43c602 to d6101a0 Compare June 11, 2021 20:09
@cjolowicz cjolowicz force-pushed the fix-crash-for-stale-lockfiles branch from d6101a0 to 7753920 Compare June 11, 2021 21:03
@cjolowicz cjolowicz force-pushed the fix-crash-for-stale-lockfiles branch 2 times, most recently from 6a296c6 to 69ab716 Compare June 11, 2021 22:06
@cjolowicz cjolowicz force-pushed the fix-crash-for-stale-lockfiles branch from 69ab716 to 911c8e3 Compare June 11, 2021 22:16
@cjolowicz cjolowicz merged commit f2890b1 into main Jun 11, 2021
@cjolowicz cjolowicz deleted the fix-crash-for-stale-lockfiles branch June 11, 2021 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporting requirements raises when the lock file is out of date
1 participant