Skip to content

Don't attempt to build requirements that don't need to be installed #13363

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

Merged
merged 1 commit into from
May 2, 2025

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Apr 29, 2025

requirements_to_install is scheduled for removal together with the legacy resolver, at which point we should be able to use all requirements returned by resolve() unconditionally.

fixes #13353

I still need to to look for variants of this problem in the wheel, lock and download commands.

This indeed only happens with the legacy resolver which can return things such as constraints in the RequirementsSet, and unfortunately the logic to filter these out after resolution is dispersed in several places.

@pfmoore I tentatively assigned this to 25.1, but we may sill decide this is not worth a bugfix release and say that affected users need to stop using the legacy resolver or stick to 25.0.

@sbidoul sbidoul added this to the 25.1 milestone Apr 29, 2025
requirements_to_install is scheduled for removal together with
the legacy resolver, at which point we should be able to use
all requirements returned by resolve() unconditionally.
@sbidoul
Copy link
Member Author

sbidoul commented Apr 29, 2025

I think pip wheel is affected by a variant of this issue. download probably not. lock probably is but I'll declare that pip lock does not support the legacy resolver.

@notatallshaw
Copy link
Member

notatallshaw commented Apr 30, 2025

I think pip wheel is affected by a variant of this issue

Does seem possible, but I couldn't come up with a reproducer, I would be fine waiting on someone to report a reproducible example before trying to fix.

@sbidoul sbidoul mentioned this pull request May 2, 2025
@pfmoore pfmoore merged commit 2bff84e into pypa:main May 2, 2025
29 checks passed
@sbidoul sbidoul deleted the fix-source_dir-assert branch May 2, 2025 14:59
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pip 25.1] assert req.source_dir fails with the legacy resolver enabled
3 participants