You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
heapq.heappush called with too few arguments in sched.py #47052
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2008-05-11.15:22:05.078>created_at=<Date2008-05-09.15:27:03.262>labels= ['library', 'type-crash']
title='heapq.heappush called with too few arguments in sched.py'updated_at=<Date2008-05-11.15:22:05.076>user='https://bugs.python.org/mthard'
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.
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
r252).
I started writing a test for it, but it's such an obvious and trivial
patch that I think it's unnecessary.
Activity
mthard commentedon May 9, 2008
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.
rbp commentedon May 10, 2008
+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
r252).
I started writing a test for it, but it's such an obvious and trivial
patch that I think it's unnecessary.
birkenfeld commentedon May 11, 2008
Thanks, fixed in r63070, r63071 (2.5).