Repository navigation
Closed as not planned
Labels
3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2019-03-16.00:49:04.986>
labels = ['3.8', 'type-feature', 'library']
title = 'Remove tempfile.mktemp()'
updated_at = <Date 2019-09-02.10:24:19.820>
user = 'https://github.com/johnthagen'bugs.python.org fields:
activity = <Date 2019-09-02.10:24:19.820>
actor = 'python-dev'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2019-03-16.00:49:04.986>
creator = 'John Hagen'
dependencies = []
files = []
hgrepos = []
issue_num = 36309
keywords = ['patch']
message_count = 6.0
messages = ['338046', '338302', '338304', '338305', '338324', '338348']
nosy_count = 5.0
nosy_names = ['brett.cannon', 'serhiy.storchaka', 'matrixise', 'John Hagen', 'pablogsal']
pr_nums = ['12437', '15640']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue36309'
versions = ['Python 3.8']Linked PRs
Metadata
Metadata
Assignees
Labels
3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
Projects
- StatusShow more project fieldsDone
Activity
johnthagen commentedon Mar 16, 2019
tempfile.mktemp has been deprecated since Python 2.3 and has security concerns attached to it. Is it time that this is finally removed?
https://docs.python.org/3/library/tempfile.html#tempfile.mktemp
brettcannon commentedon Mar 19, 2019
Unfortunately not because there is no warning being raised currently about the deprecation (it's only documented as deprecated; 44f602d). A PR raising an appropriate deprecation for at least one release would then allow us to consider removing it in subsequent release.
pablogsal commentedon Mar 19, 2019
There was a warning, but it was suppressed by this commit:
commit 44f602d
Author: Guido van Rossum <[email protected]>
Date: Fri Nov 22 15:56:29 2002 +0000
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.
"""
johnthagen commentedon Mar 19, 2019
Should it be a DeprecationWarning instead of a RuntimeWarning? (or both since it's both deprecated and a security issue?)
serhiy-storchaka commentedon Mar 19, 2019
Taking to the account the widespread use of mktemp(), I think it needs more than one release for deprecation.
This should be discussed on the Python-Dev mailing list first.
matrixise commentedon Mar 19, 2019
@serhiy
I have posted on the Python-dev mailing list.
https://mail.python.org/pipermail/python-dev/2019-March/156721.html
Remove some usage of tempfile.mktemp()
Remove some usage of tempfile.mktemp()
Remove some usage of tempfile.mktemp()
Remove some usage of tempfile.mktemp()
Remove some usage of tempfile.mktemp()
vstinner commentedon Sep 11, 2024
I don't think that we should remove this function. It's deprecated and its documentation contains a big red warning about security. IMO it's enough: https://docs.python.org/dev/library/tempfile.html#tempfile.mktemp I close the issue as WONT FIX.