Text of peps.python.org › pep-0759 as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

PEP 759 – External Wheel Hosting | peps.python.org

PEP 759 – External Wheel Hosting PEP 759 – External Wheel Hosting Author : Barry Warsaw <barry at python.org>, Emma Harper Smith <emma at python.org> PEP-Delegate : Donald Stufft <donald at python.org> Discussions-To : Discourse thread Status : Withdrawn Type : Standards Track Topic : Packaging Created : 01-Oct-2024 Post-History : 10-Oct-2024, 31-Jan-2025 Resolution : 31-Jan-2025 Table of Contents Abstract PEP withdrawn Rationale Historical context The problem with multiple indexes Addressing PyPI limits Reducing operational complexity Specification Effects of the RIM file Availability order Wheels can override RIMs PyPI API bump unnecessary External hosting resiliency Dismounting wheels Changes to tools Constraints for external hosting services Security Rejected ideas Footnotes Copyright Abstract This PEP proposes a mechanism by which projects hosted on pypi.org can safely host wheel artifacts on external sites other than PyPI.

This PEP explicitly does not propose external hosting of projects, packages, or their metadata. That functionality is already available by externally hosting independent package indexes. Because this PEP only provides a mechanism for projects to customize the download URL for specific released wheel artifacts, dependency resolution as already implemented by common installer tools such as pip and uv does not need to change.

This PEP defines what it means to be “safe” in this context, along with a new package upload file format called a .rim file. It defines how .rim files affect the metadata returned for a package’s Simple Repository API in both HTML and JSON formats, and how traditional wheels can easily be turned into .rim files. PEP withdrawn This PEP was withdrawn by the authors on 2025-01-31. Our reading of the sentiment in the discussion thread is that, while the problems this PEP attempts to solve are valid, most folks would prefer a different approach.

Specifically, our read is that most users would prefer more control over the ability to specify multiple indexes, how those indexes interoperate, and the priority and trust assertions for those indexes. For example, solutions such as PEP 766 may provide a better way forward. Existing stop gap measures (e.g. PyPI limit increase requests and the “wheel-stub” approach) are sufficient – if not ideal – in the meantime.

The authors wish to thank everyone who contributed to the constructive discussion, and especially those who showed their support for this PEP, both in public and private. Rationale The Python Package Index, hosted at https://pypi.org , imposes default limits on upload artifact file size (100 MiB) and total project size (10 GiB). Most projects can comfortably fit within these limits during the lifetime of the project, through years of uploads.

A few projects have encountered these limits, and have been granted both file size and project size exceptions, allowing them to continue uploading new releases without having to take more drastic measures, such as removing files which may potentially still be in use by consumers (e.g. through version pins). A related workaround is the “wheel stub” approach, which provides an indirect link between PyPI and an external third party package index, where such limitations can be avoided.

Wheel stubs are source distributions (a.k.a. “sdists”) which utilize a PEP 517 build backend that, instead of turning source code into a binary wheel, performs some logic to calculate the URL for an existing, externally hosted wheel to download and install. This approach works, but it obscures the connection between PyPI, the sdist, and the externally hosted wheel, since there is no way to present this information to pip or other such tools.

Historical context In 2013, PEP 438 proposed a “backward-compatible two-phase transition process” to modify several aspects of release file hosting on PyPI. As this PEP describes, PyPI originally supported only project and release registration without also allowing for artifact file hosting. As such, most projects hosted release file artifacts elsewhere. Artifact hosting was later added, but the mix of externally and PyPI-hosted files led to a wide range of usability and potential security-related problems.

PEP 438 was an attempt to provide several facilities to allow external hosting while promoting a PyPI-first hosting preference. PEP 438 was complex, with three different “hosting modes”, rel metadata in the simple HTML index pages to signify hosting locations, and a two-phase transition plan affecting PyPI and installer tools. PEP 438 was ultimately retracted in 2015 by PEP 470 , which acknowledges that PEP 438 did succeed in… bringing about more people to utilize PyPI’s repository features, an altogether good thing given the global CDN powering PyPI providing speed ups for a lot of people[…] Instead of external hosting, PEP 470 promoted the use of explicit multiple repositories, providing full package indexing and artifact hosting, and enabled through installer tool support, such as pip install --extra-index-url allowing pip to essentially treat multiple repositories as one single global repository for package installation resolution.

Because this has been the blessed norm for so many years, all Python package installation tools support querying multiple indexes for dependency resolution. The problem with multiple indexes Why then does this PEP propose to allow a more limited form of external hosting, and how does this proposal avoid the problems documented in PEP 470? One well-known problem that consolidating multiple indexes enables is dependency confusion attacks , to which Python can be particularly vulnerable, due to the algorithm that pip install uses for resolving package dependencies and preferred versions.

The uv tool addresses this by supporting an additional index strategy option, whereby users can select between, e.g. a pip -compatible strategy, and a more limited strategy that prevents such dependency confusion attacks. PEP 708 provides additional background about dependency confusion attacks, and takes a different approach to preventing them. At its core, PEP 708 allows repository owners to indicate that projects track across different repositories, which allows installers to determine how to treat the global package namespace when combined across multiple repositories.

PEP 708 has been provisionally accepted, pending several required conditions as outlined in PEP 708, some of which may have an indeterminate future. As PEP 708 itself says, this won’t by itself solve dependency confusion attacks, but is one way to provide enough information to installers to help minimize these attacks. While there can still be valid use cases for standing up a totally independent package index (such as providing richer platform support for GPUs until a fully formed variant proposal is accepted), this PEP takes a different, simpler approach and doesn’t replace any of the existing, proposed, or approved package index cooperation specifications.

This PEP also preserves the core purpose of PyPI, and allows it to remain the traditional, canonical, centralized index of all Python packages. Addressing PyPI limits This proposal also addresses the problem of size limits imposed by PyPI, where there is a default artifact size limit of 100 MiB and a default overall project size limit of 10 GiB. Most packages and artifacts can easily fit in these limits, even for packages containing binary extension modules for a variety of platforms.

A small, but important class of packages routinely exceed these limits, requiring them to submit PyPI exception request support tickets . It’s not necessarily difficult to get resolution on such exceptions, but it is a special process that can take some time to resolve, and the criteria for granting such exceptions aren’t well documented. Reducing operational complexity Setting up and maintaining an entire package index can be a complex op

The rest of this page is on the live site.