-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-58451: Add optional delete_on_close parameter to NamedTemporaryFile #97015
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
Changes from all commits
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 c4cf39f
Based on the review from @eryksun the code and the documentation is u…
Ev2geny ac0b241
documentation is slightly corrected
Ev2geny 384614f
minor documentation update
Ev2geny 0e0b6ba
Update Doc/whatsnew/3.12.rst
Ev2geny cc81ab5
Deletion of file upon finalization is moved from _TemporaryFileWrappe…
Ev2geny 5af6150
Some additions to Lib/test/test_tempfile.py
Ev2geny 239354e
clearing of the files in the situation when delete and not delete_on_…
Ev2geny 5de68c0
if statement is added to avoid errors, when testing. Not sure 100% is…
Ev2geny eef3439
Apply suggestions from code review
Ev2geny c9801ee
__del__ was defined twice in _TemporaryFileWrapper. Fixed now
Ev2geny 6944ab2
_TemporaryFileCloser is returned to original state and the logic, whi…
Ev2geny 44f0664
All delete operations are moved to the class _TemporaryFileCloser
Ev2geny 1dfaf72
Minor update to comments
Ev2geny e54feb5
Whitespec fixes by patchcheck.py
Ev2geny d2d1119
Update Lib/tempfile.py
Ev2geny bd4b2dd
Update Lib/tempfile.py
Ev2geny 29eeaff
Modified exception handling in NamedTemporaryFile
Ev2geny 5306b6d
Wrapping at 80 characters is fixed
Ev2geny 1c99fb3
Update Lib/tempfile.py
Ev2geny 29b89d3
Documentation update, based on the feedback from @zooba
Ev2geny e586028
Minor PEP8 update based on the feedback from @zooba
Ev2geny 3eceb45
Improving comments in the init test file, based on the feedback from …
Ev2geny 892e87d
Updating of documentation
Ev2geny 67996b2
Merge branch 'fix-issue-14243' of https://github.com/Ev2geny/cpython …
Ev2geny 07b963e
Apply suggestions from code review
zooba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Library/2020-09-28-04-56-04.bpo-14243.YECnxv.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The :class:`tempfile.NamedTemporaryFile` function has a new optional parameter *delete_on_close* |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.