Skip to content

Add decorator to license exceptions#171031

Closed
L0rdCha0s wants to merge 1 commit into
home-assistant:devfrom
L0rdCha0s:codex/decorator-license-exception
Closed

Add decorator to license exceptions#171031
L0rdCha0s wants to merge 1 commit into
home-assistant:devfrom
L0rdCha0s:codex/decorator-license-exception

Conversation

@L0rdCha0s
Copy link
Copy Markdown
Contributor

@L0rdCha0s L0rdCha0s commented May 17, 2026

Proposed change

Add decorator to the license audit exceptions.

decorator==5.3.0 is BSD-2-Clause licensed and ships LICENSE.txt, but the 5.3.0 wheel no longer exposes machine-readable license metadata (License, License-Expression, or license classifiers). The license audit therefore reports it as None -- None -- [].

Earlier decorator==5.2.1 wheels exposed License: BSD-2-Clause and License :: OSI Approved :: BSD License, so this started failing after the 5.3.0 release.

Validation performed:

  • ruff check script/licenses.py
  • ruff format --check script/licenses.py
  • git diff --check
  • verified a synthetic decorator==5.3.0 package definition is not metadata-approved but is covered by the exception

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: n/a
  • This PR is related to issue: n/a
  • Link to documentation pull request: n/a
  • Link to developer documentation pull request: n/a
  • Link to frontend pull request: n/a

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • I have followed the [perfect PR recommendations][perfect-pr]
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated for [www.home-assistant.io][docs-repository]

If the code communicates with devices, web services, or third-party tools:

  • The [manifest file][manifest-docs] has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

  • I have reviewed two other [open pull requests][prs] in this repository.

Copilot AI review requested due to automatic review settings May 17, 2026 21:15
@home-assistant home-assistant Bot added cla-signed small-pr PRs with less than 30 lines. labels May 17, 2026
@iMicknl iMicknl added the bugfix label May 17, 2026
@L0rdCha0s L0rdCha0s marked this pull request as ready for review May 17, 2026 21:41
@L0rdCha0s L0rdCha0s requested a review from a team as a code owner May 17, 2026 21:41
@balloob
Copy link
Copy Markdown
Member

balloob commented May 17, 2026

We should not add an exception for new dependencies or updates. It should be fixed in the dependency before we adopt it, or we can't adopt it.

@balloob balloob closed this May 17, 2026
@L0rdCha0s
Copy link
Copy Markdown
Contributor Author

We should not add an exception for new dependencies or updates. It should be fixed in the dependency before we adopt it, or we can't adopt it.

..Understood. To be clear: my PR didn't change this: CI picks this new version up automatically, so CI is currently broken for any PR that adds a dependency and triggers a full build in CI.

@balloob balloob reopened this May 17, 2026
@balloob
Copy link
Copy Markdown
Member

balloob commented May 17, 2026

Ah shoot. That sucks. We should report an issue upstream and pin a lower version for now.

@L0rdCha0s
Copy link
Copy Markdown
Contributor Author

Superseded by #171038, which pins decorator to 5.2.1 in constraints instead of adding a license exception.

@L0rdCha0s L0rdCha0s closed this May 17, 2026
@joostlek
Copy link
Copy Markdown
Member

To be fair, we've added exceptions for dependencies like this before

@L0rdCha0s
Copy link
Copy Markdown
Contributor Author

L0rdCha0s commented May 17, 2026

Your choice ultimately! I guess it depends on how responsive the maintainer of 'decorator' is.. if he adds the license, both this and #171038 become superfluous.

@MartinHjelmare
Copy link
Copy Markdown
Member

I think it's better to pin it so we avoid another CI failure when the package is fixed. Then we can handle it in our own time.

@L0rdCha0s
Copy link
Copy Markdown
Contributor Author

I think it's better to pin it so we avoid another CI failure when the package is fixed. Then we can handle it in our own time.

Yep - @balloob has now merged my alternate PR that does exactly that.

@github-actions github-actions Bot locked and limited conversation to collaborators May 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix cla-signed small-pr PRs with less than 30 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants