classification
Title: Doc for os.makedirs is inconsistent with actual behaviour
Type: behavior Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.4, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, fpom
Priority: normal Keywords:

Created on 2017-09-19 08:04 by fpom, last changed 2017-09-19 08:08 by fpom. This issue is now closed.

Messages (2)
msg302507 - (view) Author: Franck Pommereau (fpom) Date: 2017-09-19 08:04
Documentation of os.makedirs says "The default mode is 0777 (octal)" but when I use os.makedirs("foo"), the directory is created with permissions 0755.
Documentation should be updated or default mode fixed.

I've tested it only with Python 2.7.6 and 3.4.3 (those installed on my computer).
msg302508 - (view) Author: Franck Pommereau (fpom) Date: 2017-09-19 08:08
Sorry for the noise, I just discovered in the doc for os.mkdir that UMASK is applied on the mode passed to the functions. So the behaviour is actually correct.
History
Date User Action Args
2017-09-19 08:08:53fpomsetstatus: open -> closed
resolution: not a bug
messages: + msg302508

stage: resolved
2017-09-19 08:04:54fpomcreate