Closed cdce8p closed 1 week ago
That's not true actually, PyPI hard rejects such uploads which is why I pushed the fix over the weekend https://github.com/pypa/hatch/issues/1786
That's not true actually, PyPI hard rejects such uploads which is why I pushed the fix over the weekend #1786
Interesting 🤔 I've definitely seen projects which for which the upload with License-Expression
worked. Seems to be a side effect of the added validation in packaging 24.2
that it now also checks the field against the metadata version.
Would the backfill to the License
field make sense? The PR for PyPI seems to be ready but I'm not sure how long it will take until it's actually merged. https://github.com/pypi/warehouse/pull/16949
I'm not exactly against the backfill idea but are you able to wait <2 weeks until that is merged? One of the maintainers said that it would be merged "in the next week or so".
Just saw #1805. Thanks a lot!
That's not true actually, PyPI hard rejects such uploads which is why I pushed the fix over the weekend #1786
I tried to reproduce it today, just because I'm involved with the setuptools implementation of PEP 639, but couldn't. The upload to PyPI even with License-Expression
, License-File
and Metadata-Version: 2.3
worked fine for me. Not sure what caused #1786.
Setuptools (currently) includes a non-spec version of License-File
and I haven't seen any issues for that either.
That's not true actually, PyPI hard rejects such uploads which is why I pushed the fix over the weekend #1786
I tried to reproduce it today, just because I'm involved with the setuptools implementation of PEP 639, but couldn't. The upload to PyPI even with
License-Expression
,License-File
andMetadata-Version: 2.3
worked fine for me. Not sure what caused #1786.
To be clear. It fails the metadata validation with packaging==24.2
but that doesn't seem to be deployed to (all) PyPI servers yet ..?
deployed to (all) PyPI servers yet
Oh good point! The rollout might be gradual which would explain the inconsistent error.
A few projects I know have started to adopt the new
project.license
syntax recommended in the docs https://hatch.pypa.io/1.9/config/metadata/#license. Withhatchling==1.25.0
this would include aLicense-Expression
key in theMETADATA
file.This was change in #1790 + #1792 and now these project neither include
License-Expression
nor the "old"License
key meaning the license information (which is specified correctly) is just lost.I understand that technically
License-Expression
is only added with metadata version2.4
which isn't supported by PyPI yet. However, it's fine to still include it in older versions as well (it will just get ignored by PyPI and not be validated on upload). The isn't a big issue though as hatchling already validates it.If that's not an option, might I recommend to backfill the
License
key with the SPDX expression instead (temporarily). That would be equivalent to using the "old" syntax with textproject = {text = "MIT"}
. I don't think it makes much sense for projects to revert back to the old syntax themselves only to change it again once support for PyPI lands.