You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fedora has switched to Python 3.13 in its Rawhide branch in preparation for Fedora 41. This has brought to our attention that jedi's test_completion_param_annotations test fails with this version of Python.
🐍 .py3.13 ❯ pytest -k test_completion_param_annotations
========================================== test session starts ===========================================
platform linux -- Python 3.13.0b2, pytest-6.2.5, py-1.11.0, pluggy-1.5.0
rootdir: /home/carl/development/jedi, configfile: pytest.ini, testpaths: jedi, test
collected 3888 items / 3887 deselected / 1 selected
test/test_api/test_interpreter.py F [100%]
================================================ FAILURES ================================================
___________________________________ test_completion_param_annotations ____________________________________
def test_completion_param_annotations():
# Need to define this function not directly in Python. Otherwise Jedi is too
# clever and uses the Python code instead of the signature object.
code = 'def foo(a: 1, b: str, c: int = 1.0) -> bytes: pass'
exec(code, locals())
script = jedi.Interpreter('foo', [locals()])
> c, = script.complete()
E ValueError: not enough values to unpack (expected 1, got 0)
test/test_api/test_interpreter.py:315: ValueError
======================================== short test summary info =========================================
FAILED test/test_api/test_interpreter.py::test_completion_param_annotations - ValueError: not enough va...
=================================== 1 failed, 3887 deselected in 0.55s ===================================
The text was updated successfully, but these errors were encountered:
In Python 3.13 the `locals` function now returns a fresh mapping
each time it's called (when called in a function). We thus need
to store a reference to the mapping being used, rather than
re-fetching it each time.
Since we don't actually need to modify the locals within the scope
of the test function itself, it suffices to use our own mapping
here rather than the result of calling `locals`, which fully
isolates this test from the nature of that function.
Fixesdavidhalter#2002
Fedora has switched to Python 3.13 in its Rawhide branch in preparation for Fedora 41. This has brought to our attention that jedi's
test_completion_param_annotations
test fails with this version of Python.The text was updated successfully, but these errors were encountered: