Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.0.0 #1092

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,87 @@ CLI command and its behaviour. There are no guarantees of stability for the

<!-- protokolo-section-tag -->

## 5.0.0 - 2024-10-17

This is a big release for a small change set. With this release, the tool
becomes compatible with
[REUSE Specification 3.3](https://reuse.software/spec-3.3), which is a very
subtly improved release of the much bigger version 3.2.

### Added

- More file types are recognised:
- Cabal (`.cabal`, `cabal.project`) (#1089, #1090)
- `.envrc` (#1061)
- `.flake.lock` (#1061)
- Ansible Jinja2 (`.j2`) (#1036)
- Poetry lock file (`poetry.lock`) (#1037)
- Added `lint-file` subcommand to enable running lint on specific files. (#1055)
- Added shell completion via `click`. (#1084)
- Added Jujutsu VCS support. (#TODO)
- Added new copyright prefixes `spdx-string`, `spdx-string-c`, and
`spdx-string-symbol`. (#979)

### Changed

- Bumped REUSE Specification version to
[version 3.3](https://reuse.software/spec-3.3). (#1069)
- Switched from `argparse` to `click` for handling the CLI. The CLI should still
handle the same, with identical options and arguments, but some stuff changed
under the hood. (#1084)

Find here a small list of differences:

- `-h` is no longer shorthand for `--help`.
- `--version` now outputs "reuse, version X.Y.Z", followed by a licensing
blurb on different paragraphs.
- Some options are made explicitly mutually exclusive, such as `annotate`'s
`--skip-unrecognised` and `--style`, and `download`'s `--output` and
`--all`.
- Subcommands which take a list of things (files, license) as arguments, such
as `annotate`, `lint-file`, or `download`, now also allow zero arguments.
This will do nothing, but can be useful in scripting.
- `annotate` and `lint-file` now also take directories as arguments. This will
do nothing, but can be useful in scripting.

- Changes to comment styles:
- Allow Python-style comments in Cargo.lock files. (#1060)
- `.s` files (GNU as) now use the C comment style. (#1034)
- `.ld` files (GNU ld) now use the C comment style. (#1034)
- `REUSE.toml` no longer needs a licensing header. (#1042)
- `.gitkeep` is no longer ignored, because this is not defined in the
specification. However, if `.gitkeep` is a 0-size file, it will remain ignored
(because 0-size files are ignored). (#1043)
- If `REUSE.toml` is ignored by VCS, the linter no longer parses this file.
(#1047)
- SPDX license and exception list updated to v3.25.0.
- More `LICENSE` and `COPYING`-like files are ignored. Now, such files suffixed
by `-anything` are also ignored, typically something like `LICENSE-MIT`. Files
with the UK spelling `LICENCE` are also ignored. (#1041)

### Removed

- Python 3.8 support removed. (#1080)

### Fixed

- In `REUSE.toml`, fixed the globbing of a single asterisk succeeded by a slash
(e.g. `directory-*/foo.py`). The glob previously did nothing. (#1078)
- Increased the minimum requirement of `attrs` to `>=21.3`. Older versions do
not import correctly. (#1044)
- Performance greatly improved for projects with large directories ignored by
VCS. (#1047)
- Performance slightly improved for large projects. (#1047)
- The plain output of `lint` has been slightly improved, getting rid of an
errant newline. (#1091)
- `reuse annotate --merge-copyrights` now works more reliably with copyright
prefixes. This still needs some work, though. (#979)
- In some scenarios, where a user has multiple `REUSE.toml` files and one of
those files could not be parsed, the wrong `REUSE.toml` was signalled as being
unparseable. This is now fixed. (#1047)
- Fixed a bug where `REUSE.toml` did not correctly apply its annotations to
files which have an accompanying `.license` file. (#1058)

## 4.0.3 - 2024-07-08

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ possible, run `poetry lock --no-update`.

## Release checklist

- Verify changelog
- Create branch release-x.y.z
- `bumpver update --set-version vx.y.z`
- `make update-resources`
- `protokolo compile -f version x.y.z`
- Alter changelog
- Do some final tweaks/bugfixes (and alter changelog)
- `make test-release`
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Git. This uses [pre-commit](https://pre-commit.com/). Once you
```yaml
repos:
- repo: https://github.com/fsfe/reuse-tool
rev: v4.0.3
rev: v5.0.0
hooks:
- id: reuse
```
Expand All @@ -263,7 +263,7 @@ use the following configuration:
```yaml
repos:
- repo: https://github.com/fsfe/reuse-tool
rev: v4.0.3
rev: v5.0.0
hooks:
- id: reuse-lint-file
```
Expand All @@ -272,9 +272,9 @@ repos:

In order to enable shell completion, you need to generate the shell completion
script. You do this with `_REUSE_COMPLETE=bash_source reuse`. Replace `bash`
with `zsh` or `fish` as needed, or any other shells supported by the
Python`click` library. You can then source the output in your shell rc file,
like so (e.g.`~/.bashrc`):
with `zsh` or `fish` as needed, or any other shells supported by the Python
`click` library. You can then source the output in your shell rc file, like so
(e.g.`~/.bashrc`):

```bash
eval "$(_REUSE__COMPLETE=bash_source reuse)"
Expand Down
2 changes: 0 additions & 2 deletions changelog.d/added/comment-cabal.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/added/comment-flake-envrc.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/added/comment-j2.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/added/completion.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/added/jujutsu.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/added/lint-file.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/added/new-prefixes.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/added/poetry.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/changed/00_spec-3.3.md

This file was deleted.

17 changes: 0 additions & 17 deletions changelog.d/changed/click.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/changed/comment-cargo-lock.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/changed/comment_gnu_as.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/changed/comment_gnu_ld.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/changed/no-license-reuse-toml.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/changed/remove-gitkeep.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/changed/reuse-toml-ignored.md

This file was deleted.

6 changes: 0 additions & 6 deletions changelog.d/changed/unspecly-changes.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/fixed/glob.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/fixed/license-overriding-global-name.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/fixed/min-version-attrs.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/fixed/performance.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/fixed/plain-format-output-new-line-fix.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/fixed/prefix-merge.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/fixed/source-bug.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/removed/python-3.8.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# The full version, including alpha/beta/rc tags.
release = get_version("reuse")
except PackageNotFoundError:
release = "4.0.3"
release = "5.0.0"

# The short X.Y.Z version.
version = ".".join(release.split(".")[:3])
Expand Down
1 change: 1 addition & 0 deletions docs/man/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ information about the functioning of the tool.
reuse-convert-dep5
reuse-download
reuse-lint
reuse-lint-file
reuse-spdx
reuse-supported-licenses
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[tool.poetry]
name = "reuse"
version = "4.0.3"
version = "5.0.0"
description = "reuse is a tool for compliance with the REUSE recommendations."
authors = [
"Free Software Foundation Europe <[email protected]>",
Expand Down Expand Up @@ -106,7 +106,7 @@ requires = ["poetry-core>=1.1.0"]
build-backend = "poetry.core.masonry.api"

[bumpver]
current_version = "v4.0.3"
current_version = "v5.0.0"
version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "Bump version: {old_version} → {new_version}"
tag_message = "{new_version}"
Expand Down
12 changes: 1 addition & 11 deletions src/reuse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
__version__ = version("reuse")
except PackageNotFoundError:
# package is not installed
__version__ = "4.0.3"
__version__ = "5.0.0"

__author__ = "Carmen Bianca Bakker"
__email__ = "[email protected]"
Expand All @@ -45,16 +45,6 @@

_LICENSING = Licensing()

_PACKAGE_PATH = os.path.dirname(__file__)
_LOCALE_DIR = os.path.join(_PACKAGE_PATH, "locale")

if gettext.find("reuse", localedir=_LOCALE_DIR):
gettext.bindtextdomain("reuse", _LOCALE_DIR)
gettext.textdomain("reuse")
_LOGGER.debug("translations found at %s", _LOCALE_DIR)
else:
_LOGGER.debug("no translations found at %s", _LOCALE_DIR)


class SourceType(Enum):
"""
Expand Down
Loading
Loading