justinvh / Markdown-LaTeX

This Markdown extension adds inline LaTeX support without the need for external images.
Other
127 stars 15 forks source link

Replace deprecated mktemp() by mkstemp() #16

Closed shuber2 closed 10 years ago

shuber2 commented 10 years ago

mktemp() is considered harmful since python-2.3: https://docs.python.org/2/library/tempfile.html#tempfile.mktemp

shuber2 commented 10 years ago

I just realized, that Issue #15 already pointed to this issue. One can now choose the directy, in which the tmpfile is created, by setting TMPDIR, as explained in the documentatin of mkstemp(). However, as mentioned by ferrouswheel, usig mkdtemp() would be a nicer solution, but requires a tiny bit of code to unlink the directory.