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.

Title: heapq.heappush called with too few arguments in
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6, Python 2.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, mthard, rbp
Priority: normal Keywords: patch

Created on 2008-05-09 15:27 by mthard, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit mthard, 2008-05-09 15:27 Patch to rbp, 2008-05-10 14:04 Patch to on Python 2.5.2
Messages (3)
msg66480 - (view) Author: Matt Harden (mthard) Date: 2008-05-09 15:27
In the method 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 is waiting to execute it.

A patch is attached based on the trunk.
msg66524 - (view) Author: Rodrigo Bernardo Pimentel (rbp) (Python committer) Date: 2008-05-10 14:04
+1 on the patch.

IIRC, there won't be any more bugfix releases for 2.5.x, but, just in
case: the patch doesn't work on 2.5 (though the issue lists it as an
affected version - and it is!), so I'm uploading a patch for it (svn tag

I started writing a test for it, but it's such an obvious and trivial
patch that I think it's unnecessary.
msg66640 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-11 15:22
Thanks, fixed in r63070, r63071 (2.5).
Date User Action Args
2022-04-11 14:56:34adminsetgithub: 47052
2008-05-11 15:22:05georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg66640
nosy: + georg.brandl
2008-05-10 14:04:17rbpsetfiles: +
nosy: + rbp
messages: + msg66524
2008-05-09 15:27:03mthardcreate