Replies: 2 comments 1 reply
-
This would bring risk of bugs/regression if the library was updated incompatibly. Using ~= ensures that major version releases are not automatically upgraded, allowing them to be tested first. I don't know what NixOS is, and why it pre-packages Home Assistant integrations like this, normally users use HACS. Last time I checked (a few days ago) Home Assistant was also using tuya-sharing-sdk 0.1.9, and the most important thing it to remain compatible with that, though if 0.2.0 is now released, it can be tested and included in the compatible versions somehow. |
Beta Was this translation helpful? Give feedback.
-
Version 0.2.0 seems to be the unreleased HEAD of dev branch. I do not think it is appropriate to use for this integration now. |
Beta Was this translation helpful? Give feedback.
-
Hi @make-all,
I've made tuya-local available for NixOS with version 2024.5.2 and have issues upgrading it to version 2024.6.0 because of the hard dependency constraints tuya-local has.
tuya-local since a few weeks requires tuya-device-sharing-sdk 0.1.9, which was not the latest version (0.2.0) when added to tuya-local. In NixOS the packaged version of tuya-device-sharing-sdk is "already" 0.2.0.
And I've also packaged tinytuya for NixOS, currently with version 1.13.2.
The "issue" with NixOS is, that every package must be 100% reproducible and thus all Python dependencies of a NixOS package must be packaged in NixOS and be 100% reproducible itself also. With the current version constraints, I'm not able to upgrade any of the packages anymore, because upgrading tinytuya would break tuya-local (still with version 2024.5.2) and upgrading tinytuya and tuya-local together would stilll break tuya-local because of the version mismatch with the tuya-device-sharing-sdk.
The easiest solution for this problem would be to weaken the dependency constraints of tuya-local. Assuming that the dependencies properly implement semantic versioning, they wouldn't have any breaking changes unless the major version changes - but only receive new features with minor releases or bugfixes with patch releases. And under this assumption, the current version constraints could maybe changed from
to
assuming that these dependency versions have been chosen to contain a required feature (tinytuya) respectively a required bugfix (tuya-device-sharing-sdk). Of course other version specifiers are also possible, but it really depends on what features or bugfixes the project actually requires.
Please let me know what you think about this. And I could also provide a corresponding merge request.
Beta Was this translation helpful? Give feedback.
All reactions