Post #2295971
2026-05-01 16:54 UTC
Adding `--uploaded-prior-to=P4D` to your `pip install` commands is a trivially easy way to reduce your exposure to malware in compromised PyPI packages.
The updated flag tells `pip` to only install packages of at least the given age, e.g. 4 days. Malicious packages are often detected and removed from PyPI in less time than this.
https://ichard26.github.io/blog/2026/04/whats-new-in-pip-26.1/#dependency-cooldowns
ht: @simon #python #pypi
Replies (0)
No replies.