Skip to content

Fix multiple Python requirements separated by whitespace#5735

Merged
jeffwidman merged 1 commit intomainfrom
deivid-rodriguez/odd-poetry-reqs
Sep 17, 2022
Merged

Fix multiple Python requirements separated by whitespace#5735
jeffwidman merged 1 commit intomainfrom
deivid-rodriguez/odd-poetry-reqs

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

Standard Python does not support this, but Poetry does, so when they appear on Poetry dependency files, they make dependabot crash.

Fixes #5363.

Copy link
Copy Markdown
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Given that these are non-standard and only supported by poetry, I'd suggest adding code comments for each of these three code blocks. Something simple like:

# Standard python doesn't support whitespace in requirements, but Poetry does.

I realize it's in the commit log, but still it's too easy to not understand why this is needed in the logic / tests otherwise.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/odd-poetry-reqs branch from 29b9e2e to 9807a0e Compare September 15, 2022 23:16
@jeffwidman
Copy link
Copy Markdown
Member

also, why did poetry go this route? 🤦

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/odd-poetry-reqs branch from 9807a0e to 1f74249 Compare September 15, 2022 23:22
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I have no idea, but seems much better than Python ignoring (but not erroring out) all requirements after the first if you don't split them with commas 🤯.

Standard Python does not support this, but Poetry does, so when they
appear on Poetry dependency files, they make dependabot crash.
@jeffwidman jeffwidman force-pushed the deivid-rodriguez/odd-poetry-reqs branch from 1f74249 to aaf292f Compare September 17, 2022 07:54
@jeffwidman jeffwidman merged commit 252cb9a into main Sep 17, 2022
@jeffwidman jeffwidman deleted the deivid-rodriguez/odd-poetry-reqs branch September 17, 2022 08:11
@pavera pavera mentioned this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: python:poetry Python packages via poetry

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Dependabot fails to parse a more complex poetry dependency

2 participants