gh-79459: Sanitize the prefix and suffix parameters to tempfile functions.#143889
gh-79459: Sanitize the prefix and suffix parameters to tempfile functions.#143889mbyrnepr2 wants to merge 6 commits into
prefix and suffix parameters to tempfile functions.#143889Conversation
|
In terms of the decisions made in the PR, I've tried to follow the suggestions mentioned in the issue from both Victor's comment and the comment of mjpieters. |
69768c3 to
e9add85
Compare
…the `tempfile` functions: - `tempfile.mkdtemp`. - `tempfile.mkstemp`. - `tempfile.NamedTemporaryFile`.
…1acn-.rst Remove news file that was incorrectly named.
15c9051 to
ddbef77
Compare
|
Howdy @vstinner would you have some time in the coming period to give some high-level feedback if this change looks like it's on the right track? |
|
This PR is stale because it has been open for 30 days with no activity. |
Documentation build overview
|
|
I'm not sure that striping silently the directory is the right move. I would feel safer to raise a hard error (exception) if the caller pass a prefix or suffix with a directory. @mbyrnepr2: Do you want to propose a different PR to implement this change? |
gh-79459: Sanitize the
prefixandsuffixparameters to thetempfilefunctions:tempfile.mkdtemp.tempfile.mkstemp.tempfile.NamedTemporaryFile.📚 Documentation preview 📚: https://cpython-previews--143889.org.readthedocs.build/