[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2018-06-19 Thread William Woodall
William Woodall added the comment: Just an update to my previous post. We ran into this issue again, but only noticed later because we do not see this problem on Ubuntu Bionic with Python 3.6.5, but we did see it again when we tested later on Ubuntu Xenial with Python 3.5.1. See:

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2016-01-29 Thread 山本泰宇
山本泰宇 added the comment: > I may workaround the bug during Python finalization if more users report this > issue. +1 in my project: https://github.com/cybozu/passh/issues/1 Anyway, I'd like to express my gratitude to asyncio. -- nosy: +山本泰宇 ___

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-08-08 Thread Chetan Reddy
Chetan Reddy added the comment: I'm seeing the same exception as op with Python-3.5.0b4. I'm writing a function in a library, and am using asyncio to make my function run faster. I'd like my library function to be useful even to users who aren't using asyncio and therefore won't call

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-08-08 Thread Chetan Reddy
Chetan Reddy added the comment: Disregard my previous comment. I realize now that I shouldn't be calling run_until_complete in a library function because it will fail if the user had already started running the event loop. I will attempt to use a create and use a new event loop in my library

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-04-07 Thread William Woodall
William Woodall added the comment: I was getting the same error as the OP in my application. I did something like this to work around the problem: import asyncio import atexit def close_asyncio_loop(): loop = None try: loop = asyncio.get_event_loop() except AttributeError:

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-29 Thread Joshua Bronson
Joshua Bronson added the comment: Quoting Victor Stinner: I may workaround the bug during Python finalization if more users report this issue. Read the above so reporting I'm hitting this too fwiw. Thanks for the great work on asyncio. -- nosy: +jab

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-29 Thread Joshua Bronson
Joshua Bronson added the comment: Not sure if it's related / helpful but just in case, since upgrading from 3.4.2 to 3.4.3, I'm now seeing this printed to stderr sometimes when my program exits: Exception ignored in: Exception ignored in: Exception ignored in: Exception ignored in: Exception

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: Exception ignored in: Exception ignored in: ... Hum, I already saw such issues when exiting an asyncio application. It's probably because they are some pending tasks or transports which are never closed. You can try to list tasks at exit using:

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread STINNER Victor
STINNER Victor added the comment: I close the issue as wont fix. I may workaround the bug during Python finalization if more users report this issue. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread Jack O'Connor
Jack O'Connor added the comment: Got it, thanks for the heads up. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23548 ___ ___ Python-bugs-list

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread STINNER Victor
STINNER Victor added the comment: Did you read the latest doc? You should also use the -Wd command line option to see resource warnings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23548

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread STINNER Victor
STINNER Victor added the comment: Debug mode: https://docs.python.org/dev/library/asyncio-dev.html#asyncio-debug-mode -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23548 ___

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-04 Thread Jack O'Connor
Jack O'Connor added the comment: @gvanrossum, the last two lines you suggested don't give any error, as expected. Not sure why we're getting that error message in the toy example. @haypo, closing the event loop explicitly works fine for me. But since you mentioned it, I don't see any warning

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-01 Thread STINNER Victor
STINNER Victor added the comment: I'm aware of the issue but I would prefer to not fix it. The first problem is that you didn't close the event loop. I modified recently the doc to explain at the begining that you should develop in the debug mode. In this mode, you will see a warning if you

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: So this is still strange. When you do this, does it give the same exception? import signal signal.signal(signal.SIGCHLD, signal.SIG_DFL) -- ___ Python tracker rep...@bugs.python.org

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Jack O'Connor
Jack O'Connor added the comment: `close()` fixes it; thanks for the workaround! When I throw a print statement inside `remove_signal_handler`, it says that sig is 17 and handler is 0. 17 looks to be SIGCHLD, presumably from the little echo subprocess exiting in this example. --

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Jack O'Connor
New submission from Jack O'Connor: This toy program: import asyncio @asyncio.coroutine def main(): p = yield from asyncio.create_subprocess_shell('echo hi') yield from p.wait() asyncio.get_event_loop().run_until_complete(main()) Produces this output on Arch Linux under Python 3.4.3

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: Does it also have that error if you add `asyncio.get_event_loop().close()` to the end of the program? Can you figure out what the value of `sig` and `handler` are in the traceback? My gut feeling tells me this is due to `signal.default_int_handler` being