Skip to content

Commit

Permalink
Merge branch 'release/3.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed May 29, 2022
2 parents 0448374 + 62631f1 commit 0d51a3c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
7 changes: 1 addition & 6 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ python_files =
addopts =
--doctest-modules
--cov python_utils
--cov-report html
--cov-report term-missing
--mypy

flake8-ignore =
*.py W391
docs/*.py ALL

doctest_optionflags =
doctest_optionflags =
ALLOW_UNICODE
ALLOW_BYTES

Expand Down
2 changes: 1 addition & 1 deletion python_utils/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
'with the standard Python install')
__url__: str = 'https://github.com/WoLpH/python-utils'
# Omit type info due to automatic versioning script
__version__ = '3.3.0'
__version__ = '3.3.1'
10 changes: 8 additions & 2 deletions python_utils/generators.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
import time

import python_utils
Expand Down Expand Up @@ -26,8 +27,13 @@ async def abatcher(

while True:
try:
item = await generator.__anext__()
except StopAsyncIteration:
if interval_s:
item = await asyncio.wait_for(
generator.__anext__(), interval_s
)
else:
item = await generator.__anext__()
except (StopAsyncIteration, asyncio.TimeoutError):
if batch:
yield batch
break
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
'pytest',
'pytest-cov',
'pytest-mypy',
'pytest-flake8',
'pytest-asyncio',
'sphinx',
'types-setuptools',
Expand Down

0 comments on commit 0d51a3c

Please sign in to comment.