HA 2026.5 support#828
Conversation
|
A small dependency-version hell - everything works locally, but I need a bit more time. |
|
I pinned the minimal version to 2026.5.0 expecting the usual May 1 release, but it's now scheduled for May 6. |
HA releases are always on the first Wed of the month. Betas start on the last Wed of the month. |
|
My mistake. However, I suggest leaving this unchanged and keeping Home Assistant 2026.5.0 as the requirement for Pyscript 2.0. For regular users, the HA and Pyscript updates will be released at the same time. |
|
@dmamelin thanks for the fixes. Just wondering what the most prudent release strategy is
I think the 2nd is the best option, although we will be front-loading issues on top of the 2026.5.0 changes since there won't be any fallback with 2026.5.0 support, nor a beta-test period with #818. Also, how important is it for 2.0.0 to be backward compatible with HA < 2026.5.0? I don't this PR will be backward compatible. Thoughts? |
|
@craigbarratt i prefer the second option. There's no point in excluding #818, because the |
|
Ok, great, I agree - forward progress without orphan releases. I'm going to update the imports in this PR to hopefully make it backward compatible (with try / except on the imports). See below. Also, there were changes from "except (ValueError, TypeError)" to "except ValueError, TypeError". I believe the former is correct, so I'll change them back. |
@craigbarratt this is required by the new The idea of using try / except on the imports is excellent. |
|
@dmamelin good point about PEP 758. However, it's a syntax error in python <= 3.13. I'd rather keep backward compatibility for a few months, and we'll need to pin an older ruff version. |
|
I'll try to be more mindful of backward compatibility :) My reasoning was simple: if a user updates integrations through HACS, Home Assistant itself is usually up to date as well. And Python >= 3.14.2 is required for Home Assistant starting from 2026.3.0 |
also down-revd ruff target-version to py313
|
@dmamelin Ok, this should be backward compatible. Anything else to do or check before releasing 2.0.0? |
|
@craigbarratt i don't know the full release process, but from the code side everything is ready. |
|
2.0.0 released! |
|
@craigbarratt thanks! Hopefully the release is boring in the best possible way :) |
Fixing #827 required updating
pytest-homeassistant-custom-component, which in turn requires Python 3.14.But after moving to the new Python version, the tests broke: HA could no longer load the pyscript integration because
os.path.isfilewas being patched globally in the tests.I don't know why this worked before -
homeassistant/loader.pyhasn't changed in a long time. Most likely this is due to changes in CPython: python/cpython#118243