[issue28274] asyncio does not call exception handler if task stored

2016-09-25 Thread Billy Foster

New submission from Billy Foster:

I found a very strange bug in asyncio where whether exception handlers are 
called depends on whether a task is stored.

To illustrate, the following code works as expected, printing out that it made 
it to the exception handler:

import asyncio
async def run():
raise RuntimeError
def exception_handler(loop, context):
print('Made it to exception handler.')
loop = asyncio.get_event_loop()
loop.set_exception_handler(exception_handler)
loop.create_task(run())
loop.run_forever()

However, if you take that exact same code but store the task that is returned 
from create_task, the exception handler will NOT be called:

import asyncio
async def run():
raise RuntimeError
def exception_handler(loop, context):
print('Made it to exception handler.')
loop = asyncio.get_event_loop()
loop.set_exception_handler(exception_handler)
task = loop.create_task(run())
loop.run_forever()

This is completely bizarre, and I have been unable to track down the reason.

--
components: asyncio
messages: 277394
nosy: billyfoster, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: asyncio does not call exception handler if task stored
versions: Python 3.5

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28274>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12978] Figure out extended attributes on BSDs

2015-07-20 Thread Billy Foster

Billy Foster added the comment:

Is there any chance of getting this finalized?  I have been using William Orr's 
patch as a workaround for months now, but it would be nice to not have to 
manually apply it each version bump...

--
nosy: +billyfoster

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12978
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com