Skip to content

bpo-37421: Fix test_shutil: don't leak temporary files #14416

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

Merged
merged 1 commit into from
Jun 26, 2019
Merged

bpo-37421: Fix test_shutil: don't leak temporary files #14416

merged 1 commit into from
Jun 26, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 26, 2019

  • Fix typo in supports_file2file_sendfile(); ensure that dst is
    removed
  • Fix test_copytree_custom_copy_function(): remove dst tree.
    Use support.rmtree() rather than shutil.rmtree() to remove
    temporary directories: support tries harder.

https://bugs.python.org/issue37421

* Fix typo in supports_file2file_sendfile(); ensure that dst is
  removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
  Use support.rmtree() rather than shutil.rmtree() to remove
  temporary directories: support tries harder.
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@vstinner vstinner deleted the test_shutil_tmpdir branch June 26, 2019 23:39
@bedevere-bot
Copy link

GH-14417 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 26, 2019
* Fix typo in supports_file2file_sendfile(); ensure that dst is
  removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
  Use support.rmtree() rather than shutil.rmtree() to remove
  temporary directories: support tries harder.
(cherry picked from commit 4c26abd)

Co-authored-by: Victor Stinner <[email protected]>
@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4c26abd14f1b7242998eb2f7756aa375e0fe714f 3.7

@vstinner
Copy link
Member Author

I checked: Python 3.7 is not affected, it doesn't contain the code which had the two bugs.

miss-islington added a commit that referenced this pull request Jun 26, 2019
* Fix typo in supports_file2file_sendfile(); ensure that dst is
  removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
  Use support.rmtree() rather than shutil.rmtree() to remove
  temporary directories: support tries harder.
(cherry picked from commit 4c26abd)

Co-authored-by: Victor Stinner <[email protected]>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
* Fix typo in supports_file2file_sendfile(); ensure that dst is
  removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
  Use support.rmtree() rather than shutil.rmtree() to remove
  temporary directories: support tries harder.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
* Fix typo in supports_file2file_sendfile(); ensure that dst is
  removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
  Use support.rmtree() rather than shutil.rmtree() to remove
  temporary directories: support tries harder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants