summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-07-14 05:48:49 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-07-14 05:48:49 (GMT)
commit468bcaffd6e8417acef82051f24d225f73097037 (patch)
treebceb016ecf556c038e58517cfe59066bd14f0a1f
parent90dea4ce43a0ebfe9961e854b605d167e0f57863 (diff)
parent889b92d3aa88b1d38d1f96907e0c02bea6d81777 (diff)
downloadcpython-468bcaffd6e8417acef82051f24d225f73097037.zip
cpython-468bcaffd6e8417acef82051f24d225f73097037.tar.gz
cpython-468bcaffd6e8417acef82051f24d225f73097037.tar.bz2
merge
-rw-r--r--Lib/sched.py2
-rw-r--r--Lib/test/test_sched.py2
-rw-r--r--Misc/NEWS3
3 files changed, 5 insertions, 2 deletions
diff --git a/Lib/sched.py b/Lib/sched.py
index 9a82a89..2e6b00a 100644
--- a/Lib/sched.py
+++ b/Lib/sched.py
@@ -164,4 +164,4 @@ class scheduler:
# the actual order they would be retrieved.
with self._lock:
events = self._queue[:]
- return map(heapq.heappop, [events]*len(events))
+ return list(map(heapq.heappop, [events]*len(events)))
diff --git a/Lib/test/test_sched.py b/Lib/test/test_sched.py
index 853b4d8..c6abf3d 100644
--- a/Lib/test/test_sched.py
+++ b/Lib/test/test_sched.py
@@ -172,7 +172,7 @@ class TestCase(unittest.TestCase):
e3 = scheduler.enterabs(now + 0.03, 1, fun)
# queue property is supposed to return an order list of
# upcoming events
- self.assertEqual(list(scheduler.queue), [e1, e2, e3, e4, e5])
+ self.assertEqual(scheduler.queue, [e1, e2, e3, e4, e5])
def test_args_kwargs(self):
flag = []
diff --git a/Misc/NEWS b/Misc/NEWS
index 0c9e9ef..7b553ae 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -157,6 +157,9 @@ Library
- Issue #18431: The new email header parser now decodes RFC2047 encoded words
in structured headers.
+- Issue #18432: The sched module's queue method was incorrectly returning
+ an iterator instead of a list.
+
- Issue #18044: The new email header parser was mis-parsing encoded words where
an encoded character immediately followed the '?' that follows the CTE
character, resulting in a decoding failure. They are now decoded correctly.