Issue 1668482: don't use '-' and '_' in mkstemp (original ) (raw ) This issue has been migrated to GitHub: https://github.com/python/cpython/issues/44615
classification
process
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) *
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) *
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) *
Date: 2007-03-08 21:48
Looks fine, go ahead.
msg51968 - (view)
Author: Collin Winter (collinwinter) *
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:22
admin
set
github: 44615
2007-02-25 17:47:29
arvins
create