ext: Remove old extension API
As far as I know, all extensions except Mopidy-Arcam (not currently maintained) and Mopidy-VKontakte already use the new API. Both of the remaining extensions got open pull requests with the needed changes to use the new API.
This commit is contained in:
parent
ed1edb622c
commit
30dde4e593
@ -16,6 +16,14 @@ Feature release.
|
||||
new API introuced in v0.18 is now required. Most extensions already use the
|
||||
new API location.
|
||||
|
||||
**Extension support**
|
||||
|
||||
- Removed the :class:`~mopidy.ext.Extension` methods that were deprecated in
|
||||
0.18: :meth:`~mopidy.ext.Extension.get_backend_classes`,
|
||||
:meth:`~mopidy.ext.Extension.get_frontend_classes`, and
|
||||
:meth:`~mopidy.ext.Extension.register_gstreamer_elements`. Use
|
||||
meth:`mopidy.ext.Extension.setup` instead, as most extensions already do.
|
||||
|
||||
**MPD frontend**
|
||||
|
||||
- Proper command tokenization for MPD requests. This replaces the old regex
|
||||
|
||||
@ -99,42 +99,6 @@ class Extension(object):
|
||||
:param registry: the extension registry
|
||||
:type registry: :class:`Registry`
|
||||
"""
|
||||
for backend_class in self.get_backend_classes():
|
||||
registry.add('backend', backend_class)
|
||||
|
||||
for frontend_class in self.get_frontend_classes():
|
||||
registry.add('frontend', frontend_class)
|
||||
|
||||
self.register_gstreamer_elements()
|
||||
|
||||
def get_frontend_classes(self):
|
||||
"""List of frontend actor classes
|
||||
|
||||
.. deprecated:: 0.18
|
||||
Use :meth:`setup` instead.
|
||||
|
||||
:returns: list of :class:`pykka.Actor` subclasses
|
||||
"""
|
||||
return []
|
||||
|
||||
def get_backend_classes(self):
|
||||
"""List of backend actor classes
|
||||
|
||||
.. deprecated:: 0.18
|
||||
Use :meth:`setup` instead.
|
||||
|
||||
:returns: list of :class:`~mopidy.backend.Backend` subclasses
|
||||
"""
|
||||
return []
|
||||
|
||||
def register_gstreamer_elements(self):
|
||||
"""Hook for registering custom GStreamer elements.
|
||||
|
||||
.. deprecated:: 0.18
|
||||
Use :meth:`setup` instead.
|
||||
|
||||
:returns: :class:`None`
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@ -27,12 +27,3 @@ class ExtensionTest(unittest.TestCase):
|
||||
|
||||
def test_validate_environment_does_nothing_by_default(self):
|
||||
self.assertIsNone(self.ext.validate_environment())
|
||||
|
||||
def test_get_frontend_classes_returns_an_empty_list(self):
|
||||
self.assertListEqual(self.ext.get_frontend_classes(), [])
|
||||
|
||||
def test_get_backend_classes_returns_an_empty_list(self):
|
||||
self.assertListEqual(self.ext.get_backend_classes(), [])
|
||||
|
||||
def test_register_gstreamer_elements_does_nothing_by_default(self):
|
||||
self.assertIsNone(self.ext.register_gstreamer_elements())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user