Skip to content

Add rstrip in def _strip_extras #13523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mtsokol
Copy link

@mtsokol mtsokol commented Aug 4, 2025

Hi All,

Installing from .whl file with extras, where there's a whitespace between filename and extras section is broken:

bash-3.2$ pip install '/tmp/array_record/all_dist/array_record.whl [beam]'
ERROR: Invalid requirement: '/tmp/array_record/all_dist/array_record.whl [beam]': Expected package name at the start of dependency specifier
    /tmp/array_record/all_dist/array_record.whl [beam]
    ^
Hint: It looks like a path. File '/tmp/array_record/all_dist/array_record.whl [beam]' does not exist.

which is caused by untrimmed file extension: .whl instead of .whl.

This PR fixes it by striping path when separating from extras section, with a test that fails for the current main.

@notatallshaw
Copy link
Member

Hi @mtsokol thanks for your PR to pip, please be aware it may take a bit for a maintainer to review as we are all doing this on a volunteer basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants