Skip to content

test_compiled_signature fails in Python 3.12 for next #1952

Closed

Description

@frenzymadness

The failure is caused by the different signature for next builtin function:

>       assert signature.to_string() == sig
E       AssertionError: assert 'next()' == 'next(iterato...ault=None, /)'
E         - next(iterator, default=None, /)
E         + next()

This might actually be a problem in CPython because I've found some strange changes in help texts of some builtin functions as well. I've opened this issue: python/cpython#107526

What I don't understand is how Jedi gets signatures of builtin functions. inspect.signature does not work for builtins. Could you please help me understand how Jedi works here? It can help me find the right place in CPython to fix.

Activity

  1. davidhalter commented on Aug 1, 2023

    @davidhalter
    Owner

    Jedi parses the __doc__ attribute, that's how it works. So either having a proper functioning inspect.signature or having a __doc__ in the format of builtins will make it possible for Jedi to have this kind of information.

  2. davidhalter commented on Apr 27, 2026

    @davidhalter
    Owner

    I assume this is not an issue anymore, because 3.12 has been working for a long time in CI. Let me know if there are still issues and I will reopen.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions