-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
The tool knows how to make a .pyc or .pyo file, depending on a construction variable $CPYTHON_PYC. However:
PEP 3147 introduced .pyc directories and versioning as of Python 3.2. That is, instead of foo.py being compiled to foo.pyc, it by default becomes __pycache__/foo.cpython-311.pyc IFF the compiler version is CPython 3.11.
Then PEP 488 eliminated pyo files entirely as of Python 3.5. They now use an encoding on the .pyc filename, so that foo.py compiled with optimization level 1 yields a filename __pycache__/foo.cpython-311.opt-1.pyc by default.
To be useful in a modern Python environment, those changes need to be accounted for.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels