dualfroz 8b30a4b77c fix(asyncio): accept unsized iterables in as_completed
Since Python 3.12 asyncio.as_completed accepts a generator of awaitables,
but the tqdm wrapper calls len(fs) unconditionally when total is omitted,
so the same input raises TypeError: object of type 'generator' has no len().

Fall back to an unknown total when fs has no length, mirroring how
tqdm.std.tqdm.__init__ derives total from an iterable. Sized inputs keep
reporting their exact total, and an explicit total is still honoured.

Fixes #1811
2026-09-03 14:12:03 +02:00
S
Description
My contributions to tqdm/tqdm: 1 commits
31 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%