pyclean icon indicating copy to clipboard operation
pyclean copied to clipboard

Consider parallel file system cache (Python 3.8)

Open bittner opened this issue 6 years ago • 2 comments
trafficstars

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 avatar Oct 21 '19 19:10 bittner

@bittner FYI (I haven‘t looked at your implementation yet): Maybe the following helps what I normally do for Python cleanup.

SEE ALSO:

RELATED TOOL:

  • pycmd: py.cleanup command performs similar things: https://pypi.org/project/pycmd/

jenisys avatar Jul 30 '23 23:07 jenisys

@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"

bittner avatar Jul 31 '23 06:07 bittner