-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
asyncio.gather
API consistency with stdlib
#1212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…cio.gather` Intended as a drop-in replacement of the stdlib `asyncio.gather()`, it would be much reasonable if the function interface is consistent with that of `asyncio.gather()` as well. It also ensures that our interface doesn't violate the least-surprising principle. It would have been surprising and frustrating for a user to wanting to use `tqdm_asyncio.gather()` as drop-in replacement to the stdlib `asyncio.gather()` but ending up being bitten by the trivial inconsistency.
Codecov Report
@@ Coverage Diff @@
## master #1212 +/- ##
=======================================
Coverage 89.88% 89.88%
=======================================
Files 26 26
Lines 1721 1721
Branches 286 286
=======================================
Hits 1547 1547
Misses 128 128
Partials 46 46 |
doesn't look like tests are passing... https://github.com/tqdm/tqdm/pull/1212/checks?check_run_id=3191178338 |
Yeah, I forgot to update the unit test as well. It should be fixed now. |
tqdm_asyncio.gather
interface consistent with the stdlib asyncio.gather
asyncio.gather
API consistency with stdlib
Thanks! Probably will break some workflows next release ( -await gather(list(map(double, range(30))))
+await gather(*map(double, range(30))) |
Considering that this PR introduces a backward incompatible change, shouldn't we make it into a future major release, as dictated by the semantic versioning spec tqdm follows? |
I thought about it... technically breaking semver a bit but since 1. it's a submod and 2. fairly recently introduced so probably not that many users, I felt like sneaking it in a minor version bump may be better. That being said, v5 really is overdue. |
Intended as a drop-in replacement of the stdlib
asyncio.gather()
, it would be much reasonable if the function interface is consistent with that ofasyncio.gather()
as well.It also ensures that our interface doesn't violate the least-surprising principle. It would have been surprising and frustrating for a user to wanting to use
tqdm_asyncio.gather()
as a drop-in replacement to the stdlibasyncio.gather()
but ending up being bitten by the trivial inconsistency.