From 344573771e79863323a1d2119f09ea5e27434227 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 18 May 2021 02:37:54 +0200 Subject: [PATCH] home-assistant: pin pylast at 4.2.0 The following test failure occurs with 4.2.1, due to `network` not being allowed to be None after https://github.com/pylast/pylast/commit/6fe9aa632b2147eaf7278230def9ea735eb73f4e. _________________________ test_update_playing[pyloop] __________________________ [gw20] linux -- Python 3.8.9 /nix/store/hq6mrm0pc6xn6j8y6lm4qcgg9rwmqd8q-python3-3.8.9/bin/python3.8 hass = lastfm_network = async def test_update_playing(hass, lastfm_network): """Test update when song playing.""" lastfm_network.return_value.get_user.return_value = MockUser( > Track("artist", "title", None) ) hass = lastfm_network = tests/components/lastfm/test_sensor.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /nix/store/f0ci60zk59rz5767l9lfy7q767zna6j5-python3.8-pylast-4.2.1/lib/python3.8/site-packages/pylast/__init__.py:2095: in __init__ super().__init__(artist, title, network, "track", username, info) __class__ = artist = 'artist' info = None network = None self = pylast.Track('artist', 'title', None) title = 'title' username = None _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = pylast.Track('artist', 'title', None), artist = 'artist', title = 'title' network = None, ws_prefix = 'track', username = None, info = {} def __init__(self, artist, title, network, ws_prefix, username=None, info=None): """ Create an opus instance. # Parameters: * artist: An artist name or an Artist object. * title: The album or track title. * ws_prefix: 'album' or 'track' """ if info is None: info = {} super().__init__(network=network, ws_prefix=ws_prefix) if isinstance(artist, Artist): self.artist = artist else: self.artist = Artist(artist, self.network) self.title = title self.username = ( > username if username else network.username ) # Default to current user E AttributeError: 'NoneType' object has no attribute 'username' __class__ = artist = 'artist' info = {} network = None self = pylast.Track('artist', 'title', None) title = 'title' username = None ws_prefix = 'track' /nix/store/f0ci60zk59rz5767l9lfy7q767zna6j5-python3.8-pylast-4.2.1/lib/python3.8/site-packages/pylast/__init__.py:1520: AttributeError --- pkgs/servers/home-assistant/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 3ec777745ab..b648520a9fe 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -74,6 +74,10 @@ let }); }) + # Pinned due to API changes in pylast 4.2.1 + (mkOverride "pylast" "4.2.0" + "0zd0dn2l738ndz62vpa751z0ldnm91dcz9zzbvxv53r08l0s9yf3") + # Pinned due to API changes in pyopenuv>=1.1.0 (self: super: { pyopenuv = super.pyopenuv.overridePythonAttrs (oldAttrs: rec {