psf / psf/requests

Drop the versionless `License ::` classifier now that `license` is a valid SPDX expression

Open Beginner friendly
#7,610 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
54.3k
Forks
10.4k
Avg merge
16h 43m
Merged PRs (30d)
3

Description

This issue is part of a larger batch of similar-scoped issues we distribute in the context of our internal vulnerability and dependency tracking activities. The batch covers multiple projects, this is only one of them. The goal is to rise awareness and trigger/initiate the change towards clean project metadata in projects we depend on.

Summary

This project already declares a valid SPDX license id/expression in its packaging metadata (License: Apache-2.0 in the built METADATA), but the deprecated classifier License :: OSI Approved :: Apache Software License is still present. That classifier has no version and PEP 639-aware SBOM tooling like cyclonedx-bom can't map it to an SPDX id, so it falls back to emitting the raw classifier text as a free-text license name. This free-text field is just noise and causes downstream tooling to flag this project as non-SPDX-compliant.

Suggested fix

Remove the redundant License :: OSI Approved :: Apache Software License from classifiers in the packaging config. No change to the license field is needed.

How to reproduce

uv tool install cyclonedx-bom
uv venv .venv-repro
uv pip install --python .venv-repro/bin/python requests
cyclonedx-py environment .venv-repro -o sbom.cdx.json

... and then check the .licenses property of the component. There should only something like:

// This is how it should look like
...
    "license": {
        "acknowledgement": "declared",
        "id": "<VALID SPDX IDENTIFIER>"
    }
...

and not:

// This is how it should not look like
...
    "license": {
       "acknowledgement": "declared",
       "name": "<CLASSIFIER TAKEN FROM METADATA"
    }
...

I'm happy to provide a PR to resolve this timely after approval!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the packaging configuration and the classifiers that produce the built METADATA. Remove the versionless Apache Software License classifier while leaving the existing SPDX license field unchanged. Rebuild the package and run the provided cyclonedx-bom reproduction to confirm the component reports only the valid SPDX license identifier.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.