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

Use asyncio.timeout instead of asyncio.wait_for #1246

Merged
merged 2 commits into from
Apr 13, 2023
Merged

Use asyncio.timeout instead of asyncio.wait_for #1246

merged 2 commits into from
Apr 13, 2023

Conversation

farmio
Copy link
Member

@farmio farmio commented Apr 13, 2023

Description

Use asyncio.timeout instead of asyncio.wait_for with a backport-version for python 3.9 and 3.10
See python/cpython#98518

I'm not aware of wait_for having ever caused bugs in xknx, but I won't be waiting for it either 😉
As an extra, timeout dosen't spawn extra tasks and the context manager syntax is nicer 🚀

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code quality improvements to existing code or addition of tests

Checklist

  • The documentation has been adjusted accordingly
  • Tests have been added that prove the fix is effective or that the feature works
  • The changes are documented in the changelog (docs/changelog.md)

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #1246 (df7db57) into main (728e953) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1246   +/-   ##
=======================================
  Coverage   96.50%   96.50%           
=======================================
  Files         149      150    +1     
  Lines        9491     9512   +21     
=======================================
+ Hits         9159     9180   +21     
  Misses        332      332           
Impacted Files Coverage Δ
xknx/cemi/cemi_handler.py 98.70% <100.00%> (+0.03%) ⬆️
xknx/core/value_reader.py 100.00% <100.00%> (ø)
xknx/io/gateway_scanner.py 97.93% <100.00%> (+0.02%) ⬆️
xknx/io/ip_secure.py 95.42% <100.00%> (+0.02%) ⬆️
xknx/io/request_response/request_response.py 100.00% <100.00%> (ø)
xknx/io/self_description.py 83.33% <100.00%> (+0.40%) ⬆️
xknx/management/management.py 88.48% <100.00%> (+0.28%) ⬆️
xknx/util/__init__.py 100.00% <100.00%> (ø)

@farmio farmio merged commit 5b3444e into main Apr 13, 2023
@farmio farmio deleted the async-timeout branch April 13, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant