Another incorrect py2 -> py3 translation. Since python 3 attached the
traceback to the exception, this should preserve the traceback without
needing to resort to sys.exc_info
This is an incorrect translation of a python 2 reraise to python 3.
With python 3, however, we can just rely on exception chaining to get
the traceback, so get rid of the complicated re-raising entirely, with
the additional benefit that the exception from the tear-down is also
shown.
A recent change in Sphinx introduced a new warning about missed extlink
opportunities:
https://github.com/sphinx-doc/sphinx/issues/10112
These warnings are causing spurious CI failures. Some of these
suggestions are good but many of them are not, and there is not
currently a way to disable the warning (globally or locally). So the
only workable solution currently seems to be to pin an old version of
Sphinx in CI for now. Hopefully there will be an option to disable this
in 4.4.1, at which point we can unpin.
- Clarify basic search behaviour in intro chapter of discogs plugin,
- and state change introduced in PR#4227 (discogs: Discogs query on
insufficiently tagged files)
- When files are missing both, album and artist tags, the Discogs metadata
plugin sends empty information to the Discogs API which returns arbitrary
query results.
- This patch catches this case and states it in beets import verbose output.
When the delete_originals was set, beets would print the following, regardless
of the presence of the quiet parameter:
convert: Removing original file /path/to/file.ext
This commit ensures that the log is only printed when quiet is not present.
The routing map translator `QueryConverter` was misconfigured:
* decoding (parsing a path): splitting with "/" as tokenizer
* encoding (translating back to a path): joining items with "," as separator
This caused queries containing more than one condition (separated by a
slash) to return an empty result. Queries with only a single condition
were not affected.
Instead the encoding should have used the same delimiter (the slash) for the
backward conversion.
How to reproduce:
* query: `/album/query/albumartist::%5Efoo%24/original_year%2B/year%2B/album%2B`
* resulting content in parsed argument `queries` in the `album_query` function:
* previous (wrong): `['albumartist::^foo$,original_year+,year+,album+']`
* new (correct): `['albumartist::^foo$', 'original_year+', 'year+', 'album+']`
This is mostly "defensive programming": clients *should* only call this
on bytestring paths, but just in case this gets called on a Unicode
string path, we should now not crash.
Fixes#4168. Also closes#4192, which it supersedes.
The original problem is that this implementation used bytestrings
incorrectly to invoke `mktemp`. However, `mktemp` is deprecated, so this
PR just avoids it altogether. Fortunately, the non-deprecated APIs in
`tempfile` support all-bytes arguments.