-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Add npm and pip cooldown defaults #21919
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,6 +44,7 @@ | |||||||||||||
| require "api_hashable" | ||||||||||||||
| require "utils/output" | ||||||||||||||
| require "pypi_packages" | ||||||||||||||
| require "time" | ||||||||||||||
|
|
||||||||||||||
| # A formula provides instructions and metadata for Homebrew to install a piece | ||||||||||||||
| # of software. Every Homebrew formula is a {Formula}. | ||||||||||||||
|
|
@@ -2132,6 +2133,9 @@ def std_npm_args(prefix: libexec, ignore_scripts: true) | |||||||||||||
| } | ||||||||||||||
| def std_pip_args(prefix: self.prefix, build_isolation: false) | ||||||||||||||
| args = ["--verbose", "--no-deps", "--no-binary=:all:", "--ignore-installed", "--no-compile"] | ||||||||||||||
| # Delay packages published in the last day so builds are less likely to | ||||||||||||||
| # install a freshly compromised PyPI release. | ||||||||||||||
| args << "--uploaded-prior-to=#{(time - (24 * 60 * 60)).iso8601(0)}" | ||||||||||||||
|
MikeMcQuaid marked this conversation as resolved.
Comment on lines
+2136
to
+2138
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will only impact build-time packages when run in build-isolation. And nothing when no-build-isolation as we use To cooldown a Python formula's dependencies, need to update the resource resolver: brew/Library/Homebrew/utils/pypi.rb Lines 510 to 515 in 7c387d9
EDIT: Though this may want to wait for bump support, i.e. #21888, so that the cooldown is applied to both main package and dependencies
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, let's add there too.
Let's not. Let's not perfect be the enemy of good here.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||
| args << "--prefix=#{prefix}" if prefix | ||||||||||||||
| args << "--no-build-isolation" unless build_isolation | ||||||||||||||
| args | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.