Skip to content

Commit

Permalink
Merge pull request beetbox#4450 from beetbox/deprecations
Browse files Browse the repository at this point in the history
Resolve some deprecation warnings
  • Loading branch information
sampsyo committed Aug 21, 2022
2 parents 6e0f7a1 + 8cb3143 commit 7467bc3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions beets/util/pipeline.py
Expand Up @@ -75,8 +75,8 @@ def _get():
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:
Expand Down
3 changes: 2 additions & 1 deletion beetsplug/lyrics.py
Expand Up @@ -560,7 +560,8 @@ def is_text_notcode(text):
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

Expand Down
3 changes: 1 addition & 2 deletions test/test_art.py
Expand Up @@ -336,8 +336,7 @@ def run(self, *args, **kwargs):
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 = """
Expand Down
6 changes: 4 additions & 2 deletions test/test_player.py
Expand Up @@ -35,8 +35,10 @@

# 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
Expand Down

0 comments on commit 7467bc3

Please sign in to comment.