[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Janne Karila
Janne Karila added the comment: The length assertion protects the test from breaking with IndexError. How about this? Though, it looks like two test cases to me. +self.pool.map_async(int, ['1'], +callback=call_a

[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Janne Karila
Janne Karila added the comment: Otherwise I agree, but what if one of the callbacks is not called? The test case would fail on assertEqual(2, len(call_args)) but you wouldn't know which callback is the problem. -- ___ Python tracker

[issue16307] multiprocess.pool.map_async callables not working

2012-10-25 Thread Janne Karila
Janne Karila added the comment: Three test cases added. The tricky part in writing the tests was to realize that when the tests are run with Manager, the callback goes through a proxy object. -- Added file: http://bugs.python.org/file27711/test_callback.patch

[issue16307] multiprocess.pool.map_async callables not working

2012-10-25 Thread Janne Karila
Janne Karila added the comment: I'm working on the test. It keeps failing... -- ___ Python tracker <http://bugs.python.org/issue16307> ___ ___ Python-bugs-l

[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Janne Karila
Janne Karila added the comment: Here's a patch that adds the missing arguments to the call to _map_async. The bug seems to originate from enhancement #12708 that added starmap_async to 3.3. -- keywords: +patch Added file: http://bugs.python.org/file27690/callback.

[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Janne Karila
Janne Karila added the comment: Indeed, the current implementation map_async simply ignores the callback arguments: def map_async(self, func, iterable, chunksize=None, callback=None, error_callback=None): ''' Asynchronous version of `map()` method.