Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This PR exchanges the pydantic dependency with mashumaro. This is due to the fact that the version of pydantic used is not anymore supported, and a migration was not accepted (see #531)
I've taken into account the following PRs from the author as references on how to do the migration:
Changelog
I had to to some unrelated changes to get the pipeline to run through, due to some library upgrades that now fail on CI. Since the content is not crazy big, I decided to add them to the same PR, but let me know if I should make a separate PR instead. Here is the list of changes:
async_timeout.timeout
has been replaced byasyncio.timeouts.timeout
. See that the original library is not deprecated, and they recommend you to use asyncio instead. Since this library only supports Python 3.11 and above, the dependency is completely dropped (wasn't on thepyproject.toml
either way)..github/CODE_OF_CONDUCT.md
, the codespell pre-commit was failing for the wordsocio-economic
, so I changed it tosocioeconomic
. Seems like the word is not hyphenatedpoetry run ruff .
was changed topoetry run ruff check .
.coverage
file would not be uploaded anymore without theinclude-hidden-files
option.safety
, as it was not being used and was causing pydantic to be installed either way (meaning it would appear on the lock file). Let me know if it should be kept (meaning pydantic will be still in the dev requirements).Discussion
As far as tests are concerned, the changes should work out of the box, but I do not have one of those devices to test it. If there is a way to have simulated APIs or there are test cases that should be covered, let me know.
Related Issues
For the pydantic upgrade in HA, this change is necessary: