Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension function optional argument specification | causes RuntimeError #48970

Closed
pearu mannequin opened this issue Dec 22, 2008 · 2 comments
Closed

Extension function optional argument specification | causes RuntimeError #48970

pearu mannequin opened this issue Dec 22, 2008 · 2 comments
Labels
extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@pearu
Copy link
Mannequin

pearu mannequin commented Dec 22, 2008

BPO 4720
Nosy @benjaminp
Files
  • barmodule.c: Extension module demonstrating the bug
  • 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-12-22.20:53:19.841>
    created_at = <Date 2008-12-22.12:49:22.682>
    labels = ['extension-modules', 'type-crash']
    title = 'Extension function optional argument specification | causes RuntimeError'
    updated_at = <Date 2008-12-22.20:53:19.839>
    user = 'https://bugs.python.org/pearu'

    bugs.python.org fields:

    activity = <Date 2008-12-22.20:53:19.839>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-12-22.20:53:19.841>
    closer = 'benjamin.peterson'
    components = ['Extension Modules']
    creation = <Date 2008-12-22.12:49:22.682>
    creator = 'pearu'
    dependencies = []
    files = ['12424']
    hgrepos = []
    issue_num = 4720
    keywords = []
    message_count = 2.0
    messages = ['78179', '78209']
    nosy_count = 2.0
    nosy_names = ['pearu', 'benjamin.peterson']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue4720'
    versions = ['Python 2.6']

    @pearu
    Copy link
    Mannequin Author

    pearu mannequin commented Dec 22, 2008

    Calling the following extension function

    static PyObject *
    baz(PyObject *self, PyObject *args, PyObject *keywds)
    {
      static char *kwlist[] = {NULL};
      if (!PyArg_ParseTupleAndKeywords(args,keywds,"|:bar.baz", kwlist))
        return NULL;
      return Py_BuildValue("");
    }

    raises

    RuntimeError: more argument specifiers than keyword list entries
    (remaining format:'|:bar.baz')

    in Python 2.6 but it used to work with earlier versions of Python.

    This bug breaks all f2py generated extension modules when using Python 2.6.

    @pearu pearu mannequin added extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump labels Dec 22, 2008
    @benjaminp
    Copy link
    Contributor

    Thanks for the report! Fixed in r67905.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant