Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Component update to homeassistant 2024.1.X Python dependencies not working because of home-assistant-bluetooth Python version #30

Closed
muhlba91 opened this issue Jan 9, 2024 · 7 comments · Fixed by #31, #32 or home-assistant/core#107816
Labels
bug Something isn't working

Comments

@muhlba91
Copy link

muhlba91 commented Jan 9, 2024

I am the maintainer of the onyx custom component (https://github.com/muhlba91/onyx-homeassistant-integration) and wanted to update the version used by Poetry to 2024.1.x.

However, it seems that from 2023.12.4 to 2024.1.x some dependencies have changed as version solving fails because of home-assistant-bluetooth being required by homeassistant.

The error Poetry returns is:

The current project's supported Python range (>=3.11,<4.0) is not compatible with some of the required packages Python requirement:
  - home-assistant-bluetooth requires Python >=3.10,<3.13, so it will not be satisfied for Python >=3.13,<4.0

Because no versions of homeassistant match >2024.1.0,<2024.1.1 || >2024.1.1,<2024.1.2 || >2024.1.2,<2025.0.0
 and homeassistant (2024.1.1) depends on home-assistant-bluetooth (1.11.0), homeassistant (>2024.1.0,<2024.1.2 || >2024.1.2,<2025.0.0) requires home-assistant-bluetooth (1.11.0).
And because homeassistant (2024.1.0) depends on home-assistant-bluetooth (1.11.0)
 and homeassistant (2024.1.2) depends on home-assistant-bluetooth (1.11.0), homeassistant (>=2024.1.0,<2025.0.0) requires home-assistant-bluetooth (1.11.0).
So, because home-assistant-bluetooth (1.11.0) requires Python >=3.10,<3.13
 and onyx-homeassistant-integration depends on homeassistant (^2024.1.0), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For home-assistant-bluetooth, a possible solution would be to set the `python` property to ">=3.11,<3.13"

It looks like this update here causes the error v1.10.4...v1.11.0#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L29 which was released with v1.11.0 and included in this year's homeassistant release.

@muhlba91 muhlba91 added the bug Something isn't working label Jan 9, 2024
bdraco added a commit that referenced this issue Jan 9, 2024
bdraco added a commit that referenced this issue Jan 9, 2024
bdraco added a commit that referenced this issue Jan 9, 2024
@bdraco bdraco closed this as completed in #31 Jan 9, 2024
@bdraco bdraco reopened this Jan 9, 2024
@bdraco
Copy link
Member

bdraco commented Jan 9, 2024

It looks like the publish workflow run on 3.10 so it failed to publish

I'll have to wait to fix this as we need to migrate to github trusted publishing on PyPI before we can get the new version out

https://github.com/home-assistant-libs/home-assistant-bluetooth/actions/runs/7464918240

@bdraco
Copy link
Member

bdraco commented Jan 10, 2024

GitHub actions seems to be having trouble with windows runners.

I'll try again to do a release tomorrow Bluetooth-Devices/habluetooth#25

@bdraco bdraco reopened this Jan 10, 2024
@bdraco
Copy link
Member

bdraco commented Jan 10, 2024

If #35 successfully triggers a release, I'll bump this in HA and all the deps as well

@bdraco
Copy link
Member

bdraco commented Jan 10, 2024

Looks like we are stuck on this one since PSR only supports python 3.10 and we need 3.11

https://github.com/python-semantic-release/python-semantic-release/blob/1d2bbdf23aab816cd9d6e26f537b5cec9e39dede/Dockerfile#L2C3-L2C3

@bdraco
Copy link
Member

bdraco commented Jan 10, 2024

I asked a question at python-semantic-release/python-semantic-release#801

Let's see if there is a solution.

@muhlba91
Copy link
Author

muhlba91 commented Jan 11, 2024

thank you for providing the updates! i do hope there's a solution, as this blocks every custom integration using, at least, poetry from updating the homeassistant version.

@bdraco
Copy link
Member

bdraco commented Jan 11, 2024

0.12.0 published. I'll get HA bumped shortly.

I had to fork PSR to make it work for 3.11+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants