Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(60)

Issue 133890043: BaseEventLoop.call_exception_handler() now accepts a "source" key

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by haypo_gmail
Modified:
9 years, 7 months ago
Reviewers:
yselivanov
CC:
haypo_gmail, GvR
Visibility:
Public.

Description

BaseEventLoop.call_exception_handler() now accepts a "source" key

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -15 lines) Patch
M asyncio/base_events.py View 1 chunk +4 lines, -0 lines 0 comments Download
M asyncio/events.py View 1 chunk +1 line, -2 lines 0 comments Download
M asyncio/futures.py View 1 chunk +1 line, -2 lines 0 comments Download
M asyncio/tasks.py View 1 chunk +1 line, -2 lines 0 comments Download
M asyncio/windows_events.py View 3 chunks +3 lines, -6 lines 0 comments Download
M tests/test_base_events.py View 1 chunk +1 line, -1 line 0 comments Download
M tests/test_events.py View 1 chunk +1 line, -1 line 0 comments Download
M tests/test_tasks.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 1
yselivanov
9 years, 7 months ago (2014-09-12 22:30:47 UTC) #1
Hm.

I don't like this source / source._source_traceback logic in
`BaseEventLoop.default_exception_handler()`.  Simply because it's an
undocumented attribute of 'context' dict with an undocumented attribute
'_source_traceback'. People may start copying&pasting this in order to have
custom exception handlers.

Can you just call it like this:

     call_exception_handler({
         ...,
         'source_traceback': self.source_traceback
     })

?

Yes, sometimes you'll have Nones in there, but what's the problem with that?

I'd also add 'source_traceback' to the docstring of 'call_exception_handler()'
method.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b