Skip to content

Fix py2-style except clauses that made modules unimportable - #1

Open
poolside-eric wants to merge 2 commits into
PoolsideStan:mainfrom
poolside-eric:fix/except-syntax
Open

Fix py2-style except clauses that made modules unimportable#1
poolside-eric wants to merge 2 commits into
PoolsideStan:mainfrom
poolside-eric:fix/except-syntax

Conversation

@poolside-eric

Copy link
Copy Markdown

except A, B: is Python 2 syntax and raises SyntaxError at import time
under Python 3, so climate.py, config_flow.py and sensor.py could not be
loaded at all — the integration shipped unloadable in 0.1.0.

Parenthesize the exception tuples in all four sites, and gate CI on
compileall first: hassfest and the HACS action validate metadata, not
code, so a module with a syntax error passes both and the failure only
surfaces when Home Assistant tries to import it.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

poolside-eric and others added 2 commits August 21, 2026 07:48
`except A, B:` is Python 2 syntax and raises SyntaxError at import time
under Python 3, so climate.py, config_flow.py and sensor.py could not be
loaded at all — the integration shipped unloadable in 0.1.0.

Parenthesize the exception tuples in all four sites, and gate CI on
`compileall` first: hassfest and the HACS action validate metadata, not
code, so a module with a syntax error passes both and the failure only
surfaces when Home Assistant tries to import it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
setup-python@v5 targets Node 20, which GitHub now force-runs on Node 24
and annotates as deprecated. v7 declares node24 natively; the only input
removed since v5 is `pip-install`, which the compile job does not use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant