omnilib / aioitertools

itertools and builtins for AsyncIO and mixed iterables
https://aioitertools.omnilib.dev
MIT License
240 stars 24 forks source link

Deprecate and ignore loop parameter to asyncio functions #97

Closed amyreese closed 2 years ago

amyreese commented 2 years ago

The asyncio loop parameter has been deprecated since Python 3.8 and is removed in Python 3.10. This deprecates use of the loop parameter in aioitertools, and the parameters will be removed with or after the release of aioitertools v0.11.0.

Adds a decorator deprecated_wait_param() that emits deprecation warnings if the decorated functions are passed the loop kwarg.

Adds @deprecated_wait_param decorator to as_completed(), gather(), and gather_iter() functions. The loop parameter is no longer used, even if passed, so that aioitertools will work on Python 3.10 runtimes.

Fixes #84

codecov[bot] commented 2 years ago

Codecov Report

Merging #97 (ee00f11) into main (6dc834d) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
+ Coverage   99.50%   99.52%   +0.02%     
==========================================
  Files           8        8              
  Lines         403      421      +18     
  Branches      100      103       +3     
==========================================
+ Hits          401      419      +18     
  Misses          2        2              
Impacted Files Coverage Δ
aioitertools/asyncio.py 100.00% <100.00%> (ø)
aioitertools/helpers.py 100.00% <100.00%> (ø)
aioitertools/types.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6dc834d...ee00f11. Read the comment docs.