[issue2803] heapq.heappush called with too few arguments in sched.py

Matt Harden report at bugs.python.org
Fri May 9 17:27:05 CEST 2008


New submission from Matt Harden <mthard at monsanto.com>:

In the method scheduler.run in the sched module, heapq.heappush is
called with single argument (event).  It's a two argument function.  The
correct call would be heapq.heappush(q, event).

This problem is probably not frequently experienced because it only
occurs if the delay function modifies the queue, deleting the top entry
while sched.run() is waiting to execute it.

A patch is attached based on the trunk.

----------
components: Library (Lib)
files: sched.py.patch
keywords: patch
messages: 66480
nosy: mthard
severity: normal
status: open
title: heapq.heappush called with too few arguments in sched.py
type: crash
versions: Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10233/sched.py.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2803>
__________________________________


More information about the Python-bugs-list mailing list