pyclean
pyclean copied to clipboard
Consider parallel file system cache (Python 3.8)
Since Python 3.8 there is a parallel file system cache as an alternative to __pycache__ folders. See What’s New In Python 3.8.
This probably also needs to be cleaned up.
@bittner FYI (I haven‘t looked at your implementation yet): Maybe the following helps what I normally do for Python cleanup.
SEE ALSO:
- invoke-cleanup: clean_python task functionality — Contains
__pycache__/directory cleanups.
RELATED TOOL:
- pycmd:
py.cleanupcommand performs similar things: https://pypi.org/project/pycmd/
@jenisys FWICS none of the two implementation handles the sys.pycache_prefix path value. The "normal" cleanup is already handled by PyClean.
Said that, I not sure whether cleaning up a directory that is explicitly specified should be in the scope of a cleanup tool at all. That might have unwanted side-effects on the one hand, and may be unexpected on the other hand (because it doesn't deal with cleaning up "the current project" only).
If the PYTHONPYCACHEPREFIX variable is set one may run PyClean this way and get the same result:
pyclean "$PYTHONPYCACHEPREFIX"