[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Charles McEachern
Charles McEachern added the comment: That seems to do it! Looks like the trick is to define __reduce__ to help out the serializer. Thanks! -- ___ Python tracker <http://bugs.python.org/issue30

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Charles McEachern
Charles McEachern added the comment: This caused me several hours of misery yesterday, trying to isolate what was going wrong. I am unfortunately not at liberty to share the code I'm working on. The example on GitHub has the general thrust of it: my constructor was always called

[issue30018] multiprocessing.Pool garbles call stack for __new__

2017-04-07 Thread Charles McEachern
New submission from Charles McEachern: I'm calling the constructor of Foo, a subclass of str. Expected output: Called Foo.__new__ with args = ('TIMESTAMP', 'INPUT0') TIMESTAMP OUTPUT0 When I make the call using a multiprocessing.pool.ThreadPool, it works fine. But whe