Skip to content

SyntaxError: f-string: unmatched '(' #10

@chuanqi129

Description

@chuanqi129

Description

Followed the demo tutorial in https://github.com/wheelnext/pep_xxx_wheel_variants/blob/main/docs/tutorials/PyTorch.md. After installed the pep-xx-wheel-variants version pip. Got SyntaxError: f-string: unmatched '(' failure

Which can be fixed by replace the " to ' in https://github.com/wheelnext/pip/blob/pep-xxx-wheel-variants/src/pip/_internal/utils/variant.py#L39

Expected behavior

No response

pip version

25.1.dev0+pep-xxx-wheel-variants

Python version

3.10.18

OS

Ubuntu 22.04

How to Reproduce

  1. pip config set --site global.index-url https://variants-index.wheelnext.dev/

  2. pip install pep-xxx-wheel-variants

  3. pip --version

Output

$ pip --version
Traceback (most recent call last):
  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/lib/python3.10/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/lib/python3.10/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/lib/python3.10/site-packages/pip/_internal/cli/main_parser.py", line 9, in <module>
    from pip._internal.cli import cmdoptions
  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/lib/python3.10/site-packages/pip/_internal/cli/cmdoptions.py", line 30, in <module>
    from pip._internal.models.target_python import TargetPython
  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/lib/python3.10/site-packages/pip/_internal/models/target_python.py", line 8, in <module>
    from pip._internal.utils.variant import VariantJson
  File "/localdisk/chuanqiw/miniforge3/envs/test_variant/lib/python3.10/site-packages/pip/_internal/utils/variant.py", line 39
    f"{wheel.name.replace("-", "_")}-{wheel.version.replace("-", "_")}-"
                           ^
SyntaxError: f-string: unmatched '('

Code of Conduct

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