[Patches] [ python-Patches-810914 ] fix for mkstemp with relative paths (bug #810408)

SourceForge.net noreply at sourceforge.net
Sun Oct 12 13:38:01 EDT 2003


Patches item #810914, was opened at 2003-09-23 03:18
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=810914&group_id=5470

Category: Library (Lib)
Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Michael Bartl (midramas)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix for mkstemp with relative paths (bug #810408)

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-10-12 19:38

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=810914&group_id=5470



More information about the Patches mailing list