Skip to content

Commit

Permalink
Drop python 3.6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed Dec 14, 2021
1 parent 30d662d commit e377768
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-alpha.2", "pypy-3.7", "pypy-3.8"]
# XML coverage reporting is broken for this particular configuration
exclude:
- os: windows-latest
python-version: pypy3
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-alpha.2", "pypy-3.7", "pypy-3.8"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
Expand Down
16 changes: 1 addition & 15 deletions aiostream/stream/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@
__all__ = ["spaceout", "delay", "timeout"]


async def wait_for(aw, timeout):
task = asyncio.ensure_future(aw)
try:
return await asyncio.wait_for(task, timeout)
finally:
# Python 3.6 compatibility
if not task.done(): # pragma: no cover
task.cancel()
try:
await task
except asyncio.CancelledError:
pass


@operator(pipable=True)
async def spaceout(source, interval):
"""Make sure the elements of an asynchronous sequence are separated
Expand Down Expand Up @@ -49,7 +35,7 @@ async def timeout(source, timeout):
async with streamcontext(source) as streamer:
while True:
try:
item = await wait_for(anext(streamer), timeout)
item = await asyncio.wait_for(anext(streamer), timeout)
except StopAsyncIteration:
break
else:
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down

0 comments on commit e377768

Please sign in to comment.