Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve some deprecation warnings #4450

Merged
merged 4 commits into from
Aug 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions beets/util/pipeline.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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