Releases now reject new files after 14 days - The Python Package Index Blog
Initializing search
GitHub
Authors
Releases now reject new files after 14 days
The Python Package Index (PyPI) now rejects new files being uploaded to releases<br>that are older than 14 days. This restriction was put in place to prevent<br>old and long-stable releases from being poisoned in case publishing tokens or workflows<br>of PyPI projects were compromised. As far as we<br>are aware this has not yet been abused, but there is no technical reason<br>beyond that attackers weren't aware it was possible.
Users should not yet rely on this behavior as there are no defined semantics<br>for "releases no longer accepting new files" or APIs available to confirm<br>the state of the release. Instead, these semantics will be defined once<br>"Upload 2.0 API" and "Staged Previews" have been standardized by<br>PEP 694.
The discussion of this behavior began during PEP 740 (Digital Attestations) back<br>in January 2024. The discussion was restarted in March 2026 after the popular packages LiteLLM and Telnyx<br>were compromised.<br>These packages were compromised due to a "mutable reference" in these projects'<br>usage of the Trivy GitHub Action.
Originally the discussion stalled due to some projects depending on<br>this behavior to add support for new Python versions to already-published releases.<br>To quantify how disruptive this change would be to existing workflows,<br>the PyPI database was queried for projects that have published<br>new files to old releases (bucketed by number of days since the release).<br>Later, specifically cp314 wheels were queried for the top 15,000 packages, revealing<br>that only 56 projects of 15,000 had published a 3.14-compatible wheel<br>more than 14 days after a release was available.
This topic was brought to the Packaging Summit at PyCon US 2026 by PyPI Safety & Security<br>Engineer, Mike Fiedler. The rough consensus of the discussion was that the summit attendees thought<br>it was "acceptable to require users to bump to the next version" to support<br>new Python versions. With the data and consensus in hand, Seth moved forward with<br>a patch to reject new files on<br>old releases which was merged July 8th, 2026.
This change will protect Python users and reduce the amount of "cleanup"<br>work associated with project compromises for PyPI admins. This restriction<br>also means that compromises don't put releases into an indeterminate and<br>confusing state of both "compromised" and "not compromised", where only a subset<br>of files could be poisoned with malware. Stay tuned for the future where<br>Upload 2.0 API provides semantics for releases that are "closed" instead<br>of "open".
Seth Larson and Mike Fiedler's work at the Python Software Foundation is<br>supported by Alpha-Omega.
Back to top
Made with
Material for MkDocs