Hm... PEP 621 deliberately doesn't have a replacement for `setuptools`'s `license`, but they do have a `license` key that is equivalent to `license_files`. Unfortunately, this is what PyPI does with the data in that field:
Not great.
@pganssle yeah in single-license projects I’ve replaced it but in the dual-license one the text is short enough that I can live with it until the relevant PEP is finalized. Hatch already supports it but then VS Code is whiny about license not being a dict.
@pganssle Oh no, that doesn't seem good... 😢
@hugovk I am not sure if you are supposed to use it that way, and that makes it so you have to choose between including the license file and having a meaningful short description of the license.
I'll probably just fall back to the setuptools config options.
@hugovk Either way it's a huge footgun. The thing everyone is going to think to do causes this problem.
@pganssle Aha, I'm using Hatchling which uses SPDX identifiers:
https://hatch.pypa.io/latest/config/metadata/#license
Which points to the draft #PEP639 – "Improving License Clarity with Better Package Metadata":
https://peps.python.org/pep-0639/
Hopefully it'll be submitted soon. 🤞
@hynek FYI, `structlog` seems to be affected by this.