core
core copied to clipboard
Pin Dacite for Roborock
Breaking change
Proposed change
Dacite is a package that converts dictionaries to dataclasses with complex types. It is used in our library to be able to take dictionaries that are multilevel nested and turn them into classes with multilevel nesting or enums. It's rather helpful.
The issue is that some custom integrations (such as hacs-govee) are pinning dacite to a lower version. hacs-govee has since made the change, but some users are not updating it or their issue is being caused by another integration.
The problem randomly started in September, before then, the correct version was always installed. I have tried everything I could think of to fix this problem.
If someone has an alternative fix, I am more than happy to hear it, but I have asked around a few times and no one has had any ideas. I am closing out issues for it rather frequently so I thought I would try this and see if it helped at all.
Type of change
- [x] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue: #105708 #105509 #105186 #104928 #104891 #104697 #102952 #102487 #102264 #101857 #101465 #101424 #101289
- Link to documentation pull request:
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] I have followed the perfect PR recommendations
- [x] The code has been formatted using Ruff (
ruff format homeassistant tests
) - [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest
. - [x] New or updated dependencies have been added to
requirements_all.txt
.
Updated by runningpython3 -m script.gen_requirements_all
. - [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to
.coveragerc
.
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Hey there @humbertogontijo, mind taking a look at this pull request as it has been labeled with an integration (roborock
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of roborock
can trigger bot actions by commenting:
-
@home-assistant close
Closes the pull request. -
@home-assistant rename Awesome new title
Renames the pull request. -
@home-assistant reopen
Reopen the pull request. -
@home-assistant unassign roborock
Removes the current integration label and assignees on the pull request, add the integration domain after the command. -
@home-assistant add-label needs-more-information
Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request. -
@home-assistant remove-label needs-more-information
Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:
Just found this PR and i think that it might solve this issue i opened,https://github.com/home-assistant/core/issues/106445
We had a similar problem with nam
, gios
and brother
integrations. Their backend libraries use dacite
.
But I think version 1.7.0
supports UnionType
https://github.com/konradhalas/dacite/releases/tag/v1.7.0
Is there another reason that you pin to version >=1.8.0
?
We had a similar problem with
nam
,gios
andbrother
integrations.
You say had, did those integrations solve it differently?
Is there another reason that you pin to version
>=1.8.0
?
Nope - fair enough, I have changed to 1.7.0
You say had, did those integrations solve it differently?
I pinned dacite
versions in the backend libraries (>=1.7.0
) and opened the issue in the custom component repositories. I think only one remains open https://github.com/LaggAt/hacs-govee/issues/108
I pinned
dacite
versions in the backend libraries (>=1.7.0
)
Interesting, that never worked for me, it still ended up downloading the wrong version for some users.
Interesting, that never worked for me
No no, it was never 100% sure. A custom component can force its version of the package.