[issue12459] time.sleep(-1.0) behaviour

2011-07-05 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 0e5485634817 by Victor Stinner in branch 'default': Issue #12459: time.sleep() now raises a ValueError if the sleep length is http://hg.python.org/cpython/rev/0e5485634817 -- nosy: +python-dev

[issue12459] time.sleep(-1.0) behaviour

2011-07-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Tim Lesher agreed to raise an exception (That makes sense. Better to be consistent within the time API--I know the different semantics of time.clock() have confused people around here.), so I think that everybody agreed to raise

[issue12459] time.sleep(-1.0) behaviour

2011-07-02 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___ Python-bugs-list mailing list

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Ulrich Eckhardt
New submission from Ulrich Eckhardt eckha...@satorlaser.com: For reference, see the thread on the users' mailinglist/newsgroup from 2011-06-29 how to call a function for evry 10 seconds and the thread on the developers' mailinglist from 2011-06-30 time.sleep(-1) behaviour. The problem is how

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think that time.sleep() should behave as select.select() (issue #11757, commit 3982be773b54) and signal.sigtimedwait(): raise a ValueError if the timeout is negative. A good reason to always raise an error is that floatsleep()

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I agree with the ValueError suggestion. Since it would slightly change existing behaviour, it can only be done in a feature release (3.3). According to Google Code Search, deliberate uses of sleep(-1) are almost non-existent:

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: According to Google Code Search, deliberate uses of sleep(-1) are almost non-existent: The search gives two results, in pycaf and a plone installer (in compilezpy.py). I don't know what is the expected behaviour: infinite sleep?

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #12462, I found something weird in the signal handling of floatsleep(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Tim Lesher on python-dev: On the Windows side, Sleep(-1) as infinite is correct and documented: http://msdn.microsoft.com/en-us/library/ms686298(v=vs.85).aspx Wine defines INFINITE using #define INFINITE 0x:

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___ Python-bugs-list

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___