Due to pypa/setuptools#4759 , an extremely large number of wheels fails metadata validation.
In a venv of around 800 packages I had lying around, about 75% of them have metadata that fails validation for this reason.
| File ".../python3.11/site-packages/packaging/metadata.py", line 752, in from_raw
| raise ExceptionGroup("invalid metadata", exceptions)
| ExceptionGroup: invalid metadata (1 sub-exception)
+-+---------------- 1 ----------------
| packaging.metadata.InvalidMetadata: license-file introduced in metadata version 2.4, not 2.1
+------------------------------------
It seems like it will take many years for this to be long ago enough that this stops being a regular issue for people who want to parse metadata (the setuptools issue is open; I learnt today that I uploaded a wheel with METADATA that fails validation today).
Given the widespread prevalence, should packaging.metadata have some (kwarg opt-out/in) special handling of License-File presence in metadata version 2.1, beyond just turning validation off entirely?
Due to pypa/setuptools#4759 , an extremely large number of wheels fails metadata validation.
In a venv of around 800 packages I had lying around, about 75% of them have metadata that fails validation for this reason.
It seems like it will take many years for this to be long ago enough that this stops being a regular issue for people who want to parse metadata (the setuptools issue is open; I learnt today that I uploaded a wheel with METADATA that fails validation today).
Given the widespread prevalence, should
packaging.metadatahave some (kwarg opt-out/in) special handling ofLicense-Filepresence in metadata version 2.1, beyond just turning validation off entirely?