mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 14:32:55 +01:00
Merge pull request #4450 from beetbox/deprecations
Resolve some deprecation warnings
This commit is contained in:
commit
7467bc3919
4 changed files with 9 additions and 7 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = """
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue