[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 65623d7dc76e by Giampaolo Rodola' in branch '3.3': Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts. http://hg.python.org/cpython/rev/65623d7dc76e -- nosy: +python-dev

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87882c96d138 by Giampaolo Rodola' in branch 'default': Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts. http://hg.python.org/cpython/rev/87882c96d138 -- ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- keywords: +3.2regression, 3.3regression resolution: - fixed status: open - closed versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I think I'll just stick with the original patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___ ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Also, rathr than using an harcoded delta, we could maybe use a fudger factor, like

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-15 Thread Charles-François Natali
Charles-François Natali added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Well, the test you added tests explicitely for a value 1s because this

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch including a unittest is in attachment. -- keywords: +patch Added file: http://bugs.python.org/file29855/issue17707.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Removed file: http://bugs.python.org/file29855/issue17707.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file29856/issue17707.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your test is much too strict (and I don't understand why you're using a Decimal). I think testing that the delta is greater or equal than 0.2 would be enough. -- nosy: +pitrou ___ Python tracker

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yeah, right. Too strict indeed. I'll get rid of the assertLessEqual statement. Here's why Decimal is necessary: import time time.time() - time.time() -9.5367431640625e-07 from decimal import Decimal Decimal(time.time()) - Decimal(time.time())

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand what you're worrying about here. This is just because of evaluation order: import itertools it = itertools.count() f = it.__next__ f() - f() -1 f() - f() -1 -- ___ Python tracker

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Without using Decimal and without patching connections.py (hence q.get() returns immediately) the resulting delta is mismatched: == FAIL: test_timeout (__main__.WithProcessesTestQueue)

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Without using Decimal and without patching connections.py (hence q.get() returns immediately) the resulting delta is mismatched: Well, why are you surprised the test fails without the patch? -- ___ Python tracker

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: You're right, sorry. I got confused by the exponential notation in 9.107589721679688e-05. Updated patch is in attachment. -- Added file: http://bugs.python.org/file29857/issue17707.patch ___ Python tracker

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-14 Thread Charles-François Natali
Charles-François Natali added the comment: I think we should test multiple timeout values (e.g. 0.1, 0.5, 1 and 1.5): it'll take a little longer, but since the test suite didn't detect it, that's really lacking. Also, rathr than using an harcoded delta, we could maybe use a fudger factor, like

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Charles-François Natali
Charles-François Natali added the comment: Indeed, that's a regression introduced by fix for issue #10527. Just a rounding error: --- Lib/multiprocessing/connection.py.orig 2013-04-13 06:27:57.0 + +++ Lib/multiprocessing/connection.py 2013-04-13 06:25:23.0 + @@

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___ ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, georg.brandl, giampaolo.rodola, larry priority: high - release blocker stage: - patch review versions: +Python 2.7, Python 3.2, Python 3.4 ___ Python tracker

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Georg Brandl
Georg Brandl added the comment: Very good, regression #2 for 3.3.2. Keep them coming right now :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: My patch, my fault. I'm very sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___ ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Georg Brandl
Georg Brandl added the comment: Don't worry, mistakes happen. My message was actually positive: it's better to catch the problems now than two weeks after the regression fix release... -- ___ Python tracker rep...@bugs.python.org

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Charles-François Natali
Charles-François Natali added the comment: As they say, s*** happens (one of my first patches caused a regression with thread-local storage in multiple interpreters setup, so...) Note that it's a strong case for selectors inclusion (issue #16853) :-) BTW, this would probably need a test, and

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Assigning to me. Will get back in 1 or 2 days. -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-12 Thread Sultan Qasim
New submission from Sultan Qasim: This issue seems to be new in Python 3.3.1. This worked fine in Python 3.3.0 and earlier. I am using fully up-to-date installation of Arch Linux, running the official arch repo's 64 bit build of Python 3.3.1. This issue is probably a result of the changes to

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-12 Thread Sultan Qasim
Changes by Sultan Qasim sultanqa...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___ ___ Python-bugs-list