Skip to content

Add the two zero-condition licenses to the SPDX index - #388

Merged
Paebbels merged 1 commit into
devfrom
claude/spdx-zero-clause
Sep 6, 2026
Merged

Paebbels merged 1 commit into
devfrom
claude/spdx-zero-clause

Conversation

@pytooling-claude

Copy link
Copy Markdown

New Features

  • ✨ pyTooling.Licensing knows the two zero-condition licenses: 0BSD (BSD Zero Clause License) and
    MIT-0 (MIT No Attribution), taking SPDX_INDEX from 23 to 25 entries. Both are reachable as
    Zero_Clause_BSD and MIT_0_License, and both resolve from their Python classifier
    (License :: OSI Approved :: Zero-Clause BSD (0BSD) and
    License :: OSI Approved :: MIT No Attribution License (MIT-0)).

Bug Fixes

  • pyTooling.Licensing: four packages in pyTooling's own dependency closure could not be resolved despite
    publishing exactly what PEP 639 asks for
    , because the index did not know
    the identifier they name:

    package publishes was
    cffi license_expression: MIT-0 LicenseExpressionError: … names unknown license 'MIT-0'
    chardet license_expression: 0BSD … names unknown license '0BSD'
    roman-numerals license_expression: 0BSD OR CC0-1.0 … names unknown license '0BSD'
    sphinxcontrib-jquery a LICENCE file carrying the Zero-Clause BSD text unresolved

    A license override could not answer for these either: an override value goes through the same
    LicenseExpression.Parse, so 0BSD was unwritable anywhere. All four resolve now.

    The OSI and FSF flags come from the SPDX license list, which marks both
    OSI-approved and neither FSF-libre — matching how CC0-1.0 is already recorded (osi=False, fsf=True).
    Both were added to OSI_LICENSE_URLS as well, since LicenseURLs asserts that an OSI-approved license has an
    OSI page.

Unit Tests

  • The existing parameterised licensing tests cover the two new entries automatically — subtests rise from 393 to
    403, and test_AnOSIURLExistsExactlyWhenOSIApproved is what caught the missing OSI URLs.

Related Issues and Pull-Requests

'SPDX_INDEX' held 23 licenses and neither '0BSD' nor 'MIT-0', so four packages
in pyTooling's own dependency closure could not be resolved despite publishing
exactly what PEP 639 asks for:

  cffi                  license_expression: MIT-0
  chardet               license_expression: 0BSD
  roman-numerals        license_expression: 0BSD OR CC0-1.0
  sphinxcontrib-jquery  a LICENCE file with the Zero-Clause BSD text

An override file could not answer for them either, because an override value is
parsed by the same parser.

The OSI and FSF flags are taken from the SPDX license list, which marks both
OSI-approved and neither FSF-libre. Both carry a Python classifier, so they are
added to 'PYTHON_LICENSE_NAMES' too, and both have an OSI page, which
'LicenseURLs' requires of every OSI-approved license.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@pytooling-claude
pytooling-claude Bot requested a review from Paebbels as a code owner September 6, 2026 20:43
@pytooling-claude pytooling-claude Bot added this to the v10.0 milestone Sep 6, 2026
@pytooling-claude pytooling-claude Bot added bug Something isn't working Licensing labels Sep 6, 2026
@codacy-production

codacy-production Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (04d6550) 12786 10813 84.57%
Head commit (eba608b) 12788 (+2) 10815 (+2) 84.57% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#388) 2 2 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.48%. Comparing base (04d6550) to head (eba608b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #388   +/-   ##
=======================================
  Coverage   81.47%   81.48%           
=======================================
  Files          56       56           
  Lines       12786    12788    +2     
  Branches     1951     1951           
=======================================
+ Hits        10418    10420    +2     
  Misses       1973     1973           
  Partials      395      395           
Flag Coverage Δ
unittests 81.48% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Paebbels
Paebbels merged commit 6030849 into dev Sep 6, 2026
66 checks passed
@Paebbels
Paebbels deleted the claude/spdx-zero-clause branch September 6, 2026 22:59
@pytooling-claude pytooling-claude Bot mentioned this pull request Sep 19, 2026
This was referenced Oct 12, 2026
This was referenced Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Licensing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants