title: Python asyncio debugging example
body: <p>I would like to enable Asyncio's un-yielded coroutine detection, but have not succeeded.</p>
  
  <p>This simple code implements the recommendations on:<br>
  <a href="https://docs.python.org/3/library/asyncio-dev.html#asyncio-logger">https://docs.python.org/3/library/asyncio-dev.html#asyncio-logger</a></p>
  
  <p>but does not actually catch the un-yielded 'dummy' coroutine.</p>
  
  <pre><code>import sys, os
  import asyncio
  import logging
  import warnings
  
  os.environ['PYTHONASYNCIODEBUG'] = '1'
  logging.basicConfig(level=logging.DEBUG)
  warnings.resetwarnings()
  
  @asyncio.coroutine
  def dummy():
      print('yeah, dummy ran!!')
  
  @asyncio.coroutine
  def startdummy():
      print('creating dummy')
      dummy()
  
  if __name__ == '__main__':
      lp = asyncio.get_event_loop()
      lp.run_until_complete(startdummy())
  </code></pre>
  
  <p>I expected that the program would end with a warning about the coroutine 'dummy', created but not yielded from.</p>
  
  <p>Actually, results are:</p>
  
  <pre><code>DEBUG:asyncio:Using selector: SelectSelector
  creating dummy
  sys:1: ResourceWarning: unclosed &lt;socket object at 0x02DCB6F0&gt;
  c:\python34\lib\importlib\_bootstrap.py:2150: ImportWarning: sys.meta_path is empty
  sys:1: ResourceWarning: unclosed &lt;socket object at 0x02DE10C0&gt;
  </code></pre>
  
  <p>No hint of an abandoned coroutine.  What am I missing?</p>