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

Python 3.13.0b3+ functools.partial being a descriptor messes with signatures #2012

Open
PeterJCLaw opened this issue Jul 5, 2024 · 1 comment

Comments

@PeterJCLaw
Copy link
Collaborator

As we found out on #2003, in Python 3.13+ functools.partial is now a descriptor. In turn this means that Interpreter (which uses a mix of access to real objects and code analysis) fails to resolve a suitable name for partially applied functions and ends up using the __repr__ instead.

The specific issue is that DirectObjectAccess.py__name__ is confused by the result of its inspect.ismethoddescriptor check.

See also discussion on #2003, from which this is broken out.

PeterJCLaw added a commit to PeterJCLaw/jedi that referenced this issue Jul 5, 2024
@davidhalter
Copy link
Owner

Just as a small addition: I feel like this is a general issue with descriptors and I'm not really sure we can fix that for the general case. Since the names of the descriptor are not really the name that the signature should have...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants