Skip to content
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

Pass name to asyncio.create_task #3759

Merged
merged 7 commits into from
Jun 29, 2023
Merged

Pass name to asyncio.create_task #3759

merged 7 commits into from
Jun 29, 2023

Conversation

harshil21
Copy link
Member

Closes #3733

I couldn't test the name in Job._run since that task is instantly awaited (why?)

@harshil21 harshil21 added this to the v20.4 milestone Jun 17, 2023
@harshil21 harshil21 linked an issue Jun 17, 2023 that may be closed by this pull request
@Bibo-Joshi
Copy link
Member

@harshil21 IISC the point is that the call to application.create_task ensures that the job will be awaited on shutdown...

by using Event based test than a timed one
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! :) Left a few suggestions below. Sorry for the brief wording, I'm not at a keyboard...

telegram/ext/_application.py Outdated Show resolved Hide resolved
telegram/ext/_application.py Outdated Show resolved Hide resolved
telegram/ext/_conversationhandler.py Outdated Show resolved Hide resolved
telegram/ext/_jobqueue.py Outdated Show resolved Hide resolved
telegram/ext/_application.py Outdated Show resolved Hide resolved
telegram/ext/_application.py Outdated Show resolved Hide resolved
@Bibo-Joshi Bibo-Joshi merged commit 59a932a into drop-py-37 Jun 29, 2023
19 checks passed
@Bibo-Joshi Bibo-Joshi deleted the asyncio-task-names branch June 29, 2023 15:47
@Bibo-Joshi Bibo-Joshi mentioned this pull request Jun 29, 2023
17 tasks
Bibo-Joshi added a commit that referenced this pull request Jun 29, 2023
…#3764, #3762, #3759)

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Luca Bellanti <luca.bellanti@gmail.com>
Co-authored-by: thefunkycat <104379699+thefunkycat@users.noreply.github.com>
Co-authored-by: Aditya Yadav <69784758+clot27@users.noreply.github.com>
Co-authored-by: Dmitry Kolomatskiy <58207913+lemontree210@users.noreply.github.com>
clot27 added a commit that referenced this pull request Jul 3, 2023
…#3764, #3762, #3759)

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Luca Bellanti <luca.bellanti@gmail.com>
Co-authored-by: thefunkycat <104379699+thefunkycat@users.noreply.github.com>
Co-authored-by: Aditya Yadav <69784758+clot27@users.noreply.github.com>
Co-authored-by: Dmitry Kolomatskiy <58207913+lemontree210@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt Py3.8+ features: Names for asyncio tasks
2 participants