Fwd: Fwd: Python freeze fails with warning: the use of `tempnam' is dangerous, better use `mkstemp'

Alexander N. Moibenko moibenko at fnal.gov
Thu Sep 8 10:36:18 EDT 2016


Yes, of course I did not write posixmodule.c, it is a part of the python 
2.7 distribution and I have no idea how to not use it and I believe I 
have no control over it, unless I go inside of python distribution and 
modify it. Is this what you are recommending?


On 09/07/2016 05:36 PM, Ben Finney wrote:
> "Alexander N. Moibenko" <moibenko at fnal.gov> writes:
>
>> /opt/python/Python-2.7.12/./Modules/posixmodule.c:7578: warning: the
>> use of `tempnam' is dangerous, better use `mkstemp'
>> collect2: ld returned 1 exit status
>>
>> How this can be fixed?
> The clearest answer is already there in the warning message. Replace
> your use of ‘tempnam’ with ‘mkstemp’.
>
> If you don't know what that means because you didn't write the code,
> then this is for whoever is maintaining that code. Read it, learn what
> it does, find (or write) its unit tests to make sue you don't break
> anything; then, change that usage as suggested.
>




More information about the Python-list mailing list