davidhalter / davidhalter/jedi
Python 3.13.0b3+ `functools.partial` being a descriptor messes with signatures
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 535
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
Start in DirectObjectAccess.py__name__ and inspect how the inspect.ismethoddescriptor result handles functools.partial under Python 3.13+. Reproduce the Interpreter name-resolution failure and verify that partially applied functions no longer fall back to __repr__.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100