In commit 508d28f66b the package `beets.test` was introduced.
But it was not added to the list of packages in `setup.py`.
Thus, it was not part of a beets installation for now.
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
The import path mangling is not relevant (anymore?) for the two
ways of running tests:
* `python3 test/testall.py` (see CONTRIBUTING.rst):
The `testall.py` script already adds the project path to `sys.path`.
* `tox -e py-cov`: this command is supposed to be run from the project
path. Thus, the current directory is already the first of location
in `sys.path`.
The previous mangling of the import path while loading a module could
lead to unwanted side-effects hidden in an unexpected location.
Instead, import path mangling should take place in the script being
called by the user (here: `testall.py`).
In cf69cad56f the Sphinx version was pinned to "<4.4.0".
The issue at that time (a spurious warning) is described in:
https://github.com/sphinx-doc/sphinx/issues/10112
The problematic check was removed in Sphinx v4.5:
https://www.sphinx-doc.org/en/master/changes.html#id334
The issue of spurious warnings was finally fixed in v5.x:
https://github.com/sphinx-doc/sphinx/pull/10137
Technically it would be suitable to add a negative version pin of Sphinx
for "4.4".
But that version is quite outdated and at least Debian never shipped
Sphinx v4.4 in a stable release.
We force sphinx to be at least v5 in order to fix an unrelated recent
compatibility requirement of `sphinxcontrib.applehelp`.
- avoids the mawk-specific {,n} regex operator
- a directly usable sqlite3 output format is selected explicitly, when retrieving suggestions for field values; this avoids the previously used GNU-sed-specific post-processing of the sqlite3 output
- completion caching is enabled for the beet command and its parameter contexts, even if not enabled globally by the user; caching is required for field value suggestions
Sometimes, there are other playlists that are created (e.g., Top Missed Recordings of 2023, Top Discoveries of 2023). Right now, I am excluding these. We may want to address them separately.