-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Asyncio #2731
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
Asyncio #2731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Looks like you edited README.rst or README_RAW.rst. I'm just a friendly reminder to apply relevant changes to both of those files :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there. Relax, I am just a little warning for the maintainers to release directly after merging your PR, otherwise we have broken examples and people might get confused :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Looks like you edited the (dev) requirements or the pre-commit hooks. I'm just a friendly reminder to keep the pre-commit hook versions in sync with the dev requirements and the additional dependencies for the hooks in sync with the requirements :)
5c26c91
to
74c4270
Compare
# Conflicts: # telegram/_files/file.py # telegram/ext/_basepersistence.py # telegram/ext/_builders.py # telegram/ext/_callbackqueryhandler.py # telegram/ext/_chatjoinrequesthandler.py # telegram/ext/_chatmemberhandler.py # telegram/ext/_choseninlineresulthandler.py # telegram/ext/_commandhandler.py # telegram/ext/_dispatcher.py # telegram/ext/_handler.py # telegram/ext/_inlinequeryhandler.py # telegram/ext/_messagehandler.py # telegram/ext/_picklepersistence.py # telegram/ext/_pollanswerhandler.py # telegram/ext/_pollhandler.py # telegram/ext/_precheckoutqueryhandler.py # telegram/ext/_shippingqueryhandler.py # telegram/ext/_stringcommandhandler.py # telegram/ext/_stringregexhandler.py # telegram/ext/_typehandler.py # telegram/ext/_updater.py # telegram/request.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uploading files rework review.
Btw codecov shows that quite a few lines in Application
and ConversationHandler
are not covered in tests?
Supersedes #2402. Closes #2288 when ready - which is not in the forseable future :D
telegram
to workTODO
Let's use this as place to write everything down that comes to mind while working on this - will be a lot
PtbRequestBase
andHttpxRequest
to atg.request
module/package. Maybe rename toRequestBase
andHTTPXRequest
Bot
?coroutine was never awaited
somewhere in the tests and also check if we can make those warnings fail the teststimeout
parameter should be used forwrite_timeout
as well in inBaseRequest
pool_timeout
we want to create a new connection instead of dropping the request?!update_queue
, which isn't really niceexception_event
JobQueue
test that weekdays are working as expected to avoid regression when we update APS - see here and here# TODO
commentschatmemberbot.py
we can also include the changes proposed hereThings that don't need to be done in this PR
If they are not, create issues for them!
BaspePersistence
, i.e. abstract methodsstart/end_transaction
so that we can doReview
Thinks to look out for in a review
test_slots_behavior
tests went missing for some reason. check the diff and re-add them.. versionadded:: version
,.. versionchanged:: version
or.. deprecated:: version
to the docstringshttps://…
orhttp://…
kill pid
works when usingApp.run_*
& starting the script as a background task???
I wrote this down while working on a signal-handler based exit. not sure, if still relevant
task.cancel()
leads to the issue discribed in https://bugs.python.org/issue39232. Can be resolved by usingloop.run_until_complete()
instead ofasycnio.run()
. think about if we want to address this somehow (documentation/helper function/adapting the internals or mechanichs or updater)asyncio.run
in combination with webhooks leads to asyncio.run() causes RuntimeError because of loop.close() tornadoweb/tornado#3092 - check if we can do something smart about that