Skip to content

Commit

Permalink
Ignore py__name__ issues for functools.partial in Python 3.13.0b3+
Browse files Browse the repository at this point in the history
See #2012 for details.
  • Loading branch information
PeterJCLaw committed Jul 5, 2024
1 parent 2551863 commit 857c9be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_api/test_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,14 @@ def func(a, b, c):
c = functools.partial(func, 1, c=2)

sig, = jedi.Interpreter(code, [locals()]).get_signatures()
assert sig.name == 'partial'
assert [p.name for p in sig.params] == expected
assert index == sig.index

if sys.version_info < (3, 13):
# Python 3.13.0b3 makes functools.partial be a descriptor, which breaks
# Jedi's `py__name__` detection; see https://github.com/davidhalter/jedi/issues/2012
assert sig.name == 'partial'


def test_type_var():
"""This was an issue before, see Github #1369"""
Expand Down

0 comments on commit 857c9be

Please sign in to comment.