Skip to content

gh-95484: Improve tempfile docs for conditions when files are removed#95485

Open
NickCrews wants to merge 1 commit intopython:mainfrom
NickCrews:tempfile-docs
Open

gh-95484: Improve tempfile docs for conditions when files are removed#95485
NickCrews wants to merge 1 commit intopython:mainfrom
NickCrews:tempfile-docs

Conversation

@NickCrews
Copy link
Copy Markdown
Contributor

@NickCrews NickCrews commented Jul 30, 2022

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"

@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Jul 30, 2022
@NickCrews
Copy link
Copy Markdown
Contributor Author

The bullet list doesn't render properly, I'm actually cloning locally to debug, will push a fix soon...

@NickCrews NickCrews force-pushed the tempfile-docs branch 3 times, most recently from a24a9da to 84d5ce7 Compare July 31, 2022 00:22
@NickCrews
Copy link
Copy Markdown
Contributor Author

OK, rendering is fixed, it now looks like
image

Comment thread Doc/library/tempfile.rst Outdated
: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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I addressed this in eb61e19. See what you think of that.

@ryan-duve
Copy link
Copy Markdown
Contributor

Hey @NickCrews -- Are you still interested in pushing this forward? If so, there's an outstanding suggestion to you from Jelle.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 11, 2026
@NickCrews
Copy link
Copy Markdown
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants