Skip to content

Commit

Permalink
feat: no strict dep5 parsing
Browse files Browse the repository at this point in the history
Since version 0.1.47 of python-debian the dep5 parsing is strict. This is
causing issues for certain users that have multiple Copyright statements in
their Dep5 file. Disablng strictness removes the issue for those users.

Closes #803

Signed-off-by: Nico Rikken <nico.rikken@fsfe.org>
  • Loading branch information
nicorikken committed Jul 19, 2023
1 parent a86a96a commit d1a6368
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/reuse/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _copyright(self) -> Optional[Copyright]:
copyright_path = self.root / ".reuse/dep5"
try:
with copyright_path.open(encoding="utf-8") as fp:
self._copyright_val = Copyright(fp)
self._copyright_val = Copyright(fp, strict=False)
except OSError:
_LOGGER.debug("no .reuse/dep5 file, or could not read it")
except DebianError:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def dep5_copyright():
with (RESOURCES_DIRECTORY / "fake_repository/.reuse/dep5").open(
encoding="utf-8"
) as fp:
return Copyright(fp)
return Copyright(fp, strict=False)


@pytest.fixture()
Expand Down

0 comments on commit d1a6368

Please sign in to comment.