[New-bugs-announce] [issue22480] SystemExit out of run_until_complete causes AttributeError when using python3 -m
report at bugs.python.org
Wed Sep 24 13:22:12 CEST 2014
New submission from chrysn:
the attached test.py snipplet, which runs an asyncio main loop to the completion of a coroutine raising SystemExit, runs cleanly when invoked using `python3 test.py`, but shows a logging error from the Task.__del__ method when invoked using `python3 -m test`.
the error message (attached as test.err) indicates that the builtins module has already been emptied by the time the Task's destructor is run.
i could reproduce the problem with an easier test case without asyncio (destructoretest.py), but then again, there the issue is slightly more obvious (one could argue a "don't do that, then"), and it occurs no matter how the program is run. i'm leaving this initially assigned to asyncio, because (to the best of my knowledge) test.py does not do bad things by itself, and the behavior is inconsistent only there.
nosy: chrysn, gvanrossum, haypo, yselivanov
title: SystemExit out of run_until_complete causes AttributeError when using python3 -m
versions: Python 3.4
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce