[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-08-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f42c9dbd8a7 by Ned Deily in branch '3.2':
Issue #14992: Prevent test_os test_exist_ok_s_isgid_directory test case
http://hg.python.org/cpython/rev/3f42c9dbd8a7

New changeset a1c8c79e035d by Ned Deily in branch 'default':
Issue #14992: merge from 3.2
http://hg.python.org/cpython/rev/a1c8c79e035d

--

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



[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

See also issue 13498.

--
nosy: +r.david.murray

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



[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Gregory P. Smith

New submission from Gregory P. Smith g...@krypto.org:

==
ERROR: test_exist_ok_existing_directory (__main__.MakedirTests)
--
Traceback (most recent call last):
  File Lib/test/test_os.py, line 842, in test_exist_ok_existing_directory
os.makedirs(path, mode=mode, exist_ok=True)
  File /home/greg/sandbox/python/cpython/default/Lib/os.py, line 161, in 
makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists (mode 0o2755 != desired mode 0o755): 
'@test_4027_tmp/dir1'

(I modified os.makedirs to add the info on the mode differences above to 
highlight the source of the problem)

0o2000 is the S_ISGID bit on a directory which is a contagious bit that is 
automatically copied onto subdirectories.  os.makedirs is not expecting to find 
it so exist_ok does not work as desired.

Workaround: Don't run the Python test suite from a directory with that bit set.

I think the os.makedirs() behavior should be to ignore bits that can appear 
regardless of the umask as it makes exist_ok=True useless in that situation.

--
messages: 162228
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: os.makedirs expect_ok=True test_os failure when directory has S_ISGID 
bit set
versions: Python 3.3

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



[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


--
versions: +Python 3.2

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



[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset fef529f3de5b by Gregory P. Smith in branch '3.2':
Fixes Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
http://hg.python.org/cpython/rev/fef529f3de5b

New changeset eed26e508b7e by Gregory P. Smith in branch 'default':
Fixes Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
http://hg.python.org/cpython/rev/eed26e508b7e

--
nosy: +python-dev

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



[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


--
assignee:  - gregory.p.smith
resolution:  - fixed
status: open - closed

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