8000 Use `asyncio.timeout` instead of `asyncio.wait_for` by puddly · Pull Request #1187 · zigpy/zigpy · GitHub
[go: up one dir, main page]

Skip to content

Use asyncio.timeout instead of asyncio.wait_for #1187

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

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

puddly
Copy link
Collaborator
@puddly puddly commented Apr 4, 2023

The cancellation semantics of asyncio.wait_for are probably the root cause of the task cancellation bug (#809). zigpy-znp has always used asyncio.timeout internally without any problems so we may as well migrate zigpy as well. Plus, the context manager syntax is usually clearer.

python/cpython#98518

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (14696fe) 99.52% compared to head (253520a) 99.52%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1187   +/-   ##
=======================================
  Coverage   99.52%   99.52%           
=======================================
  Files          48       48           
  Lines        7857     7863    +6     
=======================================
+ Hits         7820     7826    +6     
  Misses         37       37           
Impacted Files Coverage Δ
zigpy/application.py 98.64% <100.00%> (+<0.01%) ⬆️
zigpy/device.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@puddly puddly merged commit cc69530 into zigpy:dev Apr 5, 2023
bdraco added a commit to bdraco/zigpy-deconz that referenced this pull request Sep 4, 2023
puddly added a commit to zigpy/zigpy-deconz that referenced this pull request Sep 11, 2023
* Switch asyncio.wait_for to asyncio_timeout

see zigpy/zigpy#1187

* Directly import from the `async_timeout` package

---------

Co-authored-by: puddly <32534428+puddly@users.noreply.github.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.

2 participants
0