[Python-checkins] cpython: Issue #14222: Use the new time.steady() function instead of time.time() for
victor.stinner
python-checkins at python.org
Thu Mar 15 01:22:04 CET 2012
http://hg.python.org/cpython/rev/d97ae725814c
changeset: 75675:d97ae725814c
parent: 75672:27441e0d6a75
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Mar 15 01:22:16 2012 +0100
summary:
Issue #14222: Use the new time.steady() function instead of time.time() for
timeout in queue and threading modules to not be affected of system time
update.
files:
Lib/queue.py | 2 +-
Lib/threading.py | 2 +-
Misc/NEWS | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Lib/queue.py b/Lib/queue.py
--- a/Lib/queue.py
+++ b/Lib/queue.py
@@ -6,7 +6,7 @@
import dummy_threading as threading
from collections import deque
from heapq import heappush, heappop
-from time import time
+from time import steady as time
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
diff --git a/Lib/threading.py b/Lib/threading.py
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -3,7 +3,7 @@
import sys as _sys
import _thread
-from time import time as _time, sleep as _sleep
+from time import steady as _time, sleep as _sleep
from traceback import format_exc as _format_exc
from _weakrefset import WeakSet
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,10 @@
Library
-------
+- Issue #14222: Use the new time.steady() function instead of time.time() for
+ timeout in queue and threading modules to not be affected of system time
+ update.
+
- Issue #13248: Remove lib2to3.pytree.Base.get_prefix/set_prefix.
- Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list