PyPI now rejects new files after 14 days

Post Syndicated from jzb original https://lwn.net/Articles/1084218/

Python Software Foundation security developer-in-residence Seth
Larson has announced
that the Python Package Index (PyPI) will now reject new files that
are uploaded to releases older than 14 days. The restriction is to
prevent the poisoning of old releases if publishing tokens or
workflows of PyPI projects are compromised.

The discussion
of this behavior began
during PEP 740 (Digital Attestations) back in January
2024. The discussion was restarted
in March 2026
after the popular packages LiteLLM
and Telnyx were compromised
. These packages were compromised due to a “mutable
reference
” in these projects’ usage of the Trivy GitHub Action.

Originally the discussion stalled due to some projects depending on this behavior
to add support for new Python versions to already-published releases. To quantify how
disruptive this change would be to existing workflows, the PyPI database was queried
for projects
that have published new files to old releases
(bucketed by number of days since
the release). Later, specifically cp314 wheels were queried for the top
15,000 packages, revealing that only
56 projects of 15,000
had published a 3.14-compatible wheel more than 14 days
after a release was available.

LWN covered the LiteLLM compromise
in March.