Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union type containing 'str' and 'bool' will be coerced #2235

Closed
1 task done
tomlut opened this issue May 10, 2024 · 1 comment
Closed
1 task done

Union type containing 'str' and 'bool' will be coerced #2235

tomlut opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working upstream issue Issue depends on an issue outside MA

Comments

@tomlut
Copy link

tomlut commented May 10, 2024

What version of Music Assistant has the issue?

2.0.0

What version of the Home Assistant Integration have you got installed?

2024.5.1

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

  • Yes

The problem

The following is logged after restarting Home Assistant:

This error originated from a custom integration.

Logger: py.warnings
Source: custom_components/mass/__init__.py:21
integration: Music Assistant (BETA) (documentation, issues)
First occurred: 20:23:35 (3 occurrences)
Last logged: 20:23:35

/usr/local/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py:182: UserWarning: music_assistant.common.models.config_entries.ConfigValueOption.value (typing.Union[str, int, float, bool, tuple[int, int], list[str], list[int], list[tuple[int, int]], None]): In the next release, data marked with Union type containing 'str' and 'bool' will be coerced to the value of the type specified first instead of passing it as is warnings.warn(
/usr/local/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py:182: UserWarning: music_assistant.common.models.config_entries.ConfigEntry.default_value (typing.Union[str, int, float, bool, tuple[int, int], list[str], list[int], list[tuple[int, int]], None]): In the next release, data marked with Union type containing 'str' and 'bool' will be coerced to the value of the type specified first instead of passing it as is warnings.warn(
/usr/local/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py:182: UserWarning: music_assistant.common.models.config_entries.ConfigEntry.value (typing.Union[str, int, float, bool, tuple[int, int], list[str], list[int], list[tuple[int, int]], None]): In the next release, data marked with Union type containing 'str' and 'bool' will be coerced to the value of the type specified first instead of passing it as is warnings.warn(

How to reproduce

Install MA.
Restart HA.

Music Providers

File System

Player Providers

Home Assistant
Universal Group

Full log output

log.txt

Additional information

No response

What version of Home Assistant Core are your running

core-2024.5.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

@tomlut tomlut added the triage label May 10, 2024
@OzGav OzGav added bug Something isn't working HA Integration Improvements or bugs in the integration and removed triage labels May 10, 2024
@marcelveldt
Copy link
Member

marcelveldt commented May 10, 2024

HA already switched to orjson 3.13 as it seems, creating this issue now.
I've asked for help upstream: Fatal1ty/mashumaro#221

@OzGav OzGav added upstream issue Issue depends on an issue outside MA and removed HA Integration Improvements or bugs in the integration labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream issue Issue depends on an issue outside MA
Projects
Archived in project
Development

No branches or pull requests

3 participants