From 857c9be500eda6b94d33732387812e599b5cf078 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Fri, 5 Jul 2024 21:36:23 +0100 Subject: [PATCH] Ignore py__name__ issues for functools.partial in Python 3.13.0b3+ See https://github.com/davidhalter/jedi/issues/2012 for details. --- test/test_api/test_interpreter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test_api/test_interpreter.py b/test/test_api/test_interpreter.py index c0099c409..1aa027bf4 100644 --- a/test/test_api/test_interpreter.py +++ b/test/test_api/test_interpreter.py @@ -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"""