Skip to content

Compatibility Issue: Pytype Fails with Pip 25.1 Due to SyntaxError #1909

@KumoLiu

Description

@KumoLiu

It seems that the recent update to Pip 25.1 is causing a syntax-related problem with Pytype.
https://pypi.org/project/pip/#history

[2025-05-02T12:22:14.425Z] Traceback (most recent call last):

[2025-05-02T12:22:14.425Z]   File "/usr/lib/python3.9/py_compile.py", line 144, in compile

[2025-05-02T12:22:14.425Z]     code = loader.source_to_code(source_bytes, dfile or file,

[2025-05-02T12:22:14.425Z]   File "<frozen importlib._bootstrap_external>", line 918, in source_to_code

[2025-05-02T12:22:14.425Z]   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed

[2025-05-02T12:22:14.425Z]   File "/usr/local/lib/python3.9/dist-packages/pytype/tools/merge_pyi/test_data/parse_error.py", line 2

[2025-05-02T12:22:14.425Z]     def f(*): pass

[2025-05-02T12:22:14.425Z]            ^

[2025-05-02T12:22:14.425Z] SyntaxError: named arguments must follow bare *

[2025-05-02T12:22:14.425Z] 

[2025-05-02T12:22:14.425Z] During handling of the above exception, another exception occurred:

[2025-05-02T12:22:14.425Z] 

[2025-05-02T12:22:14.426Z] Traceback (most recent call last):

[2025-05-02T12:22:14.426Z]   File "/usr/lib/python3.9/compileall.py", line 238, in compile_file

[2025-05-02T12:22:14.426Z]     ok = py_compile.compile(fullname, cfile, dfile, True,

[2025-05-02T12:22:14.426Z]   File "/usr/lib/python3.9/py_compile.py", line 150, in compile

[2025-05-02T12:22:14.426Z]     raise py_exc

[2025-05-02T12:22:14.426Z] py_compile.PyCompileError:   File "/usr/local/lib/python3.9/dist-packages/pytype/tools/merge_pyi/test_data/parse_error.py", line 2

[2025-05-02T12:22:14.426Z]     def f(*): pass

[2025-05-02T12:22:14.426Z]            ^

[2025-05-02T12:22:14.426Z] SyntaxError: named arguments must follow bare *

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions