This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: fix for mkstemp with relative paths (bug #810408)
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: loewis, midramas
Priority: normal Keywords: patch

Created on 2003-09-23 01:18 by midramas, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch_for_bug_810408.diff midramas, 2003-09-23 01:18 patch in -c diff format to fix bug #810408
Messages (2)
msg44685 - (view) Author: Michael Bartl (midramas) Date: 2003-09-23 01:18
Fixed:

- Added a testcase to test_tempfile.py to catch the bug
- Fixed mkstemp() to return absolute pathname

Bug description:

The document of tempfile.mkstemp says that,
"mkstemp() returns a tuple containing an OS-level
handle to an open file (as would be returned by
os.open()) and the absolute pathname of that file,
in that order."

However, if you specify the directory as relative path,
it doesn't return an absolute pathname.
msg44686 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-12 17:38
Logged In: YES 
user_id=21627

Thanks for the patch. Applied as

tempfile.py 1.57
test_tempfile.py 1.15
NEWS 1.868

I did not back-port it to 2.3, as it may cause an
incompatibility, in case applications where expecting to get
back a relative path.
History
Date User Action Args
2022-04-10 16:11:18adminsetgithub: 39278
2003-09-23 01:18:40midramascreate