|
| 1 | +PEP: 815 |
| 2 | +Title: Deprecate ``RECORD.jws`` and ``RECORD.p7s`` |
| 3 | +Author: Konstantin Schütze < [email protected]>, |
| 4 | + William Woodruff < [email protected]> |
| 5 | +Sponsor: Emma Harper Smith < [email protected]> |
| 6 | +PEP-Delegate: Paul Moore < [email protected]> |
| 7 | +Status: Draft |
| 8 | +Type: Standards Track |
| 9 | +Topic: Packaging |
| 10 | +Created: 04-Dec-2025 |
| 11 | +Post-History: `09-Jun-2025 <https://discuss.python.org/t/94968>`__, |
| 12 | + |
| 13 | + |
| 14 | +Abstract |
| 15 | +======== |
| 16 | + |
| 17 | +This PEP deprecates the ``RECORD.jws`` and ``RECORD.p7s`` wheel signature |
| 18 | +files. Lack of support in tooling means that these virtually unused files do |
| 19 | +not provide the security they purport. Users looking for wheel signing should |
| 20 | +instead refer to :ref:`index hosted attestations |
| 21 | +<packaging:index-hosted-attestations>`. |
| 22 | + |
| 23 | + |
| 24 | +Motivation |
| 25 | +========== |
| 26 | + |
| 27 | +No major Python packaging tool supports generating or checking either |
| 28 | +``RECORD.jws`` or ``RECORD.p7s``. Notably, neither pip nor uv validate the |
| 29 | +hashes in ``RECORD``, a requirement for using signature files. The |
| 30 | +:ref:`binary distribution format <packaging:binary-distribution-format>` |
| 31 | +presents them as security features, potentially resulting in user confusion. |
| 32 | + |
| 33 | +The state of the art for hashing and signing wheels has shifted from |
| 34 | +in-archive information to out-of-archive information presented on the index, |
| 35 | +such as hashes and :ref:`attestations <packaging:index-hosted-attestations>` |
| 36 | +in the :ref:`simple repository API <packaging:simple-repository-api>`. Unlike |
| 37 | +the hashes in ``RECORD``, tools such as pip and uv validate index provided |
| 38 | +hashes. |
| 39 | + |
| 40 | +Both files are virtually unused. A GitHub search for ``path:**.dist-info/RECORD`` |
| 41 | +yields 635k results, ``path:**.dist-info/RECORD.jws`` has 8 distinct results |
| 42 | +and ``path:**.dist-info/RECORD.p7s`` has zero results. |
| 43 | + |
| 44 | + |
| 45 | +Specification |
| 46 | +============= |
| 47 | + |
| 48 | +The ``RECORD.jws`` and ``RECORD.p7s`` files are deprecated, and the |
| 49 | +:ref:`binary distribution format specification |
| 50 | +<packaging:binary-distribution-format>` will be updated to reflect this. Build |
| 51 | +backends and other tools MUST NOT add these files to wheels. Installers |
| 52 | +SHOULD NOT attempt to verify them, while they remain excluded from ``RECORD``. |
| 53 | + |
| 54 | + |
| 55 | +Backwards Compatibility |
| 56 | +======================= |
| 57 | + |
| 58 | +No build backends and installers that the authors are aware of require any |
| 59 | +changes, as they do not support these files beyond skipping them when |
| 60 | +processing the ``RECORD`` file. If any build backends do currently write these |
| 61 | +files, they need to deprecate and eventually remove this feature. |
| 62 | + |
| 63 | +For verifying provenance, users should refer to |
| 64 | +:ref:`index hosted attestations <packaging:index-hosted-attestations>`. |
| 65 | + |
| 66 | + |
| 67 | +Security Implications |
| 68 | +===================== |
| 69 | + |
| 70 | +This PEP strengthens the security of the Python packaging ecosystem by |
| 71 | +reducing the divergence between security features presented in the |
| 72 | +specification and the security features supported by tools. |
| 73 | + |
| 74 | + |
| 75 | +Copyright |
| 76 | +========= |
| 77 | + |
| 78 | +This document is placed in the public domain or under the |
| 79 | +CC0-1.0-Universal license, whichever is more permissive. |
0 commit comments