This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, r.david.murray, vstinner, yselivanov
Date 2014-10-07.09:59:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412675952.65.0.908068095918.issue22572@psf.upfronthosting.co.za>
In-reply-to
Content
Oh, I didn't notice that waiter_bug.py does nothing :-) I added "unittest.main()". With PYTHONASYNCIODEBUG=1, I get *two* errors, maybe we don't need to add more checks in debug mode.

Again, maybe the debug mode should be better documented?
https://docs.python.org/dev/library/asyncio-dev.html#debug-mode-of-asyncio

Currently, it's at the end of the documentation.

ERROR:asyncio:<CoroWrapper Server.wait_closed() running at /home/haypo/prog/python/default/Lib/asyncio/base_events.py:143, created at waiter_bug.py:32> was never yielded from
Coroutine object created at (most recent call last):
  File "waiter_bug.py", line 43, in <module>
    unittest.main()
  File "/home/haypo/prog/python/default/Lib/unittest/main.py", line 93, in __init__
    self.runTests()
  File "/home/haypo/prog/python/default/Lib/unittest/main.py", line 244, in runTests
    self.result = testRunner.run(self.test)
  File "/home/haypo/prog/python/default/Lib/unittest/runner.py", line 168, in run
    test(result)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 625, in __call__
    return self.run(*args, **kwds)
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 582, in run
    self.doCleanups()
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 618, in doCleanups
    function(*args, **kwargs)
  File "waiter_bug.py", line 32, in _stop_server
    self.server.wait_closed()
DEBUG:asyncio:Using selector: EpollSelector
E
======================================================================
ERROR: test_version (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "waiter_bug.py", line 33, in _stop_server
    self.server_loop.stop()
  File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 285, in stop
    self.call_soon(_raise_stop_error)
  File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 373, in call_soon
    handle = self._call_soon(callback, args, check_loop=True)
  File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 382, in _call_soon
    self._assert_is_current_event_loop()
  File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 404, in _assert_is_current_event_loop
    "Non-thread-safe operation invoked on an event loop other "
RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one
History
Date User Action Args
2014-10-07 09:59:12vstinnersetrecipients: + vstinner, gvanrossum, r.david.murray, yselivanov
2014-10-07 09:59:12vstinnersetmessageid: <1412675952.65.0.908068095918.issue22572@psf.upfronthosting.co.za>
2014-10-07 09:59:12vstinnerlinkissue22572 messages
2014-10-07 09:59:11vstinnercreate