As mentioned .pyc are working now when sys.dont_write_bytecode is set to False.
I would like to make the use of .pyc files the default but I am not sure how should we follow changes in the bytecode. CPython has a magic number defined in _bootstrap_external.py that changes every time the bytecode is changed. RustPython is changing rapidly and I don't think we would like to update a magic number every change in the bytecode.
I have a few suggestion:
- Use the git commit as the magic: Would allow multiple runs with same
.pyc without code changes.
- Use a random number on main start: Would allow only the same run of main to use the same
.pyc.
As mentioned .pyc are working now when
sys.dont_write_bytecodeis set toFalse.I would like to make the use of
.pycfiles the default but I am not sure how should we follow changes in the bytecode. CPython has a magic number defined in_bootstrap_external.pythat changes every time the bytecode is changed. RustPython is changing rapidly and I don't think we would like to update a magic number every change in the bytecode.I have a few suggestion:
.pycwithout code changes..pyc.