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
gh-58451: Add optional delete_on_close parameter to NamedTemporaryFile #97015
Commits on Sep 21, 2022
-
Brought the same changes as in now closed PR 22431, but to the latest…
… version of main
Commits on Sep 22, 2022
-
Based on the review from @eryksun the code and the documentation is u…
…pdated to handle the situation, when delete = True, delete_on_close = Flase and no context manager was used
-
-
-
Co-authored-by: Éric <merwok@netwok.org>
Commits on Sep 23, 2022
-
Deletion of file upon finalization is moved from _TemporaryFileWrappe…
…r to _TemporaryFileCloser Test test_del_by_finalizer_if_no_with is changed from simulating finalizer by calling __del__() to making sure finalizer really runs
Commits on Sep 24, 2022
-
-
clearing of the files in the situation when delete and not delete_on_…
…close is moved to _TemporaryFileWrapper based on the advice from @eryksun There are errors in the test (at least on Linux)
-
if statement is added to avoid errors, when testing. Not sure 100% is…
… this is a solution or workaround
Commits on Sep 25, 2022
-
-
_TemporaryFileCloser is returned to original state and the logic, whi…
…ch takes into account delete_on_close moved to _TemporaryFileWrapper (suggestion of @ekisun)
-
All delete operations are moved to the class _TemporaryFileCloser
modified: Lib/tempfile.py
-
Commits on Sep 26, 2022
-
Co-authored-by: Eryk Sun <eryksun@gmail.com>
-
Co-authored-by: Eryk Sun <eryksun@gmail.com>
-
Modified exception handling in NamedTemporaryFile
modified: Lib/tempfile.py
-
Wrapping at 80 characters is fixed
modified: Lib/test/test_tempfile.py
Commits on Oct 1, 2022
-
Co-authored-by: Eryk Sun <eryksun@gmail.com>
-
Documentation update, based on the feedback from @zooba
modified: Doc/library/tempfile.rst
-
Minor PEP8 update based on the feedback from @zooba
modified: Lib/test/test_tempfile.py
-
Improving comments in the init test file, based on the feedback from @…
…eryksun Files changed: Lib/test/test_tempfile.py Co-authored-by: Eryk Sun <eryksun@gmail.com>
Commits on Oct 2, 2022
-
Merge branch 'fix-issue-14243' of https://github.com/Ev2geny/cpython …
…into fix-issue-14243