Message227440
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. |
|
| Date |
User |
Action |
Args |
| 2014-09-24 11:22:12 | chrysn | set | recipients:
+ chrysn, gvanrossum, vstinner, yselivanov |
| 2014-09-24 11:22:12 | chrysn | set | messageid: <[email protected]> |
| 2014-09-24 11:22:12 | chrysn | link | issue22480 messages |
| 2014-09-24 11:22:11 | chrysn | create | |
|