Commit graph

8593 commits

Author SHA1 Message Date
Adrian Sampson
c74a7059b4 Merge pull request #3192 from translit/yaml-safe-load
Fix PyYAML yaml.load(input) Deprecation
2019-03-31 21:46:29 -04:00
Adrian Sampson
a1f965a3e5 Changelog for #3197 2019-03-31 21:45:08 -04:00
Adrian Sampson
0208ec69ef Merge pull request #3197 from arcresu/deprecation
Fix several deprecation warnings
2019-03-31 21:44:37 -04:00
Adrian Sampson
0d31b33948 Changelog for #3196 2019-03-31 21:42:16 -04:00
Adrian Sampson
0042f3205e Merge pull request #3196 from arcresu/bpd-log
bpd: use plugin logger instead of global logger
2019-03-31 21:41:22 -04:00
Adrian Sampson
3701d145b0 Changelog for #3195 2019-03-31 21:39:55 -04:00
Adrian Sampson
fa3a569a45 Merge pull request #3195 from arcresu/patch-1
the: log a debug only when text is changed
2019-03-31 21:39:13 -04:00
Carl Suster
b4c4f3ca19 bpd: use plugin logger instead of global logger 2019-03-31 22:06:43 +11:00
Carl Suster
a6305c36e1 Fix deprecated plistlib function
https://docs.python.org/3.7/library/plistlib.html#plistlib.readPlist
2019-03-31 19:53:17 +11:00
Carl Suster
e4c03fd63f Fix deprecated placement of inline regex flags
https://bugs.python.org/issue22493
2019-03-31 19:44:49 +11:00
Carl Suster
3997141250 Fix deprecated imports from collections for Py3
Since Python 3.3 the abstract base classes from `collections` are moved
to the `collections.abc` module. From Python 3.8 they will be
unavailable from their original location.

https://docs.python.org/3/library/collections.abc.html
2019-03-31 19:44:49 +11:00
Carl Suster
ca60555ffa Fix deprecated call log.warn -> log.warning
https://bugs.python.org/issue13235
2019-03-31 19:44:40 +11:00
Carl Suster
7557bb06d6 bpd: use log instead of stdout 2019-03-31 18:43:18 +11:00
Carl Suster
0b4293de6e
the: log a debug only when text is changed
Previously the `the` plugin would log a debug message when the text _didn't_ get changed by the plugin, whereas I think what was intended was the opposite. With this change the logged messages show the actual transformations made by the plugin.
2019-03-31 18:19:09 +11:00
Adrian Sampson
728267d06c
Merge pull request #3190 from arcresu/bpd
Add tests for BPD
2019-03-30 21:25:27 -04:00
Carl Suster
999cf14401 BPD tests: change expectedFailure -> skip for nose 2019-03-31 10:50:42 +11:00
Carl Suster
2e35c27dce BPD tests: improve helpers 2019-03-31 10:46:14 +11:00
Carl Suster
eb5c7513a1 BPD tests: fix GstPlayer mock 2019-03-31 10:46:14 +11:00
Carl Suster
2a2d9b5c98 BPD tests: explicitly close client socket 2019-03-31 10:46:14 +11:00
Carl Suster
a6c976b880 BPD tests: small code reformatting 2019-03-31 10:46:14 +11:00
Carl Suster
3eaf0f7a19 BPD tests: use canonical capitalisation of tags 2019-03-31 10:46:14 +11:00
Carl Suster
4c627cbacb [skip travis] BPD tests: add items by path 2019-03-31 10:46:14 +11:00
Carl Suster
dfc5da70cd BPD tests: avoid os.fsdecode new in Py3.2 2019-03-31 10:46:14 +11:00
Carl Suster
14d0cc3b85 BPD tests: be more careful with paths 2019-03-31 10:46:14 +11:00
Carl Suster
7c8bbd3011 BPD tests: avoid Py3.7-only mp.Process.kill 2019-03-31 10:46:14 +11:00
Carl Suster
35bf041ad0 BPD tests: fork and launch beets 2019-03-31 10:46:14 +11:00
Carl Suster
c42c0c06bc BPD tests: fix CI failures 2019-03-31 10:46:14 +11:00
Carl Suster
2286c0ce7b BPD tests: run bpd in a subprocess 2019-03-31 10:46:14 +11:00
Carl Suster
767441d5d5 BPD tests: improve test helpers
Decode the bytes to strings: the MPD protocol specifies that the
communications are all in UTF-8.

Also parse the body into a dict since this is typically more convenient
than having to do it manually in each test.
2019-03-31 10:46:14 +11:00
Carl Suster
d9537f27dc BPD tests: fix CI failures 2019-03-31 10:46:14 +11:00
Carl Suster
76221428f8 Add a DummyIn::close no-op implementation
The BOD tests are currently forking a process with a server running, and
this attempts to close stdin. Tests were failing due to DummyIn not
implementing the close() method. Adding this simple no-op does the trick
to allow forking and seems like a harmless addition.
2019-03-31 10:46:14 +11:00
Carl Suster
5d2b883b72 BPD tests: test several simple commands 2019-03-31 10:46:14 +11:00
Carl Suster
7302cd6ab5 BPD tests: test helper for BPD batch commands
The MPD protocol allows batching commands. There are two choices for the
first message that announced a batch is starting, and we just go for the
one that causes the server to respond with a marker message between each
individual response, since that's easier. This might need to be tweaked
in order to test the behaviour with the other batch indicator.
2019-03-31 10:46:14 +11:00
Carl Suster
9a5be1f971 BPD tests: test supported tag types
MPD now supports more fields ("tags") than what BPD advertises. Fixing
this should be a simple task of extending the mapping of fields to tags
in BPD's implementation.
2019-03-31 10:46:14 +11:00
Carl Suster
acd66ce560 BPD tests: run BPD Server with a fake gstplayer 2019-03-31 10:46:14 +11:00
Carl Suster
acc3f3efb0 BPD tests: check all specified commands known
The current MPD spec is several versions ahead of BPD. These tests just
compare the full specified list of commands against what BPD claims to
support (without actually testing their implementations). It's handy as
a measure of progress against the specification, but can perhaps be
dropped later once all of the individual protocol methods have tests.
2019-03-31 10:46:14 +11:00
Carl Suster
59e66aaa7f BPD tests: password command 2019-03-31 10:46:14 +11:00
Carl Suster
078c583434 BPD tests: add basic test framework
A simple TCP client wraps the low level protocol to allow testing of the
BPD server as a black box.
2019-03-31 10:46:14 +11:00
Adrian Sampson
97c3590aec Changelog for #3192 2019-03-30 13:11:13 -04:00
Adrian Sampson
15f86c411e Appveyor: fix version specifier syntax 2019-03-30 12:57:51 -04:00
Adrian Sampson
9b3bebfcd7 Travis: fix shell syntax for version specifier 2019-03-30 12:48:34 -04:00
Adrian Sampson
db107e3c46 Appveyor: temporarily pin tox version
As in 777cfbbf61 for Travis.
2019-03-30 12:40:52 -04:00
Adrian Sampson
ccbab10090 Add the full set of __future__ imports in new file 2019-03-30 12:39:42 -04:00
Adrian Sampson
777cfbbf61 Travis: temporarily pin tox to <=3.8.1
To avoid a Python 2 bug introduced in tox 3.8.2 but not fixed yet:
https://github.com/tox-dev/tox/issues/1234
2019-03-30 12:37:53 -04:00
Alexei Datskevich
be12a89372 Fix PyYAML yaml.load(input) Deprecation 2019-03-30 08:34:13 +01:00
Adrian Sampson
9abfc45adc Changelog issue link for #3189 2019-03-26 22:11:12 -04:00
Adrian Sampson
f842551915
Merge pull request #3189 from jroitgrund/dont-move-album-art-twice
beets update: dont move album art twice
2019-03-26 22:10:08 -04:00
jroitgrund@gmail.com
31b393586a Changelog 2019-03-27 01:43:42 +00:00
jroitgrund@gmail.com
ea307f62d1 Don't move album art twice 2019-03-27 01:41:42 +00:00
Heinz Wiesinger
29425edff4
Merge pull request #2798 from pprkut/query_perf
Small performance optimization when fetching items from library.
2019-03-23 20:54:58 +01:00