This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eckhardt, rhettinger, vstinner
Date 2011-07-01.09:33:22
SpamBayes Score 5.724706e-07
Marked as misclassified No
Message-id <1309512802.82.0.767967162611.issue12459@psf.upfronthosting.co.za>
In-reply-to
Content
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() has different implementations. Especially, the select() implementation behaves differently depending on the platform: negative timeout raises an error (select.error(22, 'Invalid argument')) or returns immediatly.

Attached patch raises an error if the time length is negative. It avoids the integer overflow in the Windows implementation.
History
Date User Action Args
2011-07-01 09:33:22vstinnersetrecipients: + vstinner, rhettinger, eckhardt
2011-07-01 09:33:22vstinnersetmessageid: <1309512802.82.0.767967162611.issue12459@psf.upfronthosting.co.za>
2011-07-01 09:33:22vstinnerlinkissue12459 messages
2011-07-01 09:33:22vstinnercreate