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
bpo-42830: Update the documentation for tempfile.mkstemp #27075
base: main
Are you sure you want to change the base?
Conversation
…t user is responsible for closing the file descriptor while closing the created file.
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Can you also update line 193 to replace 'handle' with 'file descriptor' (for consistency with os.close)? |
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
I do not know the difference between the two words in OS context. I am not sure. |
This PR is stale because it has been open for 30 days with no activity. |
for deleting the temporary file when done with it. If a large number of file | ||
descriptors are created, your program may run into a per-process limit and raise an :exc:`OSError`. | ||
You can avoid this issue by closing file descriptors with :func:`os.close`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just say something like "the user of :func:mskstemp
is responsible for deleting the temporary file and closing the file descriptor". Lots of things can cause you to run out of FDs, this isn't the place to describe the exact behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
Check this please... thanks for letting me be part of this project, and have done 8 contributions just that fact puts a smile in my face. |
@srinivasreddy Would you still interested in giving the PR a quick update per the review? |
Sure. I would do it in a day or two. |
bpo-42830: Update the documentation for tempfile.mkstemp function that user is responsible for closing the file descriptor while closing the created file.
https://bugs.python.org/issue42830