gh-95484: Improve tempfile docs for conditions when files are removed#95485
gh-95484: Improve tempfile docs for conditions when files are removed#95485NickCrews wants to merge 1 commit intopython:mainfrom
tempfile docs for conditions when files are removed#95485Conversation
|
The bullet list doesn't render properly, I'm actually cloning locally to debug, will push a fix soon... |
a24a9da to
84d5ce7
Compare
| :ref:`tempfile-examples`). On completion of the context or | ||
| destruction of the file object the temporary file will be removed | ||
| from the filesystem. | ||
| The temporary file will be removed from the filesystem when the returned |
There was a problem hiding this comment.
This sentence is not quite grammatical. I'd suggest starting with "The temporary file will be removed from the file system under the following conditions:"
There was a problem hiding this comment.
Thanks, I addressed this in eb61e19. See what you think of that.
|
Hey @NickCrews -- Are you still interested in pushing this forward? If so, there's an outstanding suggestion to you from Jelle. |
|
This PR is stale because it has been open for 30 days with no activity. |
84d5ce7 to
eb61e19
Compare
|
@ryan-duve Thanks for the nudge, I had totally forgotten about this PR :) Just pushed a new version that addresses that feedback, let me know what you think. |

Lightly edit some prose. On my initial read of the docs, I was confused about when tempfiles are deleted. I think this PR would have helped me.
Now there are two paragraphs, the first one has to do with "creating a tempfile" and the second is "deleting a tempfile". I think this is a better way of organizing things than what it used to be.
Before, an entire paragraph was about "using as a context manager", which I think is less important than "when is a tempfile deleted". The first paragraph was "what happens when you make a tempfile and also here is one way of when it is closed"
tempfiledocumentation for conditions when files are removed #95484