build: use pip's dependency cooldown feature#1356
Open
Conversation
ec5a9d0 to
04ca757
Compare
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
04ca757 to
432173a
Compare
… can be installed Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
jenstroeger
reviewed
Apr 10, 2026
Contributor
jenstroeger
left a comment
There was a problem hiding this comment.
This is great and very useful to avoid immediate CI breakage with new packages!
| # released very recently, for example: | ||
| # make setup PYPI_UPLOAD_DELAY_DAYS=1 | ||
| PYPI_UPLOAD_DELAY_DAYS ?= 2 | ||
| PYPI_UPLOADED_PRIOR_TO ?= $$(date -d '-$(PYPI_UPLOAD_DELAY_DAYS)days' -Idate) |
Contributor
There was a problem hiding this comment.
Might not apply here, but the default macOS date command will fail:
jens@pooh ~ > which date # GNU date command.
/opt/local/libexec/gnubin/date
jens@pooh ~ > date -d '2days' -Idate
2026-04-12
jens@pooh ~ > /bin/date -d '2days' -Idate # macOS default date command
/bin/date: illegal option -- d
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
[-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
[[[[mm]dd]HH]MM[[cc]yy][.SS] | new_date] [+output_fmt]
Comment on lines
-79
to
+80
| run: make setup | ||
| run: make setup PYPI_UPLOAD_DELAY_DAYS=1 |
Contributor
There was a problem hiding this comment.
I keep looking for the documentation of this notation 🤔 PYPI_UPLOAD_DELAY_DAYS=1 after the target is a variable passed to make?
If I use
PYPI_UPLOAD_DELAY_DAYS=1 make setupthen PYPI_UPLOAD_DELAY_DAYS is an environment variable passed to make (discussion) so it’s available in the Makefile (docs).
But I can’t find the above notation documented?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use
pip's--uploaded-prior-tooption to avoid installing packages that have very recently been published to PyPI. By doing so, this allows for human operators like security researchers and PyPI admins a chance to respond to reports of malware. See: https://blog.pypi.org/posts/2026-04-02-incident-report-litellm-telnyx-supply-chain-attack/