[issue36309] Remove tempfile.mktemp()
Pablo Galindo Salgado
report at bugs.python.org
Mon Mar 18 20:50:07 EDT 2019
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
There was a warning, but it was suppressed by this commit:
commit 44f602dd3b452bbacd3c85b1e5f9873c892b46e3
Author: Guido van Rossum <guido at python.org>
Date: Fri Nov 22 15:56:29 2002 +0000
Comment out the warnings about mktemp(). These are too annoying, and
often unavoidable.
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 97f125250b..0393ba5d30 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -324,9 +324,9 @@ def mktemp(suffix="", prefix=template, dir=None):
the punch.
"""
- from warnings import warn as _warn
- _warn("mktemp is a potential security risk to your program",
- RuntimeWarning, stacklevel=2)
+## from warnings import warn as _warn
+## _warn("mktemp is a potential security risk to your program",
+## RuntimeWarning, stacklevel=2)
if dir is None:
dir = gettempdir()
----------
nosy: +pablogsal
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36309>
_______________________________________
More information about the Python-bugs-list
mailing list