Skip to content

Python projects with a PEP 639 license expression but no license trove classifier are incorrectly flagged as not having a license #3576

Description

@edgarrmondragon

For example, anyio:

$ curl -s https://pypi.org/pypi/anyio/json | jq '.info.classifiers' | grep License
$ curl -s https://pypi.org/pypi/anyio/json | jq '.info.license'
null
$ curl -s https://pypi.org/pypi/anyio/json | jq '.info.license_expression'
"MIT"

Currently, only the info.license and classifiers fields are used to extract license information:

def licenses
license.presence || license_classifiers
end

def license
@data.dig("info", "license")
end
def license_classifiers
license_classifiers = classifiers.select { |c| c.start_with?("License :: ") }
license_classifiers.map { |l| l.split(":: ").last }.join(",")
end

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions