The Python Package Index (PyPI) has implemented a new security measure that restricts uploads of new files to package releases older than 14 days. This change, which went into effect following a patch merged on July 8, 2026, aims to prevent attackers from injecting malicious code into established, stable releases if a project's publishing credentials or release workflows are compromised.
According to Seth Larson, Security Developer-in-Residence at the Python Software Foundation, the restriction is designed to protect Python users and reduce the administrative burden on PyPI staff in the event of a project compromise. It also prevents releases from entering an ambiguous state where only a subset of files might be malicious. PyPI currently does not provide an API to determine a release's status or define specific semantics for releases that no longer accept new files, and users are advised not to rely on such features until they are standardized, potentially under PEP 694's Upload 2.0 API and Staged Previews.
The proposal for this restriction emerged from discussions surrounding PEP 740 (Digital Attestations) in January 2024. It gained renewed urgency after the compromise of the LiteLLM and Telnyx packages in March 2026. This incident was attributed to a mutable reference in how those projects utilized the Trivy GitHub Action.
Initially, the implementation of such a restriction was postponed due to concerns that some projects legitimately uploaded new files to older releases to introduce compatibility with newer Python versions. However, PyPI conducted an analysis of this practice and found it to be uncommon. Among the top 15,000 packages, only 56 had uploaded a Python 3.14-compatible wheel more than 14 days after the original release date, suggesting that the new restriction will impact a minimal number of projects.
The change was proposed by PyPI Safety Security Engineer Mike Fiedler and received broad support during the 2026 Packaging Summit. Attendees generally agreed that projects should publish an entirely new package version when adding support for newer Python releases, rather than modifying an existing one. Larson subsequently implemented the necessary code changes.






