Merge pull request #4450 from beetbox/deprecations

Resolve some deprecation warnings
This commit is contained in:
Adrian Sampson 2022-08-21 10:01:37 -07:00 committed by GitHub
commit 7467bc3919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 7 deletions

View file

@ -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:

View file

@ -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

View file

@ -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 = """

View file

@ -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