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
Fix deprecated asyncio.wait use with coroutines #94371
Fix deprecated asyncio.wait use with coroutines #94371
Conversation
Hey there @rytilahti, @starkillerOG, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Why are you using asyncio.create_task instead of hass.async_create_task?
Just for consistency. Is there a difference? |
I think hass.async_create_task makes sure there is a hard refrence to the task such that it does not get cleaned by the garbage collector which can cause issues. But I am not sure. I was thinking they probably did not make hass.async_create_task for nothing. |
Since the task is awaited directly afterwards I think this is fine. |
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.
Once black is fixed I think this is good to go
6e5987e
to
cecc3b8
Compare
Proposed change
Fixes #94218
Type of change
in the future)Additional information
Checklist
black --fast 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
..coveragerc
.To help with the load of incoming pull requests: