PEP 552
E925734
PEP 552 is a Python Enhancement Proposal that introduced deterministic, hash-based .pyc files to improve reproducibility and caching behavior in Python.
Statements (47)
| Predicate | Object |
|---|---|
| instanceOf | Python Enhancement Proposal ⓘ |
| addsField |
flags field in pyc header
ⓘ
hash field in pyc header ⓘ |
| affectsFileType |
.pyc files
ⓘ
Python bytecode cache files ⓘ |
| aimsTo |
improve .pyc caching behavior
ⓘ
improve build reproducibility ⓘ |
| author | Benjamin Peterson NERFINISHED ⓘ |
| category | Standards Track ⓘ |
| createdBy | Benjamin Peterson NERFINISHED ⓘ |
| definesFlag |
checked-hash pyc flag
ⓘ
timestamp pyc flag ⓘ unchecked-hash pyc flag ⓘ |
| definesMode |
hash-based pyc invalidation mode
ⓘ
timestamp-based pyc invalidation mode ⓘ unchecked-hash pyc invalidation mode ⓘ |
| discussedOn | python-dev mailing list NERFINISHED ⓘ |
| discusses |
backwards compatibility for pyc files
ⓘ
pyc header format ⓘ |
| ensures | pyc content depends only on source and options ⓘ |
| hasTitle | Deterministic pycs ⓘ |
| hostedAt |
https://peps.python.org/pep-0552/
ⓘ
https://www.python.org/dev/peps/pep-0552/ ⓘ |
| implementedInVersion | Python 3.7 NERFINISHED ⓘ |
| introducesConcept |
deterministic pyc compilation
ⓘ
hash-based pyc invalidation ⓘ |
| language | Python NERFINISHED ⓘ |
| modifiesComponent |
Python import system
ⓘ
compileall module ⓘ py_compile module ⓘ |
| motivatedBy |
limitations of timestamp-based invalidation
ⓘ
need for deterministic builds ⓘ |
| pepNumber | 552 ⓘ |
| proposes |
deterministic .pyc files
ⓘ
hash-based .pyc files ⓘ |
| reduces | spurious pyc recompilation ⓘ |
| relatedTo |
PEP 488
NERFINISHED
ⓘ
Python importlib NERFINISHED ⓘ |
| replacesBehavior | non-deterministic timestamp-based pyc generation ⓘ |
| requiresChangeTo | CPython interpreter NERFINISHED ⓘ |
| status | Accepted ⓘ |
| supportsUseCase |
content-addressable pyc caches
ⓘ
networked or shared pyc caches ⓘ reproducible Python builds ⓘ |
| targetsImplementation | CPython NERFINISHED ⓘ |
| type | Standards Track PEP NERFINISHED ⓘ |
| versionIntroduced | Python 3.7.0 ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.