Skip to content

chore(sync): merge main into new-resolver-config - #1454

Merged
LalatenduMohanty merged 4 commits into
python-wheel-build:new-resolver-configfrom
LalatenduMohanty:sync/new-resolver-config-from-main-20261104
Nov 4, 2026
Merged

LalatenduMohanty merged 4 commits into
python-wheel-build:new-resolver-configfrom
LalatenduMohanty:sync/new-resolver-config-from-main-20261104

Conversation

@LalatenduMohanty

Copy link
Copy Markdown
Member

Merges main into new-resolver-config so #1414 is up to date before merging.

Brings in one change: the SPDX LicenseRef fix from #1452. The merge had no conflicts, and tests/test_pkgmetadata.py passes.

Please merge this with a merge commit (not squash), so the branch stays in sync with main.

🤖 Generated with Claude Code

mprpic and others added 4 commits November 4, 2026 14:02
`_parse_spdx()` skipped validation only when the whole expression
started with `LicenseRef-`. A valid PEP 639 expression such as
`MIT OR LicenseRef-Proprietary` was rejected, while
`LicenseRef-Foo OR Apache 2` and malformed ids like `LicenseRef-a_b`
were accepted.

It now parses without validation and rejects every unknown key that is
not a well-formed `LicenseRef-` id, raising the same `ExpressionError`
as before. This is needed to populate SBOM license fields (python-wheel-build#1378).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Martin Prpič <mprpic@redhat.com>
Validate with `packaging.licenses.canonicalize_license_expression()`
so `_parse_spdx()` follows PEP 639 exactly, and use license-expression
only to build the expression object. `Apache-2.0 WITH LicenseRef-x` is
now rejected and `licenseref-foo` accepted, matching `packaging`. The
exception type stays `ExpressionError`; its message now comes from
`packaging`.

The invalid-expression cases move to their own test that checks which
key was rejected, and new cases cover an exception next to a
`LicenseRef` and an unknown `WITH` exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Martin Prpič <mprpic@redhat.com>
…-licenseref

fix(pkgmetadata): accept LicenseRef anywhere in SPDX expressions
Bring in the SPDX `LicenseRef` fix from python-wheel-build#1452 so python-wheel-build#1414 is up to date
with main before merging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
@LalatenduMohanty
LalatenduMohanty requested a review from a team as a code owner November 4, 2026 21:30
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mergify mergify Bot added the ci label Nov 4, 2026
@mergify

mergify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@LalatenduMohanty
LalatenduMohanty merged commit 2d34b1a into python-wheel-build:new-resolver-config Nov 4, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants