Update to work with Pykka 1.0
This commit is contained in:
parent
b53a82dbba
commit
f1e2cff3e0
@ -8,6 +8,10 @@ This change log is used to track all major changes to Mopidy.
|
||||
v0.8.1 (in development)
|
||||
=======================
|
||||
|
||||
**Dependencies**
|
||||
|
||||
- Pykka >= 1.0 is now required.
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
- :issue:`213`: Fix "streaming task paused, reason not-negotiated" errors
|
||||
|
||||
@ -26,7 +26,7 @@ dependencies installed.
|
||||
|
||||
- Python >= 2.6, < 3
|
||||
|
||||
- Pykka >= 0.12.3::
|
||||
- Pykka >= 1.0::
|
||||
|
||||
sudo pip install -U pykka
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class DummyBackend(ThreadingActor, base.Backend):
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DummyBackend, self).__init__(*args, **kwargs)
|
||||
super(DummyBackend, self).__init__()
|
||||
|
||||
self.current_playlist = core.CurrentPlaylistController(backend=self)
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class LocalBackend(ThreadingActor, base.Backend):
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(LocalBackend, self).__init__(*args, **kwargs)
|
||||
super(LocalBackend, self).__init__()
|
||||
|
||||
self.current_playlist = core.CurrentPlaylistController(backend=self)
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ class SpotifyBackend(ThreadingActor, base.Backend):
|
||||
from .playback import SpotifyPlaybackProvider
|
||||
from .stored_playlists import SpotifyStoredPlaylistsProvider
|
||||
|
||||
super(SpotifyBackend, self).__init__(*args, **kwargs)
|
||||
super(SpotifyBackend, self).__init__()
|
||||
|
||||
self.current_playlist = core.CurrentPlaylistController(backend=self)
|
||||
|
||||
|
||||
@ -250,7 +250,7 @@ class Connection(object):
|
||||
return True
|
||||
|
||||
try:
|
||||
self.actor_ref.send_one_way({'received': data})
|
||||
self.actor_ref.tell({'received': data})
|
||||
except ActorDeadError:
|
||||
self.stop(u'Actor is dead.')
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Pykka >= 0.12.3
|
||||
Pykka >= 1.0
|
||||
|
||||
@ -383,14 +383,14 @@ class ConnectionTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(network.Connection.recv_callback(
|
||||
self.mock, sentinel.fd, gobject.IO_IN))
|
||||
self.mock.actor_ref.send_one_way.assert_called_once_with(
|
||||
self.mock.actor_ref.tell.assert_called_once_with(
|
||||
{'received': 'data'})
|
||||
|
||||
def test_recv_callback_handles_dead_actors(self):
|
||||
self.mock.sock = Mock(spec=socket.SocketType)
|
||||
self.mock.sock.recv.return_value = 'data'
|
||||
self.mock.actor_ref = Mock()
|
||||
self.mock.actor_ref.send_one_way.side_effect = pykka.ActorDeadError()
|
||||
self.mock.actor_ref.tell.side_effect = pykka.ActorDeadError()
|
||||
|
||||
self.assertTrue(network.Connection.recv_callback(
|
||||
self.mock, sentinel.fd, gobject.IO_IN))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user