Fix compatibility with Home Assistant 2025.12.2+#1504
Open
notf0und wants to merge 1 commit intosmartHomeHub:masterfrom
Open
Fix compatibility with Home Assistant 2025.12.2+#1504notf0und wants to merge 1 commit intosmartHomeHub:masterfrom
notf0und wants to merge 1 commit intosmartHomeHub:masterfrom
Conversation
Replace deprecated distutils.version with packaging.version to support Python 3.12+ and Home Assistant versions 2025.12.2 and higher. - Replace StrictVersion with version.parse() for version comparisons - Add packaging>=20.0 to requirements in manifest.json - Add .gitignore for __pycache__ directories Fixes compatibility issues where distutils was removed in Python 3.12.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix Home Assistant 2025.12.2+ Compatibility
Summary
This PR updates SmartIR to support Home Assistant versions 2025.12.2 and higher by replacing the deprecated
distutilsmodule with thepackaginglibrary.Changes
distutils.version.StrictVersiontopackaging.version.parse()packaging.version.parse()instead ofStrictVersionpackaging>=20.0to therequirementsinmanifest.json.gitignore: Ignore__pycache__directories for cleaner repositoryBackground
Python 3.12+ removed the
distutilsmodule, which was deprecated in Python 3.10. Home Assistant 2025.12.2 and later versions use Python 3.12+, causing SmartIR to fail on import due to the missingdistutils.versionmodule.The
packaginglibrary is the recommended replacement and provides equivalent functionality throughversion.parse().Testing
Related Issues
Resolves compatibility issues with Home Assistant 2025.12.2+ and Python 3.12+
Notes
As this repository seems to be unmaintained, I have created a fork that includes changes on this PR for users needing this integration working right now: https://github.com/notf0und/SmartIR