-
-
Notifications
You must be signed in to change notification settings - Fork 656
Add the Client.install_asyncio_hook function. #1134
base: master
Are you sure you want to change the base?
Conversation
613df38 to
7439554
Compare
|
I'm not sure how to cause asyncio to call exception handler without 'exception' but with handle of future with the _source_traceback attribute set. |
|
@ashwoods I used the 'exception' level instead of 'fatal' as handled errors don't explicitly cause interpreter to exit by default. Was it a good idea? |
|
@ashwoods Is there anything I should change / fix? |
|
The idea is strange for me. |
|
@asvetlov This change is to handle asyncio exceptions and unrelated to aiohttp transport. In one of the projects we are using this without raven-aiohttp. |
|
@ashwoods I would love to address the issues if there are any |
|
Anyone? I'm willing to fix any issues. |
|
I haven't had time to look into context in the loop. Will breadcrumbs leak and be cleared? |
|
@ashwoods What test would show it? |
|
Re-opened to re-run CI tests. @ashwoods Any thoughts? |
asyncio needs special handling as its unhandled exceptions are consumed by logging and ignoring them.
@asvetlov Please take a look at the implementation and let me know if handling can be improved. I used implementation of
BaseEventLoop.default_exception_handleras a reference but didn't check all available context's keywords in all released versions of Python.