`mktemp` has been deprecated since Python 2.3 (security), use `mkstemp` instead. See the Python documentation.