✨ Support async functionality with asyncio#213
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
I've merely copied his code, but in a single commit on current master which is small enough to be reviewable.
15f11c6 to
9d81bac
Compare
|
@amfarrell thank you for doing that so the difference is actually viewable now. Just a small comment, for line 213 in I think the print statement was left there by mistake, and I see |
|
@malthunayan I've removed that print statement now. |
|
That was totally me. Looks like me. Thought I greped for prints but o-well.
Looks good.
On Sun, Dec 27, 2020 at 11:57 PM Mohammad Al-Thunayan < ***@***.***> wrote:
@amfarrell <https://github.com/amfarrell> thank you for doing that so the
difference is actually viewable now. Just a small comment, for line 213 in
main.py I see the following:
def __call__(self, *args: Any, **kwargs: Any) -> Any:
cmd = get_command(self)
print(cmd, is_async(cmd))
if is_async(cmd):
return aio_run(cmd(*args, **kwargs))
return get_command(self)(*args, **kwargs)
I think the print statement was left there by mistake, and I see
get_command(self) being called twice. Perhaps it could be written as such:
def __call__(self, *args: Any, **kwargs: Any) -> Any:
cmd = get_command(self)
if is_async(cmd):
return aio_run(cmd(*args, **kwargs))
return cmd(*args, **kwargs)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#213 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEZQZUE2TZCIZZQ3HE2JK43SXAT4HANCNFSM4VLDB5WQ>
.
--
Best Regards,
Jesse Rubin
|
|
It would be interesting to allow |
|
@svlandeg @amfarrell how's everybody doing!? I am here! |
|
Hi @jessekrubin if you could drive this forward, I'd be grateful. I've had to refocus to other projects. |
This comment was marked as resolved.
This comment was marked as resolved.
|
This is still open? I totally forgot about this. |
|
Hi @jessekrubin! We do still have optional async support on our roadmap, so I wanted to have a look at previously suggested approaches to distill a final solution from. #340 being another example. |
asyncio
|
This pull request has a merge conflict that needs to be resolved. |
|
Thanks everyone for the work here! There are several refactors we needed to do before this that cause conflicts, plus some more, and some additional details in what is needed in the implementation, but we'll need to tackle this again after some additional work. I'm sorry I left the PR open without much feedback for so long, I knew there were other things that needed to be done first, but didn't want to close it before providing a solution... but then that ended up being just too long. Sorry for that. So for now, I'll close this one for cleanup and we'll continue to track it internally. Thank you! 🙌 ☕ |
I've merely copied the PR from @jessekrubin. All credit to him.
but I've put it into in a single commit on top of current master so it is small enough to be reviewable.