[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

It's still the same in 3.11. I don't know whether this is something to fix in 
the code or in the docs.

>> import tempfile
>>> tempfile.mkdtemp(dir='.')
'./tmplvkt14za'
>>> tempfile.mkstemp(dir='.')
(3, '/Users/iritkatriel/src/cpython/tmp86ljh34k')

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2014-01-31 Thread Yury Selivanov

Yury Selivanov added the comment:

bump? see also #20267

--
nosy: +yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2012-12-28 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2012-12-27 Thread Hynek Schlawack

Hynek Schlawack added the comment:

I think we should resolve this one line change.

Jessica’s patch looks just fine, so I tend to apply it.  However, I’d like to 
document the current behavior in 2.7, 3.2, 3.3 and 3.4.

Am I missing anything?

--
nosy: +hynek
versions: +Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-21 Thread Éric Araujo

Éric Araujo  added the comment:

os.path.abspath actually checks for isabs first, so I think you can leave the 
test out and always call abspath.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-21 Thread Rafael dos Santos Gonçalves

Rafael dos Santos Gonçalves  added the comment:

You is right, i put this command on test and not the test.
thankss

--
Added file: http://bugs.python.org/file19737/issue7325.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-21 Thread Rafael dos Santos Gonçalves

Changes by Rafael dos Santos Gonçalves :


Removed file: http://bugs.python.org/file19699/issue7325.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-20 Thread Éric Araujo

Éric Araujo  added the comment:

Looks good to me, with one exception:

 if temp_dir_abspath.startswith('./'):

Wouldn’t this be better:

 if not _os.path.isabs(temp_dir_abspath)

(P.S. file is not a builtin anymore in 3.x, it’s used for example as an 
argument to the print function.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-20 Thread Rafael dos Santos Gonçalves

Rafael dos Santos Gonçalves  added the comment:

Hi people,
I insert a simple code in tempfile.py, that verify if the return starts with 
./, and concatenate using the abspath function.
I changed the variable name file to temp_dir_abspath, because file is a 
built-in function and it's not recommended, overwrite it with local variables.
And at least i add one test, that verify if temp_directory returns an absolut 
path.

thanks.

--
nosy: +elesbom
Added file: http://bugs.python.org/file19699/issue7325.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-17 Thread Éric Araujo

Changes by Éric Araujo :


--
versions:  -Python 2.7, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-17 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 2.7, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-16 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions:  -Python 2.6, Python 2.7, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-14 Thread Jessica McKellar

Jessica McKellar  added the comment:

Thomas, I think the weirdness you were sensing when trying to adapt the 
nameCheck calls in test__RandomNameSequence after adding the abspath check is 
that those test cases really don't need nameCheck.

For example, test_get_six_char_str should be testing that _RandomNameSequence 
returns something that is both a string and 6 characters, not properties of 
some path manufactured around it.

I've attached a patch based on Thomas's that factors out the string check in 
nameCheck and has the tests in test__RandomNameSequence just use the string 
check.

The patch is against release27-maint.

--
nosy: +jesstess
title: tempfile.mkdtemp() does not return absolute pathname when dir is 
specified -> tempfile.mkdtemp() does not return absolute pathname when relative 
dir is specified
Added file: http://bugs.python.org/file19610/issue7325.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com