Skip to content

Conversation

@bblommers
Copy link
Contributor

Motivation

Followup to #12455

I originally made this same change in Moto, but PyPi actually rejects this License-Expression with the following error:

ERROR HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
'License-Expression :: OSI Approved :: Apache Software License' is not
a valid classifier. See https://packaging.python.org/specifications/core-metadata for more information.

The reason: even though PEP 639 talks about the License-Expression field, that is actually a Core Metadata field. And a Core Metadata field is described as:

A single key-value pair (or sequence of such with the same name, for multiple-use fields) defined in the Core Metadata spec and stored in the Built Metadata. Notably, distinct from a Pyproject Metadata Key.

So the Core Metadata is part of the build output - it is not part of the original project metadata.

The Licensing Examples make it more clear that licenses should be part of the project.license field, instead of setting it as a clarifier.

The Moto release passes with this change.

Note

The old version (Apache Software License) is ambiguous, so I assumed that it should be interpreted as Apache 2.0. Snyk has a handy guide to explain Apache 2.0 and the difference with the original 1.0 version:
https://snyk.io/articles/apache-license/

@bblommers bblommers added the semver: patch Non-breaking changes which can be included in patch releases label Apr 6, 2025
@bblommers bblommers added this to the Playground milestone Apr 6, 2025
@bblommers bblommers requested review from alexrashed and silv-io April 6, 2025 20:16
@bblommers bblommers force-pushed the bblommers-patch-1 branch from 3126e7b to bd5208f Compare April 6, 2025 21:58
@github-actions
Copy link

github-actions bot commented Apr 6, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 52m 15s ⏱️ +20s
4 325 tests ±0  3 981 ✅ ±0  344 💤 ±0  0 ❌ ±0 
4 327 runs  ±0  3 981 ✅ ±0  346 💤 ±0  0 ❌ ±0 

Results for commit bd5208f. ± Comparison against base commit 30a0d92.

@alexrashed alexrashed marked this pull request as ready for review April 7, 2025 06:26
Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Thanks a lot for jumping on this! I'll move forward with this directly, as it seems that this is blocking dev release publishing completely right now.
Concerning Apache 1 VS 2: We explicitly state version 2 in our license file, so yes, we do use Apache License version 2.0 for this project.

@alexrashed alexrashed merged commit 7dc21bd into master Apr 7, 2025
29 of 30 checks passed
@alexrashed alexrashed deleted the bblommers-patch-1 branch April 7, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants