Skip to content

heapq.heappush called with too few arguments in sched.py #47052

Closed

Description

@mthard
mannequin
BPO 2803
Nosy @birkenfeld
Files
  • sched.py.patch: Patch to sched.py
  • sched.py.patch-r252: Patch to sched.py on Python 2.5.2
  • 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 = None
    closed_at = <Date 2008-05-11.15:22:05.078>
    created_at = <Date 2008-05-09.15:27:03.262>
    labels = ['library', 'type-crash']
    title = 'heapq.heappush called with too few arguments in sched.py'
    updated_at = <Date 2008-05-11.15:22:05.076>
    user = 'https://bugs.python.org/mthard'

    bugs.python.org fields:

    activity = <Date 2008-05-11.15:22:05.076>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-05-11.15:22:05.078>
    closer = 'georg.brandl'
    components = ['Library (Lib)']
    creation = <Date 2008-05-09.15:27:03.262>
    creator = 'mthard'
    dependencies = []
    files = ['10233', '10244']
    hgrepos = []
    issue_num = 2803
    keywords = ['patch']
    message_count = 3.0
    messages = ['66480', '66524', '66640']
    nosy_count = 3.0
    nosy_names = ['georg.brandl', 'rbp', 'mthard']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue2803'
    versions = ['Python 2.6', 'Python 2.5', 'Python 3.0']

    Activity

    1. mthard commented on May 9, 2008

      mthardmannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-crashA hard crash of the interpreter, possibly with a core dump
      on May 9, 2008
    3. rbp commented on May 10, 2008

      rbpmannequin
      Mannequin

      +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.

    4. birkenfeld commented on May 11, 2008

      @birkenfeld
      Member

      Thanks, fixed in r63070, r63071 (2.5).

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-crashA hard crash of the interpreter, possibly with a core dump

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions