[issue16307] multiprocess.pool.map_async callables not working

2012-10-27 Thread Hynek Schlawack
Hynek Schlawack added the comment: Applied. Thank you for your contribution! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue16307] multiprocess.pool.map_async callables not working

2012-10-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1bccec4ff980 by Hynek Schlawack in branch '3.3': #16307: Fix multiprocessing.Pool.map_async not calling its callbacks http://hg.python.org/cpython/rev/1bccec4ff980 -- nosy: +python-dev ___ Python tracker

[issue16307] multiprocess.pool.map_async callables not working

2012-10-27 Thread Hynek Schlawack
Hynek Schlawack added the comment: LGTM. Presuming you want to submit more patches in future, please take the time to sign a Python contributor agreement: http://www.python.org/psf/contrib/ . You'll get a pretty star next to your name in the bug tracker in return. ;) -- _

[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_args.append, +error_c

[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Hynek Schlawack
Hynek Schlawack added the comment: True, it makes sense to push this assert to the end. -- ___ Python tracker ___ ___ Python-bugs-list

[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-26 Thread Hynek Schlawack
Hynek Schlawack added the comment: Thanks for taking the time! I remember my frustrations when trying to grok how the mp test suite works. :) A small nit-pick first: you have a lot of extra white space in your patches. Just run 'make patchcheck' first, that should warn you about that. Not sur

[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 ___ ___ Python-bugs-list mailing li

[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Hynek Schlawack
Hynek Schlawack added the comment: Could you add a test please? Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +hynek stage: -> patch review versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list

[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.patch

[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. ''' return self._map_a

[issue16307] multiprocess.pool.map_async callables not working

2012-10-24 Thread Bbb
New submission from Bbb: When using map_async() my callbacks don't get called back. When using apply_async() they do get called. CODE: from multiprocessing import Pool,TimeoutError from time import sleep servers=["s1","s2","s3","s4","s5","s6"] blah = "no callback" def f(x): print("start