[issue14222] Use time.steady() to implement timeout

2014-02-25 Thread STINNER Victor
STINNER Victor added the comment: You should upgrade to python 3.3! The pep 418 mentions different available modules for python 2. My new trollius project has for example an implementation in asyncio.time_monotonic. -- ___ Python tracker

[issue14222] Use time.steady() to implement timeout

2014-02-25 Thread Alexander Ljungberg
Alexander Ljungberg added the comment: This still appears to be an issue in Python 2.7. Queue.get routinely hangs for a very long time on the Raspberry Pi as it doesn't have a clock battery and often ends up significantly adjusting its system time soon after startup. -- nosy: +aljungbe

[issue14222] Use time.steady() to implement timeout

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The "not subject to adjustment" property is more desirable than not. > The "undefined reference point" property isn't harmful in this context > (the start time isn't exposed). So you're closing the issue while you're in agreement with it? -- __

[issue14222] Use time.steady() to implement timeout

2012-04-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm closing this one. The "not subject to adjustment" property is more desirable than not. The "undefined reference point" property isn't harmful in this context (the start time isn't exposed). I'll follow the python-dev thread and re-open this if it b

[issue14222] Use time.steady() to implement timeout

2012-04-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Victor] > The duration of a timeout of N seconds should be N seconds even > if the system clock is updated (e.g. a daylight saving time > (DST) change). IIRC, time.time() is not a local time and it is unaffected by a DST change. -- _

[issue14222] Use time.steady() to implement timeout

2012-04-05 Thread STINNER Victor
STINNER Victor added the comment: > You can imagine a similar patch for Queue timeout. Oops: You can imagine a similar *test* for Queue timeout. -- ___ Python tracker ___ _

[issue14222] Use time.steady() to implement timeout

2012-04-05 Thread STINNER Victor
STINNER Victor added the comment: > Why do you think monotonic time is needed for the Queue module? The duration of a timeout of N seconds should be N seconds even if the system clock is updated (e.g. a daylight saving time (DST) change). This feature is checked by an unit test in the patch a

[issue14222] Use time.steady() to implement timeout

2012-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why do you think monotonic time is needed for the Queue module? If time.time() goes backwards for some reason, the only consequence is that the timeouts take longer to cross the timeout boundard. On the other hand, it monotonic is used, then time won't g

[issue14222] Use time.steady() to implement timeout

2012-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think *trace* and *timeit* should be changed. -- ___ Python tracker ___ ___ Python-bugs-

[issue14222] Use time.steady() to implement timeout

2012-04-04 Thread STINNER Victor
STINNER Victor added the comment: Other modules that should use a monotonic clock instead of the system time: - timeit: default_timer = time.time (but time.clock is still the best clock on Windows for this mmodule) - subprocess for Popen.communicate() timeoout - sched - socket, ssl: timeou

[issue14222] Use time.steady() to implement timeout

2012-03-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: Using time.time() in Queue.get breaks when system time is changed -> Use time.steady() to implement timeout ___ Python tracker ___