New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shutils.rmtree() uses excessive amounts of memory #40887
Comments
The shutils.rmtree() implementation uses an excessive Before actually deleting any files, it builds up a list I'm not sure why it is doing things this way. It isn't Replacing _build_cmdtuple() with a generator might be a I checked in CVS, and this issue is still present on HEAD. |
Logged In: YES Rewrite it using os.walk() (not os.path.walk()) with |
Logged In: YES Attached is a Python file including a fixed up |
Logged In: YES Please attach changes as a patch next time. I've attached I gave it a quick review and added a test to test_shutil.py |
Logged In: YES I don't really have time for a thorough review. I'll note that func = something1
arg = something2
func(arg) looks, to my eye, like a convoluted way to say something1(something2) I suppose that's to keep the onerror= gimmick working, |
Logged In: YES I just looked at my own patch again, added the _raise_err |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: