| 16 Dec 2024 |
@hexa:lossy.network |
[music_assistant.server.helpers.util] DEBUG: 1.0.0 != 1.2.0
| 23:54:55 |
@hexa:lossy.network | lib/python3.12/site-packages/hass_client-1.0.0.dist-info/LICENSE | 23:55:25 |
@hexa:lossy.network | the package version is off. | 23:55:32 |
@hexa:lossy.network | https://github.com/music-assistant/python-hass-client/blob/1.2.0/pyproject.toml#L17 | 23:55:55 |
@hexa:lossy.network | because of course they refer to the wrong version on the tag | 23:56:04 |
@hexa:lossy.network | only to patch it in the publish step https://github.com/music-assistant/python-hass-client/blob/main/.github/workflows/publish-to-pypi.yml#L34 | 23:56:50 |
@hexa:lossy.network | lib/python3.12/site-packages/hass_client-1.2.0.dist-info/
| 23:57:10 |
ibizaman | wow | 23:58:08 |
| 17 Dec 2024 |
ibizaman | I'd like to propose a PR for the repo but was wondering what would work with Nix. I see they're trying to be clever by using the tag to set the version, so they only have one source of truth. I can come up with a way to do the opposite and create a git tag automatically whenever the pyproject.toml version changes. But then, that's quite a lot of code and would need buy-in from upstream. Is this worth it in your opinion? Is there a less nice but still maintainable way to get around this issue? | 00:09:53 |
@hexa:lossy.network | don't bother, already fixed | 00:11:05 |
@hexa:lossy.network | https://github.com/NixOS/nixpkgs/pull/365730 | 00:11:10 |
@hexa:lossy.network | interacting with this ecosystem for these kinds of issues is pretty much pointless | 00:11:27 |
ibizaman | Thank you! And sorry for the circumvented way to get to a fix. | 00:17:46 |
@hexa:lossy.network | - PyChromecast==14.0.4 not satisifed by version 14.0.5
- pycryptodome==3.21.0 not satisifed by version 3.20.0
- py-opensonic==5.1.1 not satisifed by version 5.2.1
- plexapi==4.15.16 not satisifed by version 4.16.0
- radios==0.3.1 not satisifed by version 0.3.2
- soco==0.30.5 not satisifed by version 0.30.6
- defusedxml==0.7.1 not satisifed by version 0.8.0rc2
- tidalapi==0.8.0 not satisifed by version 0.7.6
- ytmusicapi==1.8.1 not satisifed by version 1.8.2
- yt-dlp==2024.10.7 not satisifed by version 2024.12.6
| 00:22:06 |
@hexa:lossy.network | so basically all pins are outdated 🥳 | 00:22:21 |
@hexa:lossy.network | * so basically all pins are off 🥳 | 00:23:07 |
@hexa:lossy.network | so many problems to resolve and only so much time in a day | 00:23:42 |
@hexa:lossy.network | I think we should relax the check in mass and depend only fail on too old versions | 00:27:17 |
@hexa:lossy.network | * I think we should relax the check in mass and only fail on too old versions | 00:29:19 |
mjm | i have this patch for music-assistant in my config: https://git.midna.dev/mjm/nix-config/-/blob/main/packages/music-assistant/ma-no-install.patch?ref_type=heads
felt a little too gross for me to want to send to nixpkgs but i wasn't sure a better way | 03:08:13 |
@hexa:lossy.network | the problem is … i started packaging it because I was curious | 03:16:23 |
@hexa:lossy.network | it didn't work out too well for local files as I had hoped | 03:16:38 |
@hexa:lossy.network | someone asked for it, so I PRed it | 03:16:47 |
@hexa:lossy.network | and here we are | 03:16:50 |
@hexa:lossy.network | for home-assistant we ended up making the tests top-level attributes, so that dependency bumps would run them | 03:22:43 |
@hexa:lossy.network | but music-assistant hardly has any tests for specific providers, just filesystem and jellyfin | 03:23:02 |
@hexa:lossy.network | I'll look into how to best patch out the behavior tomorrow | 03:24:08 |
@hexa:lossy.network |  Download image.png | 03:41:10 |
@hexa:lossy.network | diff --git a/music_assistant/server/helpers/util.py b/music_assistant/server/helpers/util.py
index 3d342b73..a395fb46 100644
--- a/music_assistant/server/helpers/util.py
+++ b/music_assistant/server/helpers/util.py
@@ -117,30 +117,11 @@ async def load_provider_module(domain: str, requirements: list[str]) -> Provider
def _get_provider_module(domain: str) -> ProviderModuleType:
return importlib.import_module(f".{domain}", "music_assistant.server.providers")
- # ensure module requirements are met
- for requirement in requirements:
- if "==" not in requirement:
- # we should really get rid of unpinned requirements
- continue
- package_name, version = requirement.split("==", 1)
- installed_version = await get_package_version(package_name)
- if installed_version == "0.0.0":
- # ignore editable installs
- continue
- if installed_version != version:
- await install_package(requirement)
-
# try to load the module
try:
return await asyncio.to_thread(_get_provider_module, domain)
except ImportError:
- # (re)install ALL requirements
- for requirement in requirements:
- await install_package(requirement)
- # try loading the provider again to be safe
- # this will fail if something else is wrong (as it should)
- return await asyncio.to_thread(_get_provider_module, domain)
-
+ raise RuntimeError(f"Missing dependencies for provider {domain}.")
def create_tempfile():
"""Return a (named) temporary file."""
| 03:41:46 |
@hexa:lossy.network | so we even get a nice toast 😛 | 03:41:51 |