This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: don't use '-' and '_' in mkstemp
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: arvins, collinwinter, loewis
Priority: normal Keywords: patch

Created on 2007-02-25 17:47 by arvins, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tempfile.py.diff arvins, 2007-02-25 17:47 tiny patch
Messages (6)
msg51963 - (view) Author: Arvin Schnell (arvins) Date: 2007-02-25 17:47
I suggest to not use '-' and '_' in the filename
generated by mkstemp.  Without a prefix you end
up with filename that start with '-' witch are
clumsy to delete in the shell.

glibc's mkstemp also uses only alphanumerical
characters.
msg51964 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-02-25 22:03
I can see what's wrong with -, but what is the problem with _?
msg51965 - (view) Author: Arvin Schnell (arvins) Date: 2007-02-25 22:44
Nothing is wrong with '_'.  I just wanted to make it consistent with glibc.
Both 62**6 and 63**6 are huge numbers so it doesn't really matter.
msg51966 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-08 21:03
Martin, any objections to committing this if only "-" is removed? I'll take care of the check-in.
msg51967 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-08 21:48
Looks fine, go ahead.
msg51968 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-08 22:17
Applied as r54232; not backporting.

Thanks for your patch, Arvin!
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44615
2007-02-25 17:47:29arvinscreate