fix: parsing metadata with inline licenses#2806
Conversation
| Requires-Dist: bar; extra == "all" | ||
| Provides-Extra: all | ||
|
|
||
| Requires-Dist: this will be ignored |
There was a problem hiding this comment.
I think that it is probably more sensible to not ignore this line when parsing METADATA. I think the number of packages that will have Requires-Dist: in their description will be relatively small or non-existent, so it is better to go with that assumption at first.
There was a problem hiding this comment.
No, let's not do that for now since, the two packages referenced in the issue will be handled by the fix here, e.g.: https://pypi-browser.org/package/mlflow/mlflow-2.22.0rc0-py3-none-any.whl/mlflow-2.22.0rc0.dist-info/METADATA
There was a problem hiding this comment.
yea i was thinking that too, also as evidence by the previous parsing implementation parsed the whole file
The wheel `METADATA` parsing implemented in 1.4 missed the fact that whitespace is significant and sometimes License is included inline in the `METADATA` file itself. This change ensures that we stop parsing the `METADATA` file only on first completely empty line. Fixes #2796 --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com> (cherry picked from commit 1d69ad6)
|
Thanks for the quick fix @keith the issue looks resolved on my side! |
The wheel
METADATAparsing implemented in 1.4 missed the factthat whitespace is significant and sometimes License is included
inline in the
METADATAfile itself.This change ensures that we stop parsing the
METADATAfile onlyon first completely empty line.
Fixes #2796