8000 gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup by kwi-dk · Pull Request #99930 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup #99930

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 15 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Carl Meyer <carl@oddbird.net>
  • Loading branch information
kwi-dk and carljm authored Dec 15, 2022
commit 5b83afea44f86b5eda9c67dbed32d28c92a2aa54
2 changes: 1 addition & 1 deletion Lib/test/test_tempfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ def test_cleanup_with_error_deleting_symlink(self):
d1 = self.do_create()
d2 = self.do_create(recurse=0)

# Symlink d1/my_symlink -> d2, then give d2 a custom mode to see if changes.
# Symlink d1/my_symlink -> d2, then give d2 a custom mode to see if it changes.
os.symlink(d2.name, os.path.join(d1.name, "my_symlink"))
os.chmod(d2.name, 0o567)
expected_mode = os.stat(d2.name).st_mode # can be impacted by umask etc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Fix a bug :class:`tempfile.TemporaryDirectory` cleanup, which now no longer
Fix a bug in :class:`tempfile.TemporaryDirectory` cleanup, which now no longer
dereferences symlinks when working around file system permission errors.
0