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 6fe9aa632b.

_________________________ test_update_playing[pyloop] __________________________
[gw20] linux -- Python 3.8.9 /nix/store/hq6mrm0pc6xn6j8y6lm4qcgg9rwmqd8q-python3-3.8.9/bin/python3.8

hass = <homeassistant.core.HomeAssistant object at 0x7ffdcba15700>
lastfm_network = <MagicMock name='LastFMNetwork' id='140728019800752'>

    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       = <homeassistant.core.HomeAssistant object at 0x7ffdcba15700>
lastfm_network = <MagicMock name='LastFMNetwork' id='140728019800752'>

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__  = <class 'pylast.Track'>
        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__  = <class 'pylast._Opus'>
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
wip/little-gl
Martin Weinelt 3 years ago
parent a1a1a6b1df
commit 344573771e
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
  1. 4
      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 {

Loading…
Cancel
Save