Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3df957c
Brought the same changes as in now closed PR 22431, but to the latest…
Ev2geny Sep 21, 2022
c4cf39f
Based on the review from @eryksun the code and the documentation is u…
Ev2geny Sep 22, 2022
ac0b241
documentation is slightly corrected
Ev2geny Sep 22, 2022
384614f
minor documentation update
Ev2geny Sep 22, 2022
0e0b6ba
Update Doc/whatsnew/3.12.rst
Ev2geny Sep 22, 2022
cc81ab5
Deletion of file upon finalization is moved from _TemporaryFileWrappe…
Ev2geny Sep 23, 2022
5af6150
Some additions to Lib/test/test_tempfile.py
Ev2geny Sep 24, 2022
239354e
clearing of the files in the situation when delete and not delete_on_…
Ev2geny Sep 24, 2022
5de68c0
if statement is added to avoid errors, when testing. Not sure 100% is…
Ev2geny Sep 24, 2022
eef3439
Apply suggestions from code review
Ev2geny Sep 25, 2022
c9801ee
__del__ was defined twice in _TemporaryFileWrapper. Fixed now
Ev2geny Sep 25, 2022
6944ab2
_TemporaryFileCloser is returned to original state and the logic, whi…
Ev2geny Sep 25, 2022
44f0664
All delete operations are moved to the class _TemporaryFileCloser
Ev2geny Sep 25, 2022
1dfaf72
Minor update to comments
Ev2geny Sep 25, 2022
e54feb5
Whitespec fixes by patchcheck.py
Ev2geny Sep 25, 2022
d2d1119
Update Lib/tempfile.py
Ev2geny Sep 26, 2022
bd4b2dd
Update Lib/tempfile.py
Ev2geny Sep 26, 2022
29eeaff
Modified exception handling in NamedTemporaryFile
Ev2geny Sep 26, 2022
5306b6d
Wrapping at 80 characters is fixed
Ev2geny Sep 26, 2022
1c99fb3
Update Lib/tempfile.py
Ev2geny Oct 1, 2022
29b89d3
Documentation update, based on the feedback from @zooba
Ev2geny Oct 1, 2022
e586028
Minor PEP8 update based on the feedback from @zooba
Ev2geny Oct 1, 2022
3eceb45
Improving comments in the init test file, based on the feedback from …
Ev2geny Oct 1, 2022
892e87d
Updating of documentation
Ev2geny Oct 2, 2022
67996b2
Merge branch 'fix-issue-14243' of https://github.com/Ev2geny/cpython …
Ev2geny Oct 2, 2022
07b963e
Apply suggestions from code review
zooba Oct 4, 2022
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
Update Lib/tempfile.py
Co-authored-by: Eryk Sun <[email protected]>
  • Loading branch information
Ev2geny and eryksun authored Sep 26, 2022
commit bd4b2ddc10476bc0c817431da34bac1af1f37da5
2 changes: 2 additions & 0 deletions Lib/tempfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ def cleanup(self, windows=(_os.name == 'nt'), unlink=_os.unlink):
self.close_called = True
self.file.close()
finally:
# Windows provides delete-on-close as a primitive, in which
# case the file was deleted by self.file.close().
if self.delete and not (self.delete_on_close and windows):
try:
unlink(self.name)
Expand Down