Bug 2293090 - python-tqdm fails to build with Python 3.13 in Fedora Rawhide (41)
Summary: python-tqdm fails to build with Python 3.13 in Fedora Rawhide (41)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-tqdm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Maíra Canal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F41FTBFS PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-06-19 14:48 UTC by Karolina Surma
Modified: 2024-07-08 16:22 UTC (History)
4 users (show)

Fixed In Version: python-tqdm-4.66.4-5.fc41
Clone Of:
Environment:
Last Closed: 2024-07-08 16:22:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github tqdm tqdm pull 1595 0 None open Avoid Python 3.13+ RuntimeWarning: coroutine method 'aclose' of 'acount' was never awaited 2024-07-08 15:29:37 UTC

Description Karolina Surma 2024-06-19 14:48:14 UTC
python-tqdm fails to build with Python 3.13 in Fedora Rawhide (41).

Build failure:

==================================== ERRORS ====================================
_____________________ ERROR at teardown of test_generators _____________________
/usr/lib/python3.13/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.13/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
/usr/lib/python3.13/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
/usr/lib/python3.13/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.13/site-packages/_pytest/unraisableexception.py:93: in pytest_runtest_teardown
    yield from unraisable_exception_runtest_hook()
/usr/lib/python3.13/site-packages/_pytest/unraisableexception.py:78: in unraisable_exception_runtest_hook
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <async_generator object acount at 0x7f7c8fb26420>
E   
E   Traceback (most recent call last):
E     File "/usr/lib64/python3.13/asyncio/base_events.py", line 746, in close
E       self._ready.clear()
E       ~~~~~~~~~~~~~~~~~^^
E   RuntimeWarning: coroutine method 'aclose' of 'acount' was never awaited
---------------------------- Captured log teardown -----------------------------
ERROR    asyncio:base_events.py:1859 Task was destroyed but it is pending!
task: <Task pending name='Task-3' coro=<<async_generator_athrow without __name__>()>>
=================================== FAILURES ===================================
__________________________________ test_pipes __________________________________
tests/tests_main.py:46: in test_pipes
    assert norm(ls_out) == norm(out)
E   AssertionError: assert b'CODE_OF_CON...dm.egg-info\n' == b''
E     Full diff:
E     - b''
E     + (
E     +  b'CODE_OF_CONDUCT.md\nCONTRIBUTING.md\nDEMO.ipynb\nLICENCE\nMANIFEST.in\nMa'
E     +  b'kefile\nPKG-INFO\nREADME.rst\nbuild\nenvironment.yml\nexamples\nlogo.png\np'
E     +  b'yproject-wheeldir\npyproject.toml\nsetup.cfg\ntests\ntests_notebook.ipyn'
E     +  b'b\ntox.ini\ntqdm\ntqdm.egg-info\n',
E     + )
_______________________________ test_main_import _______________________________
tests/tests_main.py:65: in test_main_import
    import tqdm.__main__  # NOQA, pylint: disable=unused-variable
tqdm/__main__.py:3: in <module>
    main()
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
_______________________________ test_main_bytes ________________________________
tests/tests_main.py:81: in test_main_bytes
    main(sys.stderr, ['--desc', 'Test CLI delim', '--ascii', 'True',
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
________________________________ test_main_log _________________________________
tests/tests_main.py:106: in test_main_log
    main(sys.stderr, ['--log', 'INFO'])
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
__________________________________ test_main ___________________________________
tests/tests_main.py:127: in test_main
    main(sys.stderr, ['--mininterval', '0', '--miniters', '1'])
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
_________________________________ test_manpath _________________________________
tests/tests_main.py:192: in test_manpath
    main(argv=['--manpath', str(tmp_path)])
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
________________________________ test_comppath _________________________________
tests/tests_main.py:203: in test_comppath
    main(argv=['--comppath', str(tmp_path)])
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
_______________________________ test_exceptions ________________________________
tests/tests_main.py:222: in test_exceptions
    main(sys.stderr, argv=['-ascii', '-unit_scale', '--bad_arg_u_ment', 'foo'])
tqdm/cli.py:186: in main
    opt_types.pop(o)
E   KeyError: 'iterable'
=========================== short test summary info ============================
SKIPPED [1] tests/tests_keras.py:9: could not import 'tqdm.keras': No module named 'keras'
============== 8 failed, 134 passed, 1 skipped, 1 error in 3.26s ===============

Let us know here if you have any questions.
Python 3.13 is planned to be included in Fedora 41.

Comment 1 Miro Hrončok 2024-07-02 09:54:26 UTC
Will you be able to work on this?

Comment 2 Stephen Gallagher 2024-07-08 13:20:42 UTC
Looks like there's a proposed patch upstream; I'll pull it down and see if it works...

Comment 3 Stephen Gallagher 2024-07-08 14:29:24 UTC
The upstream patch (https://github.com/tqdm/tqdm/pull/1594) fixes all but one of the failures; I'm still investigating, but I don't know if I'll have time to dig deeply for a while.

Comment 4 Miro Hrončok 2024-07-08 15:12:36 UTC
Is the remaining one:

  RuntimeWarning: coroutine method 'aclose' of 'acount' was never awaited

?


That seems familiar to me. The tests breaks from an async generator: https://github.com/tqdm/tqdm/blob/v4.66.4/tests/tests_asyncio.py#L47

As told in https://github.com/python/cpython/issues/117536#issuecomment-2036883124 ... "With async generators, you have to take steps to clean them up properly if you don't iterate through them completely"

I can draft an upstream PR.

Comment 6 Stephen Gallagher 2024-07-08 16:07:18 UTC
Thanks, Miro! That does the trick. I'll incorporate that and get a build done ASAP.


Note You need to log in before you can comment on or make changes to this bug.