This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Option to delete obsolete bytecode files
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Sworddragon, steven.daprano
Priority: normal Keywords:

Created on 2015-04-28 16:44 by Sworddragon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg242189 - (view) Author: (Sworddragon) Date: 2015-04-28 16:44
The library compileall has the option -f to force the rebuilding of the bytecode files so I thought maybe there could also be an option to delete all bytecode files which haven't a non-bytecode library anymore.
msg242358 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2015-05-02 00:00
This would be risky, as byte-code only libraries do exist.

I think that deleting orphaned .pyc files from inside the __pycache__ directory is safe, but deleting orphaned .pyc files outside of that risks deleting legitimate byte-code libraries which are in use.
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68257
2021-10-21 19:17:27iritkatrielsetstatus: open -> closed
resolution: rejected
stage: resolved
2015-05-02 00:00:49steven.dapranosetnosy: + steven.daprano
messages: + msg242358
2015-04-29 12:44:10brett.cannonsetversions: + Python 3.5, - Python 3.4
2015-04-28 16:44:18Sworddragoncreate