-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Fix blocking call in Freebox integration #143071
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @hacf-fr, @Quentame, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hi @Quentame, I see that you are quoted as the code owner for this component. Therefore, would you mind checking if my changes work for you? Moreover, I fixed the mistakes that made the checks fail. |
Hi @samybali ! |
Ok thank you. Do you know if it is possible to run again the checks to see if it works as expected because it tells me that the workflow needs approval ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be fixed in the freebox_api
library, because the api.open
method is already async, so it should not be doing blocking calls.
We have a few examples on SSL stuff here: https://developers.home-assistant.io/docs/asyncio_blocking_operations?#load_default_certs
Hi, I agree with @abmantis, the fix should be in the api. In fact, there is alreay a PR there to fix this : hacf-fr/freebox-api#799 |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Breaking change
None.
Proposed change
This PR resolves an issue in the Freebox integration where a blocking call (
router().open
) was made in the event loop, causing warnings in the logs. The blocking call is now wrapped inhass.async_add_executor_job
to ensure it runs in a background thread.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: