Skip to content
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

Simplify _should_cache #8145

Merged
merged 1 commit into from
May 21, 2020
Merged

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Apr 26, 2020

The condition "never cache if pip install would not have built"
can be simplified to "do not cache editable requirements".
This is easier to read, and avoids a double warning if the 'wheel'
package is not installed.

Note the test for req.source_dir is copied as is from _should_build so the code is equivalent.
I suspect it is not necessary, but this can be left for a future refactoring.

Towards #8102

The condition "never cache if pip install would not have built"
can be simplified to "do not cache editable requirements".
This is easier to read, and avoid a double warning if the 'wheel'
package is not installed.
@sbidoul sbidoul added type: refactor Refactoring code skip news Does not need a NEWS file entry (eg: trivial changes) labels Apr 26, 2020
@sbidoul sbidoul marked this pull request as ready for review April 26, 2020 10:34
@sbidoul sbidoul mentioned this pull request May 10, 2020
13 tasks
@sbidoul
Copy link
Member Author

sbidoul commented May 21, 2020

This one should be good to go now that 20.1.1 is out.

@pradyunsg pradyunsg merged commit 76b8651 into pypa:master May 21, 2020
@sbidoul sbidoul deleted the simplfy-should_cache-sbi branch May 21, 2020 16:01
@sbidoul
Copy link
Member Author

sbidoul commented May 21, 2020

Thanks @pradyunsg !

@pradyunsg
Copy link
Member

Thank you for figuring this out and making the PR. :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants