Rewrite rmtree using os.walk to fix bug #1025127:
The shutils.rmtree() implementation uses an excessive amount of memory when deleting large directory hierarchies. Before actually deleting any files, it builds up a list of (function, filename) tuples for all the files that it is going to remove.
Showing
Please register or sign in to comment