Skip to content

Python 3.10 asyncio-related test failures #1176

@mgorny

Description

@mgorny
  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

>>> print(tqdm.__version__, sys.version, sys.platform)
4.61.0 3.10.0b2 (default, Jun  1 2021, 09:14:18) [GCC 11.1.0] linux

This is git master (05ad200). I've get three test failures. The first two are clearly related to the loop parameter being removed. The third one is above my pay grade ;-).

_____________________________________________________________ test_as_completed[0.1] _____________________________________________________________
tests/py37_asyncio.py:106: in test_as_completed
    for i in as_completed([asyncio.sleep(0.01 * i) for i in range(30, 0, -1)]):
tqdm/asyncio.py:63: in as_completed
    yield from cls(asyncio.as_completed(fs, loop=loop, timeout=timeout),
E   TypeError: as_completed() got an unexpected keyword argument 'loop'
__________________________________________________________________ test_gather ___________________________________________________________________
tests/py37_asyncio.py:125: in test_gather
    res = await gather(list(map(double, range(30))))
tqdm/asyncio.py:75: in gather
    res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout,
tqdm/asyncio.py:-1: in <listcomp>
    ???
tqdm/asyncio.py:63: in as_completed
    yield from cls(asyncio.as_completed(fs, loop=loop, timeout=timeout),
E   TypeError: as_completed() got an unexpected keyword argument 'loop'
___________________________________________________________________ test_main ____________________________________________________________________
../venv/lib/python3.10/site-packages/_pytest/runner.py:340: in from_call
    result: Optional[TResult] = func()
../venv/lib/python3.10/site-packages/_pytest/runner.py:261: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
../venv/lib/python3.10/site-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
../venv/lib/python3.10/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
../venv/lib/python3.10/site-packages/pluggy/manager.py:84: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
../venv/lib/python3.10/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
../venv/lib/python3.10/site-packages/_pytest/unraisableexception.py:78: in unraisable_exception_runtest_hook
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object double at 0x7ff659797bc0>
E   
E   Traceback (most recent call last):
E     File "/usr/lib/python3.10/warnings.py", line 506, in _warn_unawaited_coroutine
E       warn(msg, category=RuntimeWarning, stacklevel=2, source=coro)
E   RuntimeWarning: coroutine 'double' was never awaited

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions