diff --git a/beets/util/pipeline.py b/beets/util/pipeline.py index d338cb51b..f4cc23819 100644 --- a/beets/util/pipeline.py +++ b/beets/util/pipeline.py @@ -75,8 +75,8 @@ def _invalidate_queue(q, val=None, sync=True): q._qsize = _qsize q._put = _put q._get = _get - q.not_empty.notifyAll() - q.not_full.notifyAll() + q.not_empty.notify_all() + q.not_full.notify_all() finally: if sync: diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 6e0439271..800e0302a 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -560,7 +560,8 @@ def scrape_lyrics_from_html(html): html = _scrape_merge_paragraphs(html) # extract all long text blocks that are not code - soup = try_parse_html(html, parse_only=SoupStrainer(text=is_text_notcode)) + soup = try_parse_html(html, + parse_only=SoupStrainer(string=is_text_notcode)) if not soup: return None diff --git a/test/test_art.py b/test/test_art.py index b32285e70..615682a53 100644 --- a/test/test_art.py +++ b/test/test_art.py @@ -336,8 +336,7 @@ class AAOTest(UseThePlugin): super().run(*args, **kwargs) def mock_response(self, url, body): - responses.add(responses.GET, url, body=body, content_type='text/html', - match_querystring=True) + responses.add(responses.GET, url, body=body, content_type='text/html') def test_aao_scraper_finds_image(self): body = """ diff --git a/test/test_player.py b/test/test_player.py index 9179fb2e1..7a4e85b17 100644 --- a/test/test_player.py +++ b/test/test_player.py @@ -35,8 +35,10 @@ import confuse # Mock GstPlayer so that the forked process doesn't attempt to import gi: from unittest import mock -import imp -gstplayer = imp.new_module("beetsplug.bpd.gstplayer") +import importlib.util +gstplayer = importlib.util.module_from_spec( + importlib.util.find_spec("beetsplug.bpd.gstplayer") +) def _gstplayer_play(*_): # noqa: 42 bpd.gstplayer._GstPlayer.playing = True return mock.DEFAULT